knife-spork 1.7.1 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +7 -0
- data/lib/knife-spork/runner.rb +12 -6
- data/lib/knife-spork/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e8d36ad90f20dbe5a5b2a473862a010b842ccbc8038d8437094b10f4c2107b09
|
4
|
+
data.tar.gz: 34ad1ffb10bbc77b02b9a3cd20235baf73d3a09d5e97244ac547a036da2d279c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50630ebcc3d3183b04430cdfde3e01d30e76de268080b1dd62ff4cbd372569a91b71f59ae7a18cf3d7ae279e59dd4a569e893d0fd0c08f4dea865dcbfc863f33
|
7
|
+
data.tar.gz: 8520fc4d6359f811446fbc3d6112ef0ff26e9526c87651b7f1e6ac50afbdc6651c3252114d134822850c5673326fc56d05667c6e61590ebb4590a86f60b27adc
|
data/CHANGELOG.md
CHANGED
data/lib/knife-spork/runner.rb
CHANGED
@@ -38,7 +38,7 @@ module KnifeSpork
|
|
38
38
|
|
39
39
|
environments = [ @environments || @environment ].flatten.compact.collect{|environment| environment.is_a?(::Chef::Environment) ? environment : load_environment_from_file(environment)}.sort{|a,b| a.name.to_s <=> b.name.to_s}
|
40
40
|
environment_diffs = @environment_diffs
|
41
|
-
|
41
|
+
|
42
42
|
KnifeSpork::Plugins.run(
|
43
43
|
:config => spork_config,
|
44
44
|
:hook => hook.to_sym,
|
@@ -57,7 +57,7 @@ module KnifeSpork
|
|
57
57
|
|
58
58
|
def load_environments_and_cookbook
|
59
59
|
ensure_environment_and_cookbook_provided!
|
60
|
-
|
60
|
+
|
61
61
|
if @name_args.size == 2
|
62
62
|
environments = @name_args[0].split(",").map{ |env| load_specified_environment_group(env) }
|
63
63
|
[ environments.flatten, @name_args[1] ]
|
@@ -110,10 +110,16 @@ module KnifeSpork
|
|
110
110
|
end
|
111
111
|
|
112
112
|
def save_environment_changes(environment, json)
|
113
|
-
if
|
114
|
-
environments_path = @config[:environment_path]
|
115
|
-
elsif spork_config[:environment_path]
|
113
|
+
if spork_config[:environment_path]
|
116
114
|
environments_path = spork_config[:environment_path]
|
115
|
+
elsif @config[:environment_path]
|
116
|
+
# environment_path can be an Array or String. If Array, let's just
|
117
|
+
# take the first value as we have done in other similar circumstances
|
118
|
+
environments_path = if @config[:environment_path].is_a? Array
|
119
|
+
@config[:environment_path].first
|
120
|
+
else
|
121
|
+
@config[:environment_path]
|
122
|
+
end
|
117
123
|
else
|
118
124
|
split_cb_path = cookbook_path.split("/")
|
119
125
|
environments_path = (split_cb_path[0..-2] << split_cb_path[-1].gsub("cookbooks","environments")).join("/")
|
@@ -250,7 +256,7 @@ module KnifeSpork
|
|
250
256
|
begin
|
251
257
|
environment_loader.object_from_file("#{environment_path}/#{environment_name}.json")
|
252
258
|
rescue FFI_Yajl::ParseError => e
|
253
|
-
raise "#{environment_name} environment file has syntactically incorrect json.\n #{e.to_s}"
|
259
|
+
raise "#{environment_name} environment file has syntactically incorrect json.\n #{e.to_s}"
|
254
260
|
end
|
255
261
|
end
|
256
262
|
|
data/lib/knife-spork/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-spork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Cowie
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-08-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -222,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
222
222
|
version: '0'
|
223
223
|
requirements: []
|
224
224
|
rubyforge_project:
|
225
|
-
rubygems_version: 2.6
|
225
|
+
rubygems_version: 2.7.6
|
226
226
|
signing_key:
|
227
227
|
specification_version: 4
|
228
228
|
summary: A workflow plugin to help many devs work with the same chef repo/server
|