naturalsorter 0.2.4 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.markdown +1 -1
- data/lib/naturalsorter/version.rb +1 -1
- data/lib/versioncmp.rb +1 -1
- data/spec/versioncmp_spec.rb +4 -0
- metadata +3 -3
data/README.markdown
CHANGED
data/lib/versioncmp.rb
CHANGED
|
@@ -105,7 +105,7 @@ class Versioncmp
|
|
|
105
105
|
end
|
|
106
106
|
elsif (Versioncmp.isPre(big))
|
|
107
107
|
bigwithoutPre = big.gsub(/\.pre[1-9]*$/i, "")
|
|
108
|
-
bigwithoutPre = bigwithoutPre
|
|
108
|
+
bigwithoutPre = bigwithoutPre.gsub(/\-pre[1-9]*$/i, "")
|
|
109
109
|
if (Versioncmp.compareString(bigwithoutPre, small) == 0)
|
|
110
110
|
return Versioncmp.getRcValue(a, b)
|
|
111
111
|
end
|
data/spec/versioncmp_spec.rb
CHANGED
|
@@ -54,6 +54,10 @@ describe Versioncmp do
|
|
|
54
54
|
Versioncmp.compare("3.1-jbossorg-1", "3.1").should eql(-1)
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
+
it "smaller 3.1-pre1" do
|
|
58
|
+
Versioncmp.compare("3.1-pre1", "3.1").should eql(-1)
|
|
59
|
+
end
|
|
60
|
+
|
|
57
61
|
it "bigger RC" do
|
|
58
62
|
Versioncmp.compare("1.1.rc3", "1.1.rc2").should eql(1)
|
|
59
63
|
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: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -13,7 +13,7 @@ date: 2012-04-06 00:00:00.000000000Z
|
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rspec
|
|
16
|
-
requirement: &
|
|
16
|
+
requirement: &70191723925940 !ruby/object:Gem::Requirement
|
|
17
17
|
none: false
|
|
18
18
|
requirements:
|
|
19
19
|
- - ~>
|
|
@@ -21,7 +21,7 @@ dependencies:
|
|
|
21
21
|
version: '2.6'
|
|
22
22
|
type: :development
|
|
23
23
|
prerelease: false
|
|
24
|
-
version_requirements: *
|
|
24
|
+
version_requirements: *70191723925940
|
|
25
25
|
description: This GEM is sorting Arrays in a natural order. a2 < a10
|
|
26
26
|
email:
|
|
27
27
|
- robert.reiz@gmx.com
|