immature 0.0.1 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +3 -0
- data/CHANGES.md +11 -0
- data/immature.gemspec +20 -18
- data/lib/immature/phrases.rb +4 -4
- data/lib/immature/version.rb +2 -2
- data/lib/immature.rb +20 -20
- data/spec/immature/phrases_spec.rb +4 -4
- data/spec/immature/version_spec.rb +3 -3
- data/spec/immature_spec.rb +13 -11
- data/spec/spec_helper.rb +7 -8
- metadata +33 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c99751667877d27aa276ede1cd627439dc8f022d2ae3a698dbc130425444c225
|
4
|
+
data.tar.gz: 5733946205eec2684c8937452903cb9d29ea83d5527b0f51587b2e53f928f93a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84a715ea25b8ec19624352f8adc6ca984322f2ca19ed602303a519b51488a9d7bdfe6401f25fd6682c4817cf84e747849c4f0e955dbe78a0b8c686d44d91436e
|
7
|
+
data.tar.gz: aec1c95a36268b9646e0f77b2ebfad3b844e956298255373e8803136a16bc74b42805d828489c499f0fe4a79d2bd20ada7a17823bedac03ef111e9f791a58837
|
data/.travis.yml
ADDED
data/CHANGES.md
CHANGED
@@ -1,6 +1,17 @@
|
|
1
1
|
Immature Changes
|
2
2
|
================
|
3
3
|
|
4
|
+
## v0.0.3 - *2021-05-25*
|
5
|
+
|
6
|
+
- Raised Bundler dev dependency to >= 2.2.10 for security fixes
|
7
|
+
- https://github.com/advisories/GHSA-fp4w-jxhp-m23p
|
8
|
+
- https://github.com/advisories/GHSA-g98m-96g9-wfjq
|
9
|
+
|
10
|
+
## v0.0.2 - *2017-12-21*
|
11
|
+
|
12
|
+
- Updated constraints for dependencies.
|
13
|
+
- Fixed Rspec deprecation warnings.
|
14
|
+
|
4
15
|
## v0.0.1 - *2013-10-12*
|
5
16
|
|
6
17
|
- First version in your pants.
|
data/immature.gemspec
CHANGED
@@ -4,26 +4,28 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'immature/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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
|
-
|
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.metadata = { 'rubygems_mfa_required' => 'true' }
|
19
16
|
|
20
|
-
|
17
|
+
spec.files = `git ls-files`.split($/)
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
+
spec.require_paths = ['lib']
|
21
21
|
|
22
|
-
|
22
|
+
spec.post_install_message = 'Immature is now installed in your pants.'
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
24
|
+
spec.add_runtime_dependency 'treat', '~> 2.1'
|
25
|
+
|
26
|
+
spec.add_development_dependency 'bundler', '>= 2.2.10'
|
27
|
+
spec.add_development_dependency 'rake', '~> 12.3'
|
28
|
+
spec.add_development_dependency 'rspec', '~> 3.7'
|
29
|
+
spec.add_development_dependency 'yard', '~> 0.9.12'
|
30
|
+
spec.add_development_dependency 'redcarpet'
|
29
31
|
end
|
data/lib/immature/phrases.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Immature
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
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
|
data/lib/immature/version.rb
CHANGED
data/lib/immature.rb
CHANGED
@@ -4,24 +4,24 @@ require 'immature/phrases'
|
|
4
4
|
require 'treat'
|
5
5
|
|
6
6
|
module Immature
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
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,8 +1,8 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Immature::PHRASES do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
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
|
data/spec/immature_spec.rb
CHANGED
@@ -1,15 +1,17 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Immature do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
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
|
-
|
6
|
-
|
7
|
-
config.filter_run :focus
|
5
|
+
config.run_all_when_everything_filtered = true
|
6
|
+
config.filter_run :focus
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Workman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-15 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.
|
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.
|
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
|
-
version:
|
33
|
+
version: 2.2.10
|
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
|
-
version:
|
40
|
+
version: 2.2.10
|
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: '
|
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: '
|
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: '
|
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: '
|
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.
|
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.
|
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,10 @@ executables: []
|
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
-
- .gitignore
|
105
|
-
- .rspec
|
106
|
-
- .
|
104
|
+
- ".gitignore"
|
105
|
+
- ".rspec"
|
106
|
+
- ".travis.yml"
|
107
|
+
- ".yardopts"
|
107
108
|
- CHANGES.md
|
108
109
|
- Gemfile
|
109
110
|
- LICENSE.txt
|
@@ -120,24 +121,24 @@ files:
|
|
120
121
|
homepage:
|
121
122
|
licenses:
|
122
123
|
- MIT
|
123
|
-
metadata:
|
124
|
+
metadata:
|
125
|
+
rubygems_mfa_required: 'true'
|
124
126
|
post_install_message: Immature is now installed in your pants.
|
125
127
|
rdoc_options: []
|
126
128
|
require_paths:
|
127
129
|
- lib
|
128
130
|
required_ruby_version: !ruby/object:Gem::Requirement
|
129
131
|
requirements:
|
130
|
-
- -
|
132
|
+
- - ">="
|
131
133
|
- !ruby/object:Gem::Version
|
132
134
|
version: '0'
|
133
135
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
134
136
|
requirements:
|
135
|
-
- -
|
137
|
+
- - ">="
|
136
138
|
- !ruby/object:Gem::Version
|
137
139
|
version: '0'
|
138
140
|
requirements: []
|
139
|
-
|
140
|
-
rubygems_version: 2.0.3
|
141
|
+
rubygems_version: 3.3.18
|
141
142
|
signing_key:
|
142
143
|
specification_version: 4
|
143
144
|
summary: Add silly, immature endings to sentences.
|
@@ -146,4 +147,3 @@ test_files:
|
|
146
147
|
- spec/immature/version_spec.rb
|
147
148
|
- spec/immature_spec.rb
|
148
149
|
- spec/spec_helper.rb
|
149
|
-
has_rdoc:
|