naturalsorter 3.0.17 → 3.0.18

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: e2ec83d8210db705bf9b0c42f6f1598deb776234
4
- data.tar.gz: d57432047a53d3eaf16062bc6c450a3b5959dbf1
3
+ metadata.gz: 00d43f59d162fae1a70fd22f3362d15c2425c62a
4
+ data.tar.gz: fc581607d0658b4f8bb5392e55a148804821b5aa
5
5
  SHA512:
6
- metadata.gz: 0adf8b4b9d9da01e93dc534f46dfbd2dcc38ea2dea1daa09e6ebc0904d5769c4fb93b581a14c41404d61ad21c46e1f377464118567470de3996c07635983912d
7
- data.tar.gz: 2681419afd96462a8c7854390e63dead3e6f4dbf2d755782469fd1880730ac135e99c2bd6c05ff4835cc4eccb2e667b3dac6b674d9654b3408d9934ffff6fcd9
6
+ metadata.gz: 8949a480245b8db9ea956ed9aec2c4668dcb2b50213d83e16f49d0028444899e08595a65df75f4f9d14dc4edef7df507fc3829ba7e54ae61bba5cde58518aca1
7
+ data.tar.gz: 89a45aa107e5afca1f9a019a42cc2ce5a2cbc763719837d518cdd228311c22a8c7c04f01c546b12509ef58e8de7f77e6e958258412445346abd37ad60cc86e75
@@ -1,3 +1,3 @@
1
1
  module Naturalsorter
2
- VERSION = "3.0.17"
2
+ VERSION = "3.0.18"
3
3
  end
data/lib/versioncmp.rb CHANGED
@@ -222,7 +222,7 @@ class Versioncmp
222
222
 
223
223
  def self.timestamp? part
224
224
  return false if part.to_s.empty?
225
- return part.length() == 8 && part.match(/^[0-9]+$/) != nil
225
+ return part.length() == 9 && part.match(/^[0-9]+$/) != nil
226
226
  end
227
227
 
228
228
 
@@ -23,6 +23,10 @@ describe Versioncmp do
23
23
  expect( Versioncmp.compare("0.6-groovy-1.8-rc1", "0.6-groovy-1.8")).to eql(-1)
24
24
  end
25
25
 
26
+ it "smaler" do
27
+ expect( Versioncmp.compare("0.5.25", "0.5.20170404")).to eql(-1)
28
+ end
29
+
26
30
  it "bigger" do
27
31
  expect( Versioncmp.compare("0.6-groovy-1.7", "0.6-groovy-1.7-rc1")).to eql(1)
28
32
  end
@@ -79,6 +83,10 @@ describe Versioncmp do
79
83
  expect( Versioncmp.compare("2.3", "2.0-beta-1")).to eql(1)
80
84
  end
81
85
 
86
+ it "bigger" do
87
+ expect( Versioncmp.compare("0.5.20170404", "0.5.25")).to eql(1)
88
+ end
89
+
82
90
  it "1.1.1 is bigger than 1.1" do
83
91
  expect( Versioncmp.compare("1.1.1", "1.1")).to eql(1)
84
92
  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.17
4
+ version: 3.0.18
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: 2017-07-10 00:00:00.000000000 Z
12
+ date: 2017-07-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec