naturalsorter 3.0.6 → 3.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 58737aa20c36d264fc2e22b3dd5f2c4b47b2e251
4
- data.tar.gz: 04522b3ddd849405d3958858fd931568931701a2
3
+ metadata.gz: 6f901c5d097daae7a6b248ce1c8de2565d689da1
4
+ data.tar.gz: 8bf904b4355e90fc2a64176334eea038db18636f
5
5
  SHA512:
6
- metadata.gz: 65186ffc2744f6f726a3a8f4f87b489ba51367f1b07390ff3e91af79fe925a23ff75c2c253f6282ab466196e2f73f736c78621677a487fe2f6f3755cc419ca05
7
- data.tar.gz: caf52dcd2f2cbbf4b7649df387831fb00a6b47709068a199dcf8703c92c82b82148948bf76ac06d3081060ea2d8c39077e002a3abd123b6ca0b7eef855751004
6
+ metadata.gz: 40371da5502c6a66f244bcf443f0a0fed91f13771ba7a22997896969a3a1c150a412d1144f854926077862feff4ab6ac3ffb48bf784128a281a73f78e2591ae5
7
+ data.tar.gz: 7b6e21aadacca041e5c1d924474b6733c316be7bbb5b74fb14014cc68c12b65b7a1906b59f6cd35ba5294a6f47b8bff80f8f1b33994f7b761bc5315eb2acadfa
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.0.0-p353
1
+ 2.2.2
data/README.markdown CHANGED
@@ -26,7 +26,7 @@ Because the default sort method does not recognize the numbers in the string. Th
26
26
 
27
27
  You should add this line to your Gemfile
28
28
 
29
- `gem 'naturalsorter', '3.0.6'`
29
+ `gem 'naturalsorter', '3.0.7'`
30
30
 
31
31
  and run this command in your app root directory
32
32
 
@@ -1,3 +1,3 @@
1
1
  module Naturalsorter
2
- VERSION = "3.0.6"
2
+ VERSION = "3.0.7"
3
3
  end
data/lib/versioncmp.rb CHANGED
@@ -228,9 +228,11 @@ class Versioncmp
228
228
 
229
229
  def self.replace_x_dev val
230
230
  new_val = String.new(val)
231
- if val.eql?("dev-master")
231
+ if val.eql?("dev-master") || val.eql?("dev-develop")
232
232
  new_val = "9999999"
233
- elsif val.match(/\.x-dev$/)
233
+ elsif val.match(/\Adev-/i)
234
+ new_val = "9999999"
235
+ elsif val.match(/\.x-dev$/i)
234
236
  new_val = val.gsub("x-dev", "9999999")
235
237
  elsif val.match(/-dev$/)
236
238
  new_val = val.gsub("-dev", ".9999999")
@@ -198,4 +198,16 @@ describe Versioncmp do
198
198
  Versioncmp.compare("1.5.2", "1.5.2-patch1").should eql(-1)
199
199
  end
200
200
 
201
+ it "dev-master is bigger than 1.0.0" do
202
+ Versioncmp.compare("dev-master", "1.0.0").should eql(1)
203
+ end
204
+
205
+ it "dev-develop is bigger than 1.0.0" do
206
+ Versioncmp.compare("dev-develop", "1.0.0").should eql(1)
207
+ end
208
+
209
+ it "dev-something is bigger than 1.0.0" do
210
+ Versioncmp.compare("dev-something", "1.0.0").should eql(1)
211
+ end
212
+
201
213
  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.6
4
+ version: 3.0.7
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: 2015-05-13 00:00:00.000000000 Z
12
+ date: 2015-06-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
70
  version: '0'
71
71
  requirements: []
72
72
  rubyforge_project: naturalsorter
73
- rubygems_version: 2.4.6
73
+ rubygems_version: 2.4.7
74
74
  signing_key:
75
75
  specification_version: 4
76
76
  summary: Sorting arrays in natural order