cardlike 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +19 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +278 -0
- data/Rakefile +4 -0
- data/cardlike.gemspec +21 -0
- data/examples/go_fish.rb +120 -0
- data/lib/cardlike/card.rb +73 -0
- data/lib/cardlike/deck.rb +103 -0
- data/lib/cardlike/hand.rb +28 -0
- data/lib/cardlike/score.rb +47 -0
- data/lib/cardlike/turn.rb +27 -0
- data/lib/cardlike/version.rb +3 -0
- data/lib/cardlike.rb +154 -0
- data/spec/integration/card_construction_spec.rb +105 -0
- data/spec/integration/dealing_spec.rb +42 -0
- data/spec/integration/deck_construction_spec.rb +143 -0
- data/spec/spec_helper.rb +4 -0
- data/spec/units/cardlike_spec.rb +9 -0
- data/spec/units/deck_spec.rb +43 -0
- data/spec/units/hand_spec.rb +50 -0
- data/spec/units/score_spec.rb +73 -0
- data/spec/units/turn_spec.rb +24 -0
- metadata +110 -0
| @@ -0,0 +1,24 @@ | |
| 1 | 
            +
            require 'spec_helper'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            describe Cardlike do
         | 
| 4 | 
            +
              describe ".define_turn" do
         | 
| 5 | 
            +
                before do
         | 
| 6 | 
            +
                  Cardlike.define_turn { :foobar }
         | 
| 7 | 
            +
                end
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                it "defines a turn accessible by .the_turn" do
         | 
| 10 | 
            +
                  Cardlike.the_turn.should_not be_nil
         | 
| 11 | 
            +
                end
         | 
| 12 | 
            +
              end
         | 
| 13 | 
            +
             | 
| 14 | 
            +
              describe ".begin_new_turn" do
         | 
| 15 | 
            +
                before do
         | 
| 16 | 
            +
                  Cardlike.define_turn { :foobar }
         | 
| 17 | 
            +
                  @result = Cardlike.begin_new_turn
         | 
| 18 | 
            +
                end
         | 
| 19 | 
            +
             | 
| 20 | 
            +
                it "returns the result of the turn block" do
         | 
| 21 | 
            +
                  @result.should eq :foobar
         | 
| 22 | 
            +
                end
         | 
| 23 | 
            +
              end
         | 
| 24 | 
            +
            end
         | 
    
        metadata
    ADDED
    
    | @@ -0,0 +1,110 @@ | |
| 1 | 
            +
            --- !ruby/object:Gem::Specification
         | 
| 2 | 
            +
            name: cardlike
         | 
| 3 | 
            +
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            +
              version: 0.0.1
         | 
| 5 | 
            +
              prerelease: 
         | 
| 6 | 
            +
            platform: ruby
         | 
| 7 | 
            +
            authors:
         | 
| 8 | 
            +
            - Payton Swick
         | 
| 9 | 
            +
            autorequire: 
         | 
| 10 | 
            +
            bindir: bin
         | 
| 11 | 
            +
            cert_chain: []
         | 
| 12 | 
            +
            date: 2013-02-12 00:00:00.000000000 Z
         | 
| 13 | 
            +
            dependencies:
         | 
| 14 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 15 | 
            +
              name: rspec
         | 
| 16 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 17 | 
            +
                none: false
         | 
| 18 | 
            +
                requirements:
         | 
| 19 | 
            +
                - - ! '>='
         | 
| 20 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 21 | 
            +
                    version: '0'
         | 
| 22 | 
            +
              type: :development
         | 
| 23 | 
            +
              prerelease: false
         | 
| 24 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 25 | 
            +
                none: false
         | 
| 26 | 
            +
                requirements:
         | 
| 27 | 
            +
                - - ! '>='
         | 
| 28 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 29 | 
            +
                    version: '0'
         | 
| 30 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 31 | 
            +
              name: activesupport
         | 
| 32 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 33 | 
            +
                none: false
         | 
| 34 | 
            +
                requirements:
         | 
| 35 | 
            +
                - - ! '>='
         | 
| 36 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 37 | 
            +
                    version: '0'
         | 
| 38 | 
            +
              type: :runtime
         | 
| 39 | 
            +
              prerelease: false
         | 
| 40 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 41 | 
            +
                none: false
         | 
| 42 | 
            +
                requirements:
         | 
| 43 | 
            +
                - - ! '>='
         | 
| 44 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 45 | 
            +
                    version: '0'
         | 
| 46 | 
            +
            description: 
         | 
| 47 | 
            +
            email:
         | 
| 48 | 
            +
            - payton@foolord.com
         | 
| 49 | 
            +
            executables: []
         | 
| 50 | 
            +
            extensions: []
         | 
| 51 | 
            +
            extra_rdoc_files: []
         | 
| 52 | 
            +
            files:
         | 
| 53 | 
            +
            - .gitignore
         | 
| 54 | 
            +
            - Gemfile
         | 
| 55 | 
            +
            - LICENSE.txt
         | 
| 56 | 
            +
            - README.md
         | 
| 57 | 
            +
            - Rakefile
         | 
| 58 | 
            +
            - cardlike.gemspec
         | 
| 59 | 
            +
            - examples/go_fish.rb
         | 
| 60 | 
            +
            - lib/cardlike.rb
         | 
| 61 | 
            +
            - lib/cardlike/card.rb
         | 
| 62 | 
            +
            - lib/cardlike/deck.rb
         | 
| 63 | 
            +
            - lib/cardlike/hand.rb
         | 
| 64 | 
            +
            - lib/cardlike/score.rb
         | 
| 65 | 
            +
            - lib/cardlike/turn.rb
         | 
| 66 | 
            +
            - lib/cardlike/version.rb
         | 
| 67 | 
            +
            - spec/integration/card_construction_spec.rb
         | 
| 68 | 
            +
            - spec/integration/dealing_spec.rb
         | 
| 69 | 
            +
            - spec/integration/deck_construction_spec.rb
         | 
| 70 | 
            +
            - spec/spec_helper.rb
         | 
| 71 | 
            +
            - spec/units/cardlike_spec.rb
         | 
| 72 | 
            +
            - spec/units/deck_spec.rb
         | 
| 73 | 
            +
            - spec/units/hand_spec.rb
         | 
| 74 | 
            +
            - spec/units/score_spec.rb
         | 
| 75 | 
            +
            - spec/units/turn_spec.rb
         | 
| 76 | 
            +
            homepage: https://github.com/sirbrillig/cardlike
         | 
| 77 | 
            +
            licenses: []
         | 
| 78 | 
            +
            post_install_message: 
         | 
| 79 | 
            +
            rdoc_options: []
         | 
| 80 | 
            +
            require_paths:
         | 
| 81 | 
            +
            - lib
         | 
| 82 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 83 | 
            +
              none: false
         | 
| 84 | 
            +
              requirements:
         | 
| 85 | 
            +
              - - ! '>='
         | 
| 86 | 
            +
                - !ruby/object:Gem::Version
         | 
| 87 | 
            +
                  version: '0'
         | 
| 88 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 89 | 
            +
              none: false
         | 
| 90 | 
            +
              requirements:
         | 
| 91 | 
            +
              - - ! '>='
         | 
| 92 | 
            +
                - !ruby/object:Gem::Version
         | 
| 93 | 
            +
                  version: '0'
         | 
| 94 | 
            +
            requirements: []
         | 
| 95 | 
            +
            rubyforge_project: 
         | 
| 96 | 
            +
            rubygems_version: 1.8.24
         | 
| 97 | 
            +
            signing_key: 
         | 
| 98 | 
            +
            specification_version: 3
         | 
| 99 | 
            +
            summary: A library for developing and testing card games.
         | 
| 100 | 
            +
            test_files:
         | 
| 101 | 
            +
            - spec/integration/card_construction_spec.rb
         | 
| 102 | 
            +
            - spec/integration/dealing_spec.rb
         | 
| 103 | 
            +
            - spec/integration/deck_construction_spec.rb
         | 
| 104 | 
            +
            - spec/spec_helper.rb
         | 
| 105 | 
            +
            - spec/units/cardlike_spec.rb
         | 
| 106 | 
            +
            - spec/units/deck_spec.rb
         | 
| 107 | 
            +
            - spec/units/hand_spec.rb
         | 
| 108 | 
            +
            - spec/units/score_spec.rb
         | 
| 109 | 
            +
            - spec/units/turn_spec.rb
         | 
| 110 | 
            +
            has_rdoc: 
         |