This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(stable_spree_version) 184m $ cuke features/people_signs_up.feature:9 | |
Using the default profile... | |
WARNING: No DRb server is running. Running features locally: | |
[DEPRECATION WARNING] Nested I18n namespace lookup under "activerecord.attributes.spree/order" is no longer supported | |
.....F-QFont::setPixelSize: Pixel size <= 0 (0) | |
(::) failed steps (::) | |
expected: "/sales" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18:26:18 guard.1 | /Users/emmanueldelgado/Projects/theproject/app/models/card.rb:54: warning: already initialized constant Fonts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module B | |
def greeting | |
puts "Hi there" | |
end | |
end | |
module C | |
def yell | |
puts "AAaaaaaaaaa!!" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export LC_ALL="en_GB.UTF-8" | |
echo "Updating system" | |
apt-get update | |
echo "Installing base libraries" | |
apt-get install -y git-core zlib1g zlib1g-dev sqlite3 libsqlite3-dev ack exuberant-ctags curl openssl libssl-dev | |
echo "Installing Ruby step 1: Installing rbenv" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if defined? Rails | |
require 'spec_helper' | |
else | |
root = File.absolute_path File.join(__FILE__, '..', '..') | |
$:.unshift File.join root, 'app' | |
$:.unshift File.join root, 'app', 'helpers' | |
$:.unshift File.join root, 'app', 'controllers' | |
$:.unshift File.join root, 'lib' | |
$:.unshift File.join root, 'config' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
SP = ->(graph, from_node, to_node, nodes = Hash.new(0), visited = [], i = 0) { | |
return nodes[from_node] if from_node == to_node | |
neighbours = graph[from_node].reject {|k, v| visited.include?(k) } | |
neighbours.each do |k, v| | |
if nodes[k] == 0 || nodes[from_node] + v < nodes[k] | |
nodes[k] = nodes[from_node] + v |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2.0.0-p247 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'minitest/autorun' | |
SortSnail = -> (elements, result = []) { | |
return result if elements.empty? | |
bottom_limit = 0 | |
top_limit = elements.count - 1 | |
loop do | |
result.concat elements[bottom_limit][bottom_limit..top_limit] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'ruby-prof' | |
def prime(n) | |
limit = n | |
numbers = Array.new(n + 1) { true } | |
start = 2 | |
primes = [] | |
loop do | |
numbers[start] && primes << start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static org.junit.Assert.assertEquals; | |
import org.junit.Test; | |
import org.junit.Ignore; | |
import org.junit.Rule; | |
import org.junit.Before; | |
import org.junit.rules.ExpectedException; | |
import org.junit.runner.RunWith; | |
import org.junit.runners.JUnit4; |