This file contains 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
ackpurchase λ cap hall_notify:notify_hall_room | |
/Users/Luca/.rvm/gems/ruby-2.0.0-p0/gems/highline-1.6.20/lib | |
/Users/Luca/.rvm/gems/ruby-2.0.0-p0/gems/net-sftp-2.1.2/lib | |
/Users/Luca/.rvm/gems/ruby-2.0.0-p0/gems/net-scp-1.1.2/lib | |
/Users/Luca/.rvm/gems/ruby-2.0.0-p0/gems/net-ssh-gateway-1.2.0/lib | |
/Users/Luca/.rvm/gems/ruby-2.0.0-p0/gems/capistrano-2.15.5/lib | |
/Users/Luca/.rvm/gems/ruby-2.0.0-p0/gems/net-ssh-2.8.0/lib | |
/Users/Luca/.rvm/gems/ruby-2.0.0-p0/gems/json-1.8.1/lib | |
/Users/Luca/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.5/lib | |
/Users/Luca/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0 |
This file contains 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
packpurchase λ cat Gemfile.lock | |
GIT | |
remote: git://github.com/smashingboxes/capistrano-haller.git | |
revision: e4e92394891fd858677f79c2101408c86aca1894 | |
specs: | |
capistrano-haller (0.0.2) | |
capistrano (< 3.0) | |
GIT | |
remote: git://github.com/smashingboxes/cardboard.git |
This file contains 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
I, [2014-02-17T17:49:07.694501 #14991] INFO -- : Refreshing Gem list | |
I, [2014-02-17T17:49:10.763734 #14991] INFO -- : listening on addr=/tmp/unicorn.packpurchase.sock fd=10 | |
I, [2014-02-17T17:49:11.081006 #14991] INFO -- : master process ready | |
I, [2014-02-17T17:49:11.097897 #14995] INFO -- : worker=0 ready | |
I, [2014-02-17T17:49:11.102993 #14998] INFO -- : worker=1 ready | |
I, [2014-02-18T15:29:08.030600 #22657] INFO -- : executing ["/home/deployer/www/packpurchase/shared/bundle/ruby/2.0.0/bin/unicorn", "-D", "-c", "/home/deployer/www/packpurchase/shared/config/unicorn.rb", "-E", "staging", {10=>#<Kgio::UNIXServer:/tmp/unicorn.packpurchase.sock>}] (in /home/deployer/www/packpurchase/releases/20140218152825) | |
I, [2014-02-18T15:29:08.620449 #22657] INFO -- : inherited addr=/tmp/unicorn.packpurchase.sock fd=10 | |
I, [2014-02-18T15:29:08.645071 #22657] INFO -- : Refreshing Gem list | |
I, [2014-02-18T15:29:10.537629 #14991] INFO -- : reaped #<Process::Status: pid 14995 exit 0> worker=0 | |
I, [2014-02-18T15:29:10.537860 # |
This file contains 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
def initialize(numhands, n = 5, deck = [r+s for r in '23456789TJQKA' for s in 'SHDC']) | |
deck.shuffle | |
i = 0 | |
numhands.times do (n*i).upto(n*(i+1)) {|x|... } | |
end | |
end |
This file contains 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
class PokerGame | |
include Enumerable | |
include Comparable | |
attr_reader :hand | |
def initialize(hands, cards) | |
ranks = %w{ 2 3 4 5 6 7 8 9 T J Q K A } | |
suits = %w{ S H D C } | |
card_stack = Array.new | |
h = Array.new |
This file contains 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
def initialize(hands, cards) | |
ranks = %w{ 2 3 4 5 6 7 8 9 T J Q K A } | |
suits = %w{ S H D C } | |
card_stack = Array.new | |
h = Array.new | |
suits.each {|suit| | |
ranks.size.times {|i| | |
card_stack << (ranks[i]+suit) | |
} | |
} |
This file contains 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
class PokerGame | |
include Enumerable | |
include Comparable | |
attr_reader :hand | |
def initialize(hands, cards) | |
ranks = %w{ 2 3 4 5 6 7 8 9 T J Q K A } | |
suits = %w{ S H D C } | |
card_stack = Array.new | |
num_hands = Array.new |
This file contains 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
def User | |
has_many :propositions, :as => :debateable | |
has_many :oppositions, :as => :debateable | |
end | |
def Proposition | |
belongs_to :debateable, :polymorphic => :true | |
has_one :opposition, :as => :debateable | |
end |
This file contains 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' | |
describe Debate do | |
#let(:prop_user) { FactoryGirl.create(:user) } | |
#let(:opp_user) { FactoryGirl.create(:user) } | |
before do | |
@prop_user = User.new(name: "Prop User", email: "prop@email.com") | |
@opp_user = User.new(name: "Opp User", email: "opp@email.com") | |
@debate = Debate.new(title: "Test Debate") |
This file contains 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
routes.rb | |
---------- | |
Debateable::Application.routes.draw do | |
resources :users do | |
resources :posts | |
end | |
resources :topics do | |
resources :posts |
OlderNewer