pessimize 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -0
- data/CHANGELOG +5 -0
- data/README.md +1 -1
- data/lib/pessimize/gemfile.rb +1 -1
- data/lib/pessimize/version.rb +1 -1
- data/pessimize.gemspec +1 -1
- data/spec/gem_spec.rb +16 -0
- data/spec/gemfile_spec.rb +64 -0
- data/spec/spec_helper.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fe16d5f3ed338da50ef9e974677d68d3a81ed29
|
4
|
+
data.tar.gz: 77d7c52462e561032b06ce9e2561e61e24e3f247
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d43cd538191fb744cf15419cd975e490a03e50238cb3454862311c187e15bc056738bafea92f5469c7746da214fba5aa034939b542f99bf9ea07e8cc11e6e881
|
7
|
+
data.tar.gz: 4edc8c8f15b4c704c12696290e747deaa0e17078d6df97e1113b1d71091adbddbaa7b3a1808379896be4ad04a9eb88c9c18855157a2566c9ef60b2dc4425c172
|
data/.travis.yml
CHANGED
data/CHANGELOG
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
=== Pessimize 0.4.0
|
2
|
+
* Specify version of codeclimate-test-reporter to avert a breaking change (introduced in 1.0.0)
|
3
|
+
* Fix documentation link for pessimistic operator (issue #19)
|
4
|
+
* Support comments in the Gemfile tokenization (issue #15)
|
5
|
+
|
1
6
|
=== Pessimize 0.3.0
|
2
7
|
|
3
8
|
Features:
|
data/README.md
CHANGED
@@ -86,5 +86,5 @@ The pessimistic constraint operator will only allow the final number of the vers
|
|
86
86
|
5. Create new Pull Request
|
87
87
|
|
88
88
|
[1]: http://gembundler.com
|
89
|
-
[2]: http://
|
89
|
+
[2]: http://guides.rubygems.org/patterns/#declaring-dependencies
|
90
90
|
[3]: https://github.com/joonty/pessimize/issues/5
|
data/lib/pessimize/gemfile.rb
CHANGED
data/lib/pessimize/version.rb
CHANGED
data/pessimize.gemspec
CHANGED
@@ -18,7 +18,7 @@ This is for people who work with projects that use bundler, such as rails projec
|
|
18
18
|
gem.add_dependency 'trollop'
|
19
19
|
gem.add_development_dependency 'rspec', '~> 2.13.0'
|
20
20
|
gem.add_development_dependency 'rake', '~> 10.0.3'
|
21
|
-
gem.add_development_dependency
|
21
|
+
gem.add_development_dependency 'codeclimate-test-reporter', '~> 0.6.0'
|
22
22
|
|
23
23
|
gem.files = `git ls-files`.split($/)
|
24
24
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
data/spec/gem_spec.rb
CHANGED
@@ -71,6 +71,22 @@ module Pessimize
|
|
71
71
|
|
72
72
|
end
|
73
73
|
|
74
|
+
context "creating a gem with a comment" do
|
75
|
+
let(:gem) { Gem.new(Ripper.lex('gem "blah" # It blahs')) }
|
76
|
+
subject { gem }
|
77
|
+
|
78
|
+
its(:name) { should == "blah" }
|
79
|
+
|
80
|
+
context "after setting the version" do
|
81
|
+
before do
|
82
|
+
gem.version = "~> 2.1"
|
83
|
+
end
|
84
|
+
|
85
|
+
its(:to_s) { should == 'gem "blah", "~> 2.1" # It blahs' }
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
89
|
+
|
74
90
|
context "creating a gem using new lines for arguments" do
|
75
91
|
let(:gem_string) { <<GEM.strip
|
76
92
|
gem "blah",
|
data/spec/gemfile_spec.rb
CHANGED
@@ -186,5 +186,69 @@ GEM
|
|
186
186
|
its(:to_s) { should == expected_defn }
|
187
187
|
end
|
188
188
|
end
|
189
|
+
|
190
|
+
context "with multiple gem definitions separated with comments" do
|
191
|
+
|
192
|
+
let(:gem_defn) { <<-GEM
|
193
|
+
source "https://rubygems.org"
|
194
|
+
|
195
|
+
gem "monkey", "2.0.0" # a comment to throw things off
|
196
|
+
|
197
|
+
gem "thor", ">= 1.3.0"
|
198
|
+
GEM
|
199
|
+
}
|
200
|
+
|
201
|
+
subject(:gemfile) { Gemfile.new(gem_defn) }
|
202
|
+
|
203
|
+
its(:to_s) { should == gem_defn }
|
204
|
+
|
205
|
+
describe "#gems" do
|
206
|
+
subject(:gems) { gemfile.gems }
|
207
|
+
|
208
|
+
its(:length) { should == 2 }
|
209
|
+
|
210
|
+
describe "the first gem" do
|
211
|
+
subject(:gem) { gems[0] }
|
212
|
+
|
213
|
+
its(:name) { should == "monkey" }
|
214
|
+
its(:version) { should == "2.0.0" }
|
215
|
+
its(:to_s) { should == ' "monkey", "2.0.0" ' }
|
216
|
+
|
217
|
+
context "setting the version" do
|
218
|
+
before do
|
219
|
+
gem.version = "~> 2.0.0"
|
220
|
+
end
|
221
|
+
|
222
|
+
its(:to_s) { should == ' "monkey", "~> 2.0.0" ' }
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
describe "the second gem" do
|
227
|
+
subject { gems[1] }
|
228
|
+
|
229
|
+
its(:name) { should == "thor" }
|
230
|
+
its(:version) { should == ">= 1.3.0" }
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
context "after setting the gem versions" do
|
235
|
+
before do
|
236
|
+
gemfile.gems.each do |gem|
|
237
|
+
gem.version = "~> 1.0.0"
|
238
|
+
end
|
239
|
+
end
|
240
|
+
|
241
|
+
let(:expected_defn) { <<-GEM
|
242
|
+
source "https://rubygems.org"
|
243
|
+
|
244
|
+
gem "monkey", "~> 1.0.0" # a comment to throw things off
|
245
|
+
|
246
|
+
gem "thor", "~> 1.0.0"
|
247
|
+
GEM
|
248
|
+
}
|
249
|
+
|
250
|
+
its(:to_s) { should == expected_defn }
|
251
|
+
end
|
252
|
+
end
|
189
253
|
end
|
190
254
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pessimize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Cairns
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: codeclimate-test-reporter
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 0.6.0
|
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:
|
82
|
+
version: 0.6.0
|
83
83
|
description: |-
|
84
84
|
Add the pessimistic constraint operator to all gems in your Gemfile, restricting the maximum update version.
|
85
85
|
|
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
version: '0'
|
140
140
|
requirements: []
|
141
141
|
rubyforge_project:
|
142
|
-
rubygems_version: 2.2.
|
142
|
+
rubygems_version: 2.5.2.1
|
143
143
|
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: Add the pessimistic constraint operator to all gems in your Gemfile, restricting
|