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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 34cd399094e7ae6b16b29d67d900cd6511a77ac0
4
- data.tar.gz: 4c75d7ee4393852c00e22eb024f335a48c5e9cc9
2
+ SHA256:
3
+ metadata.gz: e8d36ad90f20dbe5a5b2a473862a010b842ccbc8038d8437094b10f4c2107b09
4
+ data.tar.gz: 34ad1ffb10bbc77b02b9a3cd20235baf73d3a09d5e97244ac547a036da2d279c
5
5
  SHA512:
6
- metadata.gz: 00141fddecab5cd117ac3f90a72b889ed1adc51df2de9f471aea0f04d8672cc1e455b014f7bf8d5fd25b97b8a51ceb39de60019afe6ae324bc47a5365088ae55
7
- data.tar.gz: 676e232430b8e6bfe682b62247c5f1115d02e139af107b578fac4b5eb7b6e0858736c4d30ff7b907eb63e1cb6aa54098ef6403f9de2eed19978f43a697295eff
6
+ metadata.gz: 50630ebcc3d3183b04430cdfde3e01d30e76de268080b1dd62ff4cbd372569a91b71f59ae7a18cf3d7ae279e59dd4a569e893d0fd0c08f4dea865dcbfc863f33
7
+ data.tar.gz: 8520fc4d6359f811446fbc3d6112ef0ff26e9526c87651b7f1e6ac50afbdc6651c3252114d134822850c5673326fc56d05667c6e61590ebb4590a86f60b27adc
@@ -1,3 +1,10 @@
1
+ ## 1.7.2 (3rd August 2018)
2
+
3
+ Bugfixes:
4
+
5
+ - Fix issues handling an array of environment paths. (Thanks to miroswan https://github.com/jonlives/knife-spork/pull/223)
6
+
7
+
1
8
  ## 1.7.1 (17th November 2017)
2
9
 
3
10
  Bugfixes:
@@ -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 @config[:environment_path]
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
 
@@ -1,5 +1,5 @@
1
1
  module KnifeSpork
2
2
  module Version
3
- VERSION = "1.7.1"
3
+ VERSION = "1.7.2"
4
4
  end
5
5
  end
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.1
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: 2017-11-17 00:00:00.000000000 Z
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.12
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