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 +4 -4
- data/README.markdown +1 -1
- data/lib/naturalsorter/version.rb +1 -1
- data/lib/version_tag_recognizer.rb +4 -0
- data/spec/version_tag_recognizer_spec.rb +14 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2493a58a3718f52a619b22998d7cc68c43d21538
|
4
|
+
data.tar.gz: 4800f0e8937b93116189ff66abda5fbd3ff9bb1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59744980620cdd08dcf917e02644ff0ea0d996ec4cc67610e0c892fe411c1707b5f937f26bb319b551083ec40ba3592d52f342d638cccacf8a3c93fd9117eceb
|
7
|
+
data.tar.gz: ffa9e83d9cbbc9bce05e3e8f8babe317302296d92ca3575be36de463389cf29b2cca586939cb572cde1665697ccbc87c506d072311d6e803250369249368366c
|
data/README.markdown
CHANGED
@@ -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
|