naturalsorter 3.0.7 → 3.0.8

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: 6f901c5d097daae7a6b248ce1c8de2565d689da1
4
- data.tar.gz: 8bf904b4355e90fc2a64176334eea038db18636f
3
+ metadata.gz: 2493a58a3718f52a619b22998d7cc68c43d21538
4
+ data.tar.gz: 4800f0e8937b93116189ff66abda5fbd3ff9bb1b
5
5
  SHA512:
6
- metadata.gz: 40371da5502c6a66f244bcf443f0a0fed91f13771ba7a22997896969a3a1c150a412d1144f854926077862feff4ab6ac3ffb48bf784128a281a73f78e2591ae5
7
- data.tar.gz: 7b6e21aadacca041e5c1d924474b6733c316be7bbb5b74fb14014cc68c12b65b7a1906b59f6cd35ba5294a6f47b8bff80f8f1b33994f7b761bc5315eb2acadfa
6
+ metadata.gz: 59744980620cdd08dcf917e02644ff0ea0d996ec4cc67610e0c892fe411c1707b5f937f26bb319b551083ec40ba3592d52f342d638cccacf8a3c93fd9117eceb
7
+ data.tar.gz: ffa9e83d9cbbc9bce05e3e8f8babe317302296d92ca3575be36de463389cf29b2cca586939cb572cde1665697ccbc87c506d072311d6e803250369249368366c
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.7'`
29
+ `gem 'naturalsorter', '3.0.8'`
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.7"
2
+ VERSION = "3.0.8"
3
3
  end
@@ -93,6 +93,8 @@ class VersionTagRecognizer
93
93
  spliti = version.split("@")
94
94
  return spliti[1]
95
95
  else
96
+ return A_STABILITY_DEV if version.match(/\Adev-/i) || version.match(/-dev\z/i)
97
+
96
98
  if self.stable? version
97
99
  return A_STABILITY_STABLE
98
100
  elsif self.patch? version
@@ -118,6 +120,8 @@ class VersionTagRecognizer
118
120
  end
119
121
 
120
122
  def self.stable? value
123
+ return false if value.match(/\Adev-/i) || value.match(/-dev\z/i)
124
+
121
125
  return true if value.match(/.+RELEASE.*/i)
122
126
  return true if value.match(/.+FINAL.*/i)
123
127
  return true if value.match(/.+SP.*/i)
@@ -122,6 +122,14 @@ describe VersionTagRecognizer do
122
122
  VersionTagRecognizer.release?("2.0-m4").should be_falsey
123
123
  end
124
124
 
125
+ it "release? is false" do
126
+ VersionTagRecognizer.release?("dev-garbage-collection-configuration").should be_falsey
127
+ end
128
+
129
+ it "release? is false" do
130
+ VersionTagRecognizer.release?("garbage-collection-configuration-dev").should be_falsey
131
+ end
132
+
125
133
 
126
134
 
127
135
  it "is alpha? is true" do
@@ -345,6 +353,12 @@ describe VersionTagRecognizer do
345
353
  end
346
354
 
347
355
 
356
+ it "stability_tag_for returns false" do
357
+ VersionTagRecognizer.stability_tag_for( "dev-garbage-collection-configuration").should eql(VersionTagRecognizer::A_STABILITY_DEV)
358
+ end
359
+
360
+
361
+
348
362
 
349
363
 
350
364
  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.7
4
+ version: 3.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - reiz