naturalsorter 0.2.4 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -49,7 +49,7 @@ Get newest.
49
49
 
50
50
  You should add this line to your Gemfile
51
51
 
52
- `gem 'naturalsorter', '0.2.3'`
52
+ `gem 'naturalsorter', '0.3.0'`
53
53
 
54
54
  and run this command in your app root directory
55
55
 
@@ -1,3 +1,3 @@
1
1
  module Naturalsorter
2
- VERSION = "0.2.4"
2
+ VERSION = "0.3.0"
3
3
  end
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..gsub(/\-pre[1-9]*$/i, "")
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
@@ -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.2.4
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: &70229582420100 !ruby/object:Gem::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: *70229582420100
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