r10k 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/r10k/module/forge.rb +5 -5
- data/lib/{semver.rb → r10k/semver.rb} +2 -0
- data/lib/r10k/version.rb +1 -1
- data/spec/unit/module/forge_spec.rb +2 -2
- metadata +3 -3
data/lib/r10k/module/forge.rb
CHANGED
@@ -4,7 +4,7 @@ require 'r10k/logging'
|
|
4
4
|
|
5
5
|
require 'fileutils'
|
6
6
|
require 'systemu'
|
7
|
-
require 'semver'
|
7
|
+
require 'r10k/semver'
|
8
8
|
require 'json'
|
9
9
|
|
10
10
|
class R10K::Module::Forge < R10K::Module::Base
|
@@ -26,7 +26,7 @@ class R10K::Module::Forge < R10K::Module::Base
|
|
26
26
|
@owner, @name = name.split('/')
|
27
27
|
|
28
28
|
if args.is_a? String
|
29
|
-
@version = SemVer.new(args)
|
29
|
+
@version = R10K::SemVer.new(args)
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
@@ -62,12 +62,12 @@ class R10K::Module::Forge < R10K::Module::Base
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
-
# @return [SemVer, NilClass]
|
65
|
+
# @return [R10K::SemVer, NilClass]
|
66
66
|
def version
|
67
67
|
if metadata
|
68
|
-
SemVer.new(metadata['version'])
|
68
|
+
R10K::SemVer.new(metadata['version'])
|
69
69
|
else
|
70
|
-
SemVer::MIN
|
70
|
+
R10K::SemVer::MIN
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
@@ -3,6 +3,7 @@
|
|
3
3
|
# We need to subclass Numeric to force range comparisons not to try to iterate over SemVer
|
4
4
|
# and instead use numeric comparisons (eg >, <, >=, <=)
|
5
5
|
# Ruby 1.8 already did this for all ranges, but Ruby 1.9 changed range include behavior
|
6
|
+
module R10K
|
6
7
|
class SemVer < Numeric
|
7
8
|
include Comparable
|
8
9
|
|
@@ -122,3 +123,4 @@ class SemVer < Numeric
|
|
122
123
|
MAX.instance_variable_set(:@major, (1.0/0)) # => Infinity
|
123
124
|
MAX.instance_variable_set(:@vstring, 'vMAX')
|
124
125
|
end
|
126
|
+
end
|
data/lib/r10k/version.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'r10k/module/forge'
|
2
|
-
require 'semver'
|
2
|
+
require 'r10k/semver'
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
5
|
describe R10K::Module::Forge do
|
@@ -78,7 +78,7 @@ describe R10K::Module::Forge do
|
|
78
78
|
subject { described_class.new('branan/eight_hundred', empty_modulepath, '8.0.0') }
|
79
79
|
|
80
80
|
it { should_not be_insync }
|
81
|
-
its(:version) { should eq SemVer::MIN }
|
81
|
+
its(:version) { should eq R10K::SemVer::MIN }
|
82
82
|
|
83
83
|
it "should try to install the module" do
|
84
84
|
expected = %w{install --version=8.0.0 --ignore-dependencies branan/eight_hundred}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: r10k
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-01-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: colored
|
@@ -120,6 +120,7 @@ files:
|
|
120
120
|
- lib/r10k.rb
|
121
121
|
- lib/r10k/errors.rb
|
122
122
|
- lib/r10k/logging.rb
|
123
|
+
- lib/r10k/semver.rb
|
123
124
|
- lib/r10k/registry.rb
|
124
125
|
- lib/r10k/deployment.rb
|
125
126
|
- lib/r10k/settings.rb
|
@@ -161,7 +162,6 @@ files:
|
|
161
162
|
- lib/r10k/module/forge.rb
|
162
163
|
- lib/r10k/module/git.rb
|
163
164
|
- lib/r10k/version.rb
|
164
|
-
- lib/semver.rb
|
165
165
|
- spec/spec_helper.rb
|
166
166
|
- spec/fixtures/module/forge/eight_hundred/metadata.json
|
167
167
|
- spec/fixtures/module/forge/eight_hundred/Modulefile
|