first_gem_best_carl 0.0.2 → 0.0.3
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.
- checksums.yaml +4 -4
 - data/.rspec +2 -0
 - data/first_gem_best_carl.gemspec +1 -0
 - data/lib/first_gem_best_carl/version.rb +1 -1
 - data/spec/first_gem_best_carl_spec.rb +37 -0
 - data/spec/spec_helper.rb +12 -0
 - metadata +21 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: b0c201d1cbf961cd8ebfe4d5b61e865ecb1ac547
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 13582b93a7a597649e14106d6e6c0cb3729ccf14
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: ecbfb191f89d8205e0427fdd2206a55cc3596d19b94cc03dccc9e4d7d05db98cba2b188a4adc901c4facffca682e9492fa67f428cf91e1754337608aab83cf79
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: d35f316318c5c3537231723f952ca3e1b919ec2d9064667d831a2a4d9adaf0bffd3016078d4490c2e174a3e38c83c4420ea6fe324b2146e06041a67e6c9d4dc5
         
     | 
    
        data/.rspec
    ADDED
    
    
    
        data/first_gem_best_carl.gemspec
    CHANGED
    
    
| 
         @@ -0,0 +1,37 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'spec_helper'
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            describe String do
         
     | 
| 
      
 4 
     | 
    
         
            +
              describe '#word_count' do
         
     | 
| 
      
 5 
     | 
    
         
            +
                it 'should return 1 when the string is one word long' do
         
     | 
| 
      
 6 
     | 
    
         
            +
                  a_string = "apple"
         
     | 
| 
      
 7 
     | 
    
         
            +
                  expect(a_string.word_count).to eq(1)
         
     | 
| 
      
 8 
     | 
    
         
            +
                end
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                it 'should return 3 when the string is three words long' do
         
     | 
| 
      
 11 
     | 
    
         
            +
                  a_string = "apples are delicious"
         
     | 
| 
      
 12 
     | 
    
         
            +
                  expect(a_string.word_count).to eq(3)
         
     | 
| 
      
 13 
     | 
    
         
            +
                end
         
     | 
| 
      
 14 
     | 
    
         
            +
              end
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
              describe '#unique_words' do
         
     | 
| 
      
 17 
     | 
    
         
            +
                it 'should return the correct 3 words when the string is three unique words' do
         
     | 
| 
      
 18 
     | 
    
         
            +
                  a_string = "mangos are wonderful"
         
     | 
| 
      
 19 
     | 
    
         
            +
                  expect(a_string.unique_words).to match_array ["mangos", "are", "wonderful"]
         
     | 
| 
      
 20 
     | 
    
         
            +
                end
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
                it 'should return 1 word when the string is duplicated words' do
         
     | 
| 
      
 23 
     | 
    
         
            +
                  a_string = "HODOR HODOR HODOR"
         
     | 
| 
      
 24 
     | 
    
         
            +
                  expect(a_string.unique_words).to match_array ["HODOR"]
         
     | 
| 
      
 25 
     | 
    
         
            +
                end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
                it 'should return an empty array when the string is empty' do
         
     | 
| 
      
 28 
     | 
    
         
            +
                  a_string = ""
         
     | 
| 
      
 29 
     | 
    
         
            +
                  expect(a_string.unique_words).to match_array []
         
     | 
| 
      
 30 
     | 
    
         
            +
                end
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                it 'should return only the unique words for partial duplicates' do
         
     | 
| 
      
 33 
     | 
    
         
            +
                  a_string = "hello world hello hi!"
         
     | 
| 
      
 34 
     | 
    
         
            +
                  expect(a_string.unique_words).to match_array ["hello", "world", "hi!"]
         
     | 
| 
      
 35 
     | 
    
         
            +
                end
         
     | 
| 
      
 36 
     | 
    
         
            +
              end
         
     | 
| 
      
 37 
     | 
    
         
            +
            end
         
     | 
    
        data/spec/spec_helper.rb
    ADDED
    
    | 
         @@ -0,0 +1,12 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
         
     | 
| 
      
 2 
     | 
    
         
            +
            $LOAD_PATH.unshift(File.dirname(__FILE__))
         
     | 
| 
      
 3 
     | 
    
         
            +
            require 'rspec'
         
     | 
| 
      
 4 
     | 
    
         
            +
            require 'first_gem_best_carl'
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            # Requires supporting files with custom matchers and macros, etc,
         
     | 
| 
      
 7 
     | 
    
         
            +
            # in ./support/ and its subdirectories.
         
     | 
| 
      
 8 
     | 
    
         
            +
            Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
            RSpec.configure do |config|
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: first_gem_best_carl
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.3
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Prescott Murphy
         
     | 
| 
         @@ -38,6 +38,20 @@ dependencies: 
     | 
|
| 
       38 
38 
     | 
    
         
             
                - - ">="
         
     | 
| 
       39 
39 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       40 
40 
     | 
    
         
             
                    version: '0'
         
     | 
| 
      
 41 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 42 
     | 
    
         
            +
              name: rspec
         
     | 
| 
      
 43 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 44 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 45 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 46 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 47 
     | 
    
         
            +
                    version: 3.0.0.beta
         
     | 
| 
      
 48 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 49 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 50 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 51 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 52 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 53 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 54 
     | 
    
         
            +
                    version: 3.0.0.beta
         
     | 
| 
       41 
55 
     | 
    
         
             
            description: This is the best carl gem. I cannot in good conscience advise using other
         
     | 
| 
       42 
56 
     | 
    
         
             
              carl gems.
         
     | 
| 
       43 
57 
     | 
    
         
             
            email:
         
     | 
| 
         @@ -47,6 +61,7 @@ extensions: [] 
     | 
|
| 
       47 
61 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       48 
62 
     | 
    
         
             
            files:
         
     | 
| 
       49 
63 
     | 
    
         
             
            - ".gitignore"
         
     | 
| 
      
 64 
     | 
    
         
            +
            - ".rspec"
         
     | 
| 
       50 
65 
     | 
    
         
             
            - Gemfile
         
     | 
| 
       51 
66 
     | 
    
         
             
            - LICENSE.txt
         
     | 
| 
       52 
67 
     | 
    
         
             
            - README.md
         
     | 
| 
         @@ -54,6 +69,8 @@ files: 
     | 
|
| 
       54 
69 
     | 
    
         
             
            - first_gem_best_carl.gemspec
         
     | 
| 
       55 
70 
     | 
    
         
             
            - lib/first_gem_best_carl.rb
         
     | 
| 
       56 
71 
     | 
    
         
             
            - lib/first_gem_best_carl/version.rb
         
     | 
| 
      
 72 
     | 
    
         
            +
            - spec/first_gem_best_carl_spec.rb
         
     | 
| 
      
 73 
     | 
    
         
            +
            - spec/spec_helper.rb
         
     | 
| 
       57 
74 
     | 
    
         
             
            homepage: ''
         
     | 
| 
       58 
75 
     | 
    
         
             
            licenses:
         
     | 
| 
       59 
76 
     | 
    
         
             
            - MIT
         
     | 
| 
         @@ -78,4 +95,6 @@ rubygems_version: 2.2.0 
     | 
|
| 
       78 
95 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       79 
96 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       80 
97 
     | 
    
         
             
            summary: My first gem. Doesn't do much.
         
     | 
| 
       81 
     | 
    
         
            -
            test_files: 
     | 
| 
      
 98 
     | 
    
         
            +
            test_files:
         
     | 
| 
      
 99 
     | 
    
         
            +
            - spec/first_gem_best_carl_spec.rb
         
     | 
| 
      
 100 
     | 
    
         
            +
            - spec/spec_helper.rb
         
     |