semverse 1.2.1 → 2.0.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 +11 -6
- data/Gemfile +1 -1
- data/README.md +14 -8
- data/lib/semverse/gem_version.rb +1 -1
- data/semverse.gemspec +1 -1
- data/spec/spec_helper.rb +0 -1
- data/spec/unit/semverse/constraint_spec.rb +1 -1
- data/spec/unit/semverse/version_spec.rb +13 -13
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acd0de1d4331bcafe552f3a60d11caedf7a2ca3c
|
4
|
+
data.tar.gz: c7e9348008c15c128bf803c903b737464f44bba1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 949b52f5f44bbd50e23a4a900566dc68d6be71fd6dd635e6cd1f7efcb18376aa0d137934b11e78e116f9bf528f71803ee0604e7018902b390f4d5789dcb7ed40
|
7
|
+
data.tar.gz: 73bc85a5eac21780da8b3225b2aa05f3f989027a8a4f1ac7d745704a832e9dfa3f558a51df72d49e2782873cb1e180a656bc5416e57e44aa62aa032b0236be6f
|
data/.travis.yml
CHANGED
@@ -1,8 +1,13 @@
|
|
1
|
-
|
1
|
+
sudo: false
|
2
2
|
language: ruby
|
3
|
+
cache: bundler
|
3
4
|
bundler_args: --without development
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
matrix:
|
6
|
+
include:
|
7
|
+
- rvm: 2.1.9
|
8
|
+
- rvm: 2.2.5
|
9
|
+
- rvm: 2.3.1
|
10
|
+
allow_failures:
|
11
|
+
- rvm: 2.3.1
|
12
|
+
|
13
|
+
script: bundle exec rake spec
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,6 @@
|
|
1
1
|
# Semverse
|
2
|
-
[![Gem Version](http://img.shields.io/gem/v/semverse.svg)][gem]
|
3
|
-
[![Build Status](http://img.shields.io/travis/berkshelf/semverse.svg)][travis]
|
4
2
|
|
5
|
-
[gem]
|
6
|
-
[travis]: http://travis-ci.org/berkshelf/semverse
|
3
|
+
[![Gem Version](http://img.shields.io/gem/v/semverse.svg)][gem] [![Build Status](http://img.shields.io/travis/berkshelf/semverse.svg)][travis]
|
7
4
|
|
8
5
|
An elegant library for representing and comparing SemVer versions and constraints
|
9
6
|
|
@@ -11,15 +8,21 @@ An elegant library for representing and comparing SemVer versions and constraint
|
|
11
8
|
|
12
9
|
Add this line to your application's Gemfile:
|
13
10
|
|
14
|
-
|
11
|
+
```
|
12
|
+
gem 'semverse'
|
13
|
+
```
|
15
14
|
|
16
15
|
And then execute:
|
17
16
|
|
18
|
-
|
17
|
+
```
|
18
|
+
$ bundle
|
19
|
+
```
|
19
20
|
|
20
21
|
Or install it yourself as:
|
21
22
|
|
22
|
-
|
23
|
+
```
|
24
|
+
$ gem install semverse
|
25
|
+
```
|
23
26
|
|
24
27
|
## Usage
|
25
28
|
|
@@ -27,8 +30,11 @@ TODO: Write usage instructions here
|
|
27
30
|
|
28
31
|
## Contributing
|
29
32
|
|
30
|
-
1. Fork it ( http://github.com/berkshelf/semverse/fork )
|
33
|
+
1. Fork it ( <http://github.com/berkshelf/semverse/fork> )
|
31
34
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
32
35
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
33
36
|
4. Push to the branch (`git push origin my-new-feature`)
|
34
37
|
5. Create new Pull Request
|
38
|
+
|
39
|
+
[gem]: https://rubygems.org/gems/semverse
|
40
|
+
[travis]: http://travis-ci.org/berkshelf/semverse
|
data/lib/semverse/gem_version.rb
CHANGED
data/semverse.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
|
-
spec.required_ruby_version = ">= 1.
|
20
|
+
spec.required_ruby_version = ">= 2.1.0"
|
21
21
|
|
22
22
|
spec.add_development_dependency "bundler", "~> 1.5"
|
23
23
|
spec.add_development_dependency "rake"
|
data/spec/spec_helper.rb
CHANGED
@@ -224,12 +224,12 @@ describe Semverse::Version do
|
|
224
224
|
|
225
225
|
describe "::split" do
|
226
226
|
it "returns an array containing 5 elements" do
|
227
|
-
expect(subject.split("1.2.0-alpha.1")).to
|
227
|
+
expect(subject.split("1.2.0-alpha.1").size).to eq(5)
|
228
228
|
end
|
229
229
|
|
230
230
|
context "given a string only containing a major, minor and patch version" do
|
231
231
|
it "returns an array containing 4 elements" do
|
232
|
-
expect(subject.split("1.2.3")).to
|
232
|
+
expect(subject.split("1.2.3").size).to eq(5)
|
233
233
|
end
|
234
234
|
|
235
235
|
it "returns nil as fourth element" do
|
@@ -243,7 +243,7 @@ describe Semverse::Version do
|
|
243
243
|
|
244
244
|
context "given a string only containing a major and minor version" do
|
245
245
|
it "returns an array containing 4 elements" do
|
246
|
-
expect(subject.split("1.2")).to
|
246
|
+
expect(subject.split("1.2").size).to eq(3)
|
247
247
|
end
|
248
248
|
|
249
249
|
it "returns 0 as the third element" do
|
@@ -257,7 +257,7 @@ describe Semverse::Version do
|
|
257
257
|
|
258
258
|
context "given a string with only a major version" do
|
259
259
|
it "returns an array containing 3 elements" do
|
260
|
-
expect(subject.split("1")).to
|
260
|
+
expect(subject.split("1").size).to eq(3)
|
261
261
|
end
|
262
262
|
|
263
263
|
it "returns 0 as the second element" do
|
@@ -284,13 +284,13 @@ describe Semverse::Version do
|
|
284
284
|
describe "::coerce" do
|
285
285
|
|
286
286
|
it "coerces a String to a Version object" do
|
287
|
-
subject.coerce("1.0.0").
|
287
|
+
expect(subject.coerce("1.0.0")).to eql(subject.new("1.0.0"))
|
288
288
|
end
|
289
289
|
|
290
290
|
it "returns an object of the desired class without any additional processing" do
|
291
291
|
version = subject.new("1.0.0")
|
292
292
|
# we want object equality here to prove that the exact object was returned
|
293
|
-
subject.coerce(version).
|
293
|
+
expect(subject.coerce(version)).to equal(version)
|
294
294
|
end
|
295
295
|
|
296
296
|
end
|
@@ -300,34 +300,34 @@ describe Semverse::Version do
|
|
300
300
|
describe "#pre_release?" do
|
301
301
|
context "when a pre-release value is set" do
|
302
302
|
subject { described_class.new("1.2.3-alpha").pre_release? }
|
303
|
-
it { should
|
303
|
+
it { should be true }
|
304
304
|
end
|
305
305
|
|
306
306
|
context "when no pre-release value is set" do
|
307
307
|
subject { described_class.new("1.2.3").pre_release? }
|
308
|
-
it { should
|
308
|
+
it { should be false }
|
309
309
|
end
|
310
310
|
end
|
311
311
|
|
312
312
|
describe "#zero?" do
|
313
313
|
context "major, minor and patch are equal to 0" do
|
314
314
|
subject { described_class.new("0.0.0").zero? }
|
315
|
-
it { should
|
315
|
+
it { should be true }
|
316
316
|
end
|
317
317
|
|
318
318
|
context "major is not equal to 0" do
|
319
319
|
subject { described_class.new("1.0.0").zero? }
|
320
|
-
it { should
|
320
|
+
it { should be false }
|
321
321
|
end
|
322
322
|
|
323
323
|
context "minor is not equal to 0" do
|
324
324
|
subject { described_class.new("0.1.0").zero? }
|
325
|
-
it { should
|
325
|
+
it { should be false }
|
326
326
|
end
|
327
327
|
|
328
328
|
context "patch is not equal to 0" do
|
329
329
|
subject { described_class.new("0.0.1").zero? }
|
330
|
-
it { should
|
330
|
+
it { should be false }
|
331
331
|
end
|
332
332
|
end
|
333
333
|
|
@@ -335,7 +335,7 @@ describe Semverse::Version do
|
|
335
335
|
subject { Semverse::Version.new("1.0.0-rc.1+build.1") }
|
336
336
|
|
337
337
|
it "returns a string containing the major.minor.patch-pre_release+build" do
|
338
|
-
subject.to_s.
|
338
|
+
expect(subject.to_s).to eq("1.0.0-rc.1+build.1")
|
339
339
|
end
|
340
340
|
end
|
341
341
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: semverse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamie Winsor
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -75,7 +75,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
75
75
|
requirements:
|
76
76
|
- - ">="
|
77
77
|
- !ruby/object:Gem::Version
|
78
|
-
version: 1.
|
78
|
+
version: 2.1.0
|
79
79
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - ">="
|
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
83
|
version: '0'
|
84
84
|
requirements: []
|
85
85
|
rubyforge_project:
|
86
|
-
rubygems_version: 2.
|
86
|
+
rubygems_version: 2.6.6
|
87
87
|
signing_key:
|
88
88
|
specification_version: 4
|
89
89
|
summary: An elegant library for representing and comparing SemVer versions and constraints
|
@@ -92,4 +92,3 @@ test_files:
|
|
92
92
|
- spec/unit/semverse/constraint_spec.rb
|
93
93
|
- spec/unit/semverse/version_spec.rb
|
94
94
|
- spec/unit/semverse_spec.rb
|
95
|
-
has_rdoc:
|