rubygems_allow-pre-releases 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +9 -9
- data/.gitignore +1 -0
- data/lib/rubygems_allow-pre-releases/version.rb +1 -1
- data/lib/rubygems_plugin.rb +3 -0
- data/spec/gem_version_spec.rb +17 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OTIxZTRkZmViNTQzMDI5M2Y1NmZhYjdhYjFhYjdhOWJiYzNhNGEzZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
7
|
-
|
6
|
+
Njk1MDc5M2M3MGFjODU2ZGE2MjFlMDlhNmZjNzM5ZDE0NDE4Mjg4ZQ==
|
7
|
+
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTBkNDIwZDA0N2NhOGZkN2JlZTc0ODBmNDM5NWYwMjgyZjI0ZjIwMzUxYWFj
|
10
|
+
ZTUwOGU5ZjFjMDZjNGUyZDhmMTUxNDA2YjQ3YjRlMTAzZjU0NGYzODdlZWUw
|
11
|
+
ZGNlMmY1ZjdmZTdiMGUzNDMzYTM0NDZiMjk4ZDY2NzI3MzA0ODY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZmRhNDBkYjI3OTRiNWUxNTJkZGJhMjM5YjQ1ZTQxOTIyNTExODhjZWQyZTBl
|
14
|
+
OWY3ZDI5N2Q0MGQ1MGJmZTBlZGU1ZmUzMDBhODExM2IyMGYwMmM4YjY3Yzcy
|
15
|
+
ZTA0OTc4NDEyYjMzYzhkOTdhY2Q2YzI4ZWVhOWY4ZTk4MGIxZjI=
|
data/.gitignore
CHANGED
data/lib/rubygems_plugin.rb
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
if Gem::Version.new(Gem::VERSION) < Gem::Version.new('2.1.0') then
|
2
2
|
|
3
|
+
warn "loading plugin patch for Gem::Version"
|
4
|
+
|
3
5
|
class Gem::Version
|
4
6
|
|
5
7
|
def self.correct? version
|
8
|
+
warn "checking version string with patch regex"
|
6
9
|
version.to_s =~ /\A\s*([0-9]+(?>\.[0-9a-zA-Z]+)*(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?)?\s*\z/
|
7
10
|
end
|
8
11
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Gem::Version do
|
4
|
+
|
5
|
+
describe ".correct?" do
|
6
|
+
it "accept versions like 123.123.123-alpha-123" do
|
7
|
+
Gem::Version.correct?("123.123.123-alpha-123").should be_true
|
8
|
+
end
|
9
|
+
it "still accepts versions like 123.123.123" do
|
10
|
+
Gem::Version.correct?("123.123.123").should be_true
|
11
|
+
end
|
12
|
+
it "returns false when passing a bad version string" do
|
13
|
+
Gem::Version.correct?("bob-steve.matt&").should be_false
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubygems_allow-pre-releases
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Moses
|
@@ -83,6 +83,7 @@ files:
|
|
83
83
|
- lib/rubygems_allow-pre-releases/version.rb
|
84
84
|
- lib/rubygems_plugin.rb
|
85
85
|
- rubygems_allow-pre-releases.gemspec
|
86
|
+
- spec/gem_version_spec.rb
|
86
87
|
- spec/spec_helper.rb
|
87
88
|
homepage: https://github.com/zebardy/rubygems_allow-pre-releases
|
88
89
|
licenses:
|
@@ -104,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
105
|
version: '0'
|
105
106
|
requirements: []
|
106
107
|
rubyforge_project:
|
107
|
-
rubygems_version: 2.
|
108
|
+
rubygems_version: 2.1.11
|
108
109
|
signing_key:
|
109
110
|
specification_version: 4
|
110
111
|
summary: Enable pre release version numbers in older versions of rubygems
|