naturalsorter 3.0.16 → 3.0.17

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: 8f548a085d5594758633be73af1a728ef5c8dc60
4
- data.tar.gz: 57c3674fd60409962dfbc2d2226078a4f5e242dd
3
+ metadata.gz: e2ec83d8210db705bf9b0c42f6f1598deb776234
4
+ data.tar.gz: d57432047a53d3eaf16062bc6c450a3b5959dbf1
5
5
  SHA512:
6
- metadata.gz: 2b694d5c2775b1564563651c26d60598045ff969071222777f4f6ade6d4a67f21bc3bbf1dc6727a89822d21964f8608b5503e78f44268652ebd686d4328beacb
7
- data.tar.gz: c3ef52d4b829131567b3c3aea73c609fe8ade23be01cb38aa6808bcc062fdbebcc6acd17b5909aadda19cfd65c731ec7489f6a12cafaa9a33b5cfeb892f51dc7
6
+ metadata.gz: 0adf8b4b9d9da01e93dc534f46dfbd2dcc38ea2dea1daa09e6ebc0904d5769c4fb93b581a14c41404d61ad21c46e1f377464118567470de3996c07635983912d
7
+ data.tar.gz: 2681419afd96462a8c7854390e63dead3e6f4dbf2d755782469fd1880730ac135e99c2bd6c05ff4835cc4eccb2e667b3dac6b674d9654b3408d9934ffff6fcd9
@@ -1,3 +1,3 @@
1
1
  module Naturalsorter
2
- VERSION = "3.0.16"
2
+ VERSION = "3.0.17"
3
3
  end
@@ -9,6 +9,7 @@ class VersionTagRecognizer
9
9
  A_STABILITY_DEV = "dev"
10
10
  A_STABILITY_BUILD = "BUILD"
11
11
  A_STABILITY_PATCH = "patch"
12
+ A_STABILITY_PREVIEW = "preview"
12
13
 
13
14
 
14
15
  def self.value_for( value )
@@ -121,6 +122,7 @@ class VersionTagRecognizer
121
122
 
122
123
  def self.stable? value
123
124
  return false if value.match(/\Adev-/i) || value.match(/-dev\z/i)
125
+ return false if self.preview?( value )
124
126
 
125
127
  return true if value.match(/.+RELEASE.*/i)
126
128
  return true if value.match(/.+FINAL.*/i)
@@ -172,4 +174,8 @@ class VersionTagRecognizer
172
174
  value.match(/.*jbossorg.*$/i)
173
175
  end
174
176
 
177
+ def self.preview? value
178
+ value.match(/-preview\d+-/i) || value.match(/-preview-/i)
179
+ end
180
+
175
181
  end
@@ -135,6 +135,14 @@ describe VersionTagRecognizer do
135
135
  expect( VersionTagRecognizer.release?("garbage-collection-configuration-dev")).to be_falsey
136
136
  end
137
137
 
138
+ it "release? is false" do
139
+ expect( VersionTagRecognizer.release?("2.0.0-preview-final")).to be_falsey
140
+ end
141
+
142
+ it "release? is false" do
143
+ expect( VersionTagRecognizer.release?("2.0.0-preview2-final")).to be_falsey
144
+ end
145
+
138
146
 
139
147
 
140
148
  it "is alpha? is true" do
@@ -301,4 +301,8 @@ describe Versioncmp do
301
301
  expect( Versioncmp.compare("dev-something", "1.0.0")).to eql(1)
302
302
  end
303
303
 
304
+ it "3.21.0-GA is bigger than 3.22.0-CR1" do
305
+ expect( Versioncmp.compare("3.21.0-GA", "3.21.0-CR1")).to eql(1)
306
+ end
307
+
304
308
  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.16
4
+ version: 3.0.17
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-02-08 00:00:00.000000000 Z
12
+ date: 2017-07-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec