immature 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b8287beef2168f5d20a232ca882fc9dd2e0bfb72
4
- data.tar.gz: 05641304225c0feca111fdd4be72814d9af24de7
3
+ metadata.gz: b4c64f9a3db241d0aa38bc3b0e39ec8766c1d22a
4
+ data.tar.gz: 8ea1267a1f5039fc5e3eaae82d930c44524c356c
5
5
  SHA512:
6
- metadata.gz: 5b2ec4b8b195e9e27be1c5a0169cb48724561e36c96d874c96e8f1bc1c1279db081d26ecb9e0081436f5a479dc4b5c79f2e60582b6d480cad801731f77c50f5c
7
- data.tar.gz: 9758293cca22a197621231816091428e5e81d4f1a7a48d87e4020824fd2580a7c3d1ab8fbf303e641d5c1f2bf57683b156ed3941d4de8af7ef1c84c00f1947cb
6
+ metadata.gz: ad2763aca28a26622b7ec12ce88fa7fb34f64f4507f0911a97813188a2e36267aff207364dc458ac57c4ef331b1916a2903a7defd857d51041a8a0eb3d7c28cd
7
+ data.tar.gz: a251f707f422664e64f668aa87f6c2eb1138f38162441082c295df52c98ba0393772c779ffd4062f348776c430e85d0c5ea09755a899c63430809962c944ba3d
data/CHANGES.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Immature Changes
2
2
  ================
3
3
 
4
+ ## v0.0.2 - *2017-12-21*
5
+
6
+ - Updated constraints for dependencies.
7
+ - Fixed Rspec deprecation warnings.
8
+
4
9
  ## v0.0.1 - *2013-10-12*
5
10
 
6
11
  - First version in your pants.
data/immature.gemspec CHANGED
@@ -4,26 +4,26 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'immature/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = 'immature'
8
- spec.version = Immature::VERSION
9
- spec.author = ['Justin Workman']
10
- spec.email = ['xtagon@gmail.com']
11
- spec.summary = 'Add silly, immature endings to sentences.'
12
- spec.description = 'A ruby module to add silly, immature endings to sentences.'
13
- spec.license = 'MIT'
7
+ spec.name = 'immature'
8
+ spec.version = Immature::VERSION
9
+ spec.author = ['Justin Workman']
10
+ spec.email = ['xtagon@gmail.com']
11
+ spec.summary = 'Add silly, immature endings to sentences.'
12
+ spec.description = 'A ruby module to add silly, immature endings to sentences.'
13
+ spec.license = 'MIT'
14
14
 
15
- spec.files = `git ls-files`.split($/)
16
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
- spec.require_paths = ['lib']
15
+ spec.files = `git ls-files`.split($/)
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ['lib']
19
19
 
20
- spec.post_install_message = 'Immature is now installed in your pants.'
20
+ spec.post_install_message = 'Immature is now installed in your pants.'
21
21
 
22
- spec.add_runtime_dependency 'treat', '~> 2.0.7'
22
+ spec.add_runtime_dependency 'treat', '~> 2.1'
23
23
 
24
- spec.add_development_dependency 'bundler', '~> 1.3'
25
- spec.add_development_dependency 'rake'
26
- spec.add_development_dependency 'rspec'
27
- spec.add_development_dependency 'yard', '~> 0.8.7'
28
- spec.add_development_dependency 'redcarpet'
24
+ spec.add_development_dependency 'bundler', '~> 1.3'
25
+ spec.add_development_dependency 'rake', '~> 12.3'
26
+ spec.add_development_dependency 'rspec', '~> 3.7'
27
+ spec.add_development_dependency 'yard', '~> 0.9.12'
28
+ spec.add_development_dependency 'redcarpet'
29
29
  end
data/lib/immature.rb CHANGED
@@ -4,24 +4,24 @@ require 'immature/phrases'
4
4
  require 'treat'
5
5
 
6
6
  module Immature
7
- class << self
8
- # Make a given sentence more immature (in your pants).
9
- #
10
- # The phrase used will be chosen at random from {Immature::PHRASES}.
11
- #
12
- # @example
13
- # Immature.make_fun_of("Show me an example.") #=> "Show me an example in your pants."
14
- #
15
- # @param sentence [#to_s] A normal sentence or paragraph
16
- #
17
- # @return A more immature version of your sentence.
18
- def make_fun_of sentence
19
- immature_phrase = Immature::PHRASES.sample
20
- sentence = Treat::Entities::Sentence.new(sentence.to_s).tokenize
21
- children = sentence.children
22
- last_word_index = children.rindex { |entity| entity.type == :word }
23
- children.insert(last_word_index + 1, Treat::Entities::Word.new(immature_phrase))
24
- sentence.to_s
25
- end
26
- end
7
+ class << self
8
+ # Make a given sentence more immature (in your pants).
9
+ #
10
+ # The phrase used will be chosen at random from {Immature::PHRASES}.
11
+ #
12
+ # @example
13
+ # Immature.make_fun_of("Show me an example.") #=> "Show me an example in your pants."
14
+ #
15
+ # @param sentence [#to_s] A normal sentence or paragraph
16
+ #
17
+ # @return A more immature version of your sentence.
18
+ def make_fun_of sentence
19
+ immature_phrase = Immature::PHRASES.sample
20
+ sentence = Treat::Entities::Sentence.new(sentence.to_s).tokenize
21
+ children = sentence.children
22
+ last_word_index = children.rindex { |entity| entity.type == :word }
23
+ children.insert(last_word_index + 1, Treat::Entities::Word.new(immature_phrase))
24
+ sentence.to_s
25
+ end
26
+ end
27
27
  end
@@ -1,6 +1,6 @@
1
1
  module Immature
2
- # An array of phrases to be used in {Immature.make_fun_of}.
3
- #
4
- # You may replace or add to this list at will. Be creative.
5
- PHRASES = ['in your pants', 'in bed']
2
+ # An array of phrases to be used in {Immature.make_fun_of}.
3
+ #
4
+ # You may replace or add to this list at will. Be creative.
5
+ PHRASES = ['in your pants', 'in bed']
6
6
  end
@@ -1,4 +1,4 @@
1
1
  module Immature
2
- # The currently loaded version of Immature.
3
- VERSION = '0.0.1'
2
+ # The currently loaded version of Immature.
3
+ VERSION = '0.0.2'
4
4
  end
@@ -1,8 +1,8 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Immature::PHRASES do
4
- it 'contains essential immaturities' do
5
- subject.should include 'in bed'
6
- subject.should include 'in your pants'
7
- end
4
+ it 'contains essential immaturities' do
5
+ expect(subject).to include('in bed')
6
+ expect(subject).to include('in your pants')
7
+ end
8
8
  end
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Immature::VERSION do
4
- it 'is a valid version string' do
5
- subject.should =~ /\A\d+\.\d+\.\d+(-\w+)?\Z/
6
- end
4
+ it 'is a valid version string' do
5
+ expect(subject).to match(/\A\d+\.\d+\.\d+(-\w+)?\Z/)
6
+ end
7
7
  end
@@ -1,15 +1,17 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Immature do
4
- describe '.make_fun_of' do
5
- it 'adds immature phrases to a sentence' do
6
- Immature::PHRASES.stub(:sample).and_return('in your pants')
7
- Immature.make_fun_of('This is a test.').should == 'This is a test in your pants.'
8
- Immature.make_fun_of('Is this working?!').should == 'Is this working in your pants?!'
9
-
10
- Immature::PHRASES.stub(:sample).and_return('in bed')
11
- Immature.make_fun_of('This is a test.').should == 'This is a test in bed.'
12
- Immature.make_fun_of('Is this working?!').should == 'Is this working in bed?!'
13
- end
14
- end
4
+ describe '.make_fun_of' do
5
+ it 'adds immature phrases to a sentence' do
6
+ allow(Immature::PHRASES).to receive(:sample).and_return('in your pants')
7
+
8
+ expect(Immature.make_fun_of('This is a test.')).to eq('This is a test in your pants.')
9
+ expect(Immature.make_fun_of('Is this working?!')).to eq('Is this working in your pants?!')
10
+
11
+ allow(Immature::PHRASES).to receive(:sample).and_return('in bed')
12
+
13
+ expect(Immature.make_fun_of('This is a test.')).to eq('This is a test in bed.')
14
+ expect(Immature.make_fun_of('Is this working?!')).to eq('Is this working in bed?!')
15
+ end
16
+ end
15
17
  end
data/spec/spec_helper.rb CHANGED
@@ -2,13 +2,12 @@ require 'immature'
2
2
 
3
3
  # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
4
4
  RSpec.configure do |config|
5
- config.treat_symbols_as_metadata_keys_with_true_values = true
6
- config.run_all_when_everything_filtered = true
7
- config.filter_run :focus
5
+ config.run_all_when_everything_filtered = true
6
+ config.filter_run :focus
8
7
 
9
- # Run specs in random order to surface order dependencies. If you find an
10
- # order dependency and want to debug it, you can fix the order by providing
11
- # the seed, which is printed after each run.
12
- # --seed 1234
13
- config.order = 'random'
8
+ # Run specs in random order to surface order dependencies. If you find an
9
+ # order dependency and want to debug it, you can fix the order by providing
10
+ # the seed, which is printed after each run.
11
+ # --seed 1234
12
+ config.order = 'random'
14
13
  end
metadata CHANGED
@@ -1,97 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: immature
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Workman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-13 00:00:00.000000000 Z
11
+ date: 2017-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: treat
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.7
19
+ version: '2.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.0.7
26
+ version: '2.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.3'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '12.3'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '12.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '3.7'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '3.7'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: yard
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.8.7
75
+ version: 0.9.12
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.8.7
82
+ version: 0.9.12
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: redcarpet
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  description: A ruby module to add silly, immature endings to sentences.
@@ -101,9 +101,9 @@ executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
- - .gitignore
105
- - .rspec
106
- - .yardopts
104
+ - ".gitignore"
105
+ - ".rspec"
106
+ - ".yardopts"
107
107
  - CHANGES.md
108
108
  - Gemfile
109
109
  - LICENSE.txt
@@ -127,17 +127,17 @@ require_paths:
127
127
  - lib
128
128
  required_ruby_version: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - '>='
130
+ - - ">="
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0'
133
133
  required_rubygems_version: !ruby/object:Gem::Requirement
134
134
  requirements:
135
- - - '>='
135
+ - - ">="
136
136
  - !ruby/object:Gem::Version
137
137
  version: '0'
138
138
  requirements: []
139
139
  rubyforge_project:
140
- rubygems_version: 2.0.3
140
+ rubygems_version: 2.6.14
141
141
  signing_key:
142
142
  specification_version: 4
143
143
  summary: Add silly, immature endings to sentences.
@@ -146,4 +146,3 @@ test_files:
146
146
  - spec/immature/version_spec.rb
147
147
  - spec/immature_spec.rb
148
148
  - spec/spec_helper.rb
149
- has_rdoc: