naturalsorter 3.0.22 → 3.0.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/naturalsorter/version.rb +1 -1
- data/lib/versioncmp.rb +1 -1
- data/spec/naturalsorter/versioncmp_spec.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9290de5341a8ef7b6b9be56c88f1681f809a3c5228a88747c9e2ea45d6c514cc
|
4
|
+
data.tar.gz: d4d8428298d684556241c1cdd9d9fb55e87214e1f593808abaa7072fb660ae6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea5558167d520a1593f1465f4523cc31d0bda2cf84a0ff0412108d5b15b166e2a71134fda097e16efeb263257d8c95496fb3b7cb756a858797d6fad0b899d56b
|
7
|
+
data.tar.gz: 4b6347068aac95054d835b9498157c0d68bc71d3ed62790412f977b89c9a9785171c8a463da11888427731e2aeacabf0a2a9f16f016dcf24e687318b138cdcd1
|
data/lib/versioncmp.rb
CHANGED
@@ -287,7 +287,7 @@ class Versioncmp
|
|
287
287
|
|
288
288
|
def self.replace_x_dev val
|
289
289
|
new_val = String.new(val)
|
290
|
-
if
|
290
|
+
if ['dev-master', 'master', 'trunk'].include?( val )
|
291
291
|
new_val = "99999999999"
|
292
292
|
elsif val.eql?("dev-develop")
|
293
293
|
new_val = "9999999999"
|
@@ -95,6 +95,14 @@ describe Versioncmp do
|
|
95
95
|
expect( Versioncmp.compare("dev-master", "10.10.999")).to eql(1)
|
96
96
|
end
|
97
97
|
|
98
|
+
it "master is bigger than 10.10.999" do
|
99
|
+
expect( Versioncmp.compare("master", "10.10.999")).to eql(1)
|
100
|
+
end
|
101
|
+
|
102
|
+
it "trunk is bigger than 10.10.999" do
|
103
|
+
expect( Versioncmp.compare("trunk", "10.10.999")).to eql(1)
|
104
|
+
end
|
105
|
+
|
98
106
|
it "2.2.x-dev is bigger than 2.2.1" do
|
99
107
|
expect( Versioncmp.compare("2.2.x-dev", "2.2.1")).to eql(1)
|
100
108
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: naturalsorter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- reiz
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-06-
|
12
|
+
date: 2020-06-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|