kapost-bootstrapper 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/kapost-bootstrapper.gemspec +1 -0
- data/lib/kapost/bootstrapper.rb +13 -2
- data/lib/kapost/bootstrapper/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 789a27904a6b7944b9237ba7f238e484cc2f71e9
|
4
|
+
data.tar.gz: ab9990a79927f01ec692f1c41170766a21b2219a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c130d5c06ca00326bda3fa8bfce29ac3bdc00ed5346c93b3c54b568810626ecde3003a2c2f64990c246b5800c69d72d2c93ba55c5c7c63a21e9fa3d03fff103d
|
7
|
+
data.tar.gz: 09beccba6b78d9b13a77991085a57733a4b69dfeedfa037d7218c34a6f71a858be5fcbc9c981e5d21a9e7502e085b095fde27d67c5848eb1ff1a8e9c826a68c3
|
data/kapost-bootstrapper.gemspec
CHANGED
@@ -17,6 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
|
+
spec.add_development_dependency "semantic", "~>1.6"
|
20
21
|
spec.add_development_dependency "bundler", "~> 1.12"
|
21
22
|
spec.add_development_dependency "rake", "~> 10.0"
|
22
23
|
spec.add_development_dependency "rspec", "~> 3.0"
|
data/lib/kapost/bootstrapper.rb
CHANGED
@@ -91,8 +91,8 @@ module Kapost
|
|
91
91
|
end
|
92
92
|
|
93
93
|
def right_version?(command, expected_version)
|
94
|
-
version, status =
|
95
|
-
if expected_version[0] ==
|
94
|
+
version, status = get_version(command)
|
95
|
+
if expected_version[0] == "^"
|
96
96
|
next_major = (expected_version[1].to_i + 1).to_s
|
97
97
|
Gem::Version.new(version) >= Gem::Version.new(expected_version[1..-1]) && Gem::Version.new(version) < Gem::Version.new(next_major)
|
98
98
|
elsif expected_version[0] == "="
|
@@ -103,6 +103,17 @@ module Kapost
|
|
103
103
|
end
|
104
104
|
end
|
105
105
|
|
106
|
+
def get_version(command)
|
107
|
+
version, status = cli.capture2e "#{command} --version"
|
108
|
+
if version[0] == "v"
|
109
|
+
version = version[1..-1]
|
110
|
+
elsif version.include?("ruby")
|
111
|
+
version.slice! "ruby "
|
112
|
+
version = version[0..4]
|
113
|
+
else
|
114
|
+
version
|
115
|
+
end
|
116
|
+
end
|
106
117
|
|
107
118
|
def say(message)
|
108
119
|
if block_given?
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kapost-bootstrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Sadauskas
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: semantic
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.6'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|