knife-zero 2.0.4 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 06a73972f23a35d8577fb7da3b2b52d90ace87d5fe527897d1fed330c0d645cc
4
- data.tar.gz: 802065a908c3446706f6d8d0f5ffd4c03d6af2ad0b8fc396eb7217d77c9d8324
3
+ metadata.gz: 7f1cd2562eb42faa227a762c0fae1ab59bb7f5c0c357e6c53b75d4c35546fc3b
4
+ data.tar.gz: be6e7409ad03494cb2fd204f788221331bb7cef7e3054fe7e910c4da1b45773e
5
5
  SHA512:
6
- metadata.gz: 2aca5ed0865e7060a8c8c95aea81437bc9812f8014747bbd48dac762fdda542eccbf4a66938eabf462a943d181cdfacb664957465d1c7be023d7a57e10d840fe
7
- data.tar.gz: fd93251cfe928a56f3ee86d133b15ef5fbb568e57d24413ef7f365a59aa07cbff0d1f8e40b2d7d42e490cc12711d6134fb3a4a16943369ca879974e9eeca6936
6
+ metadata.gz: 34644654c493967891415dceb6f88ec0bb437b4abebbb540121969aa2e992d81877270d3a372cff002d8e8556666c24cbf4c5405e8822167d47d7142d0779cc2
7
+ data.tar.gz: 7453c885179051ad941aad30c214f1d5b0bf2b50b42276b92a251560ca63f831fe7b16c568e2787f475908a689144e092a73dbec01cc1538ab6ae4376817df61
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ none.
6
+
7
+ ## v2.1.0
8
+
9
+ - Allow pass run-list and environments from json-attributes.
10
+ - Related:Split run list and attributes from nodes [#132](https://github.com/higanworks/knife-zero/issues/132)
11
+
5
12
  ## v2.0.4
6
13
 
7
14
  - bugfix: Crash around the end of a concurrent connection [#131](https://github.com/higanworks/knife-zero/pull/131)
@@ -105,11 +105,12 @@ class Chef
105
105
  ::Knife::Zero::Helper.hook_shell_out!('before_converge', ui, Chef::Config[:knife][:before_converge])
106
106
  end
107
107
 
108
- validate_options!
109
108
  if @config[:json_attribs]
110
109
  @config[:chef_client_json] = fetch_json_from_url
111
110
  end
112
111
 
112
+ validate_options!
113
+
113
114
  @name_args = [@name_args[0], start_chef_client]
114
115
  end
115
116
 
@@ -142,7 +143,8 @@ class Chef
142
143
  if json_attribs_without_override_given?
143
144
  ui.error(
144
145
  '--json-attributes must be used with --override-runlist ' \
145
- 'to avoid updating local node object.'
146
+ 'or passed json should includes key `run-list` ' \
147
+ 'to avoid unexpected updating local node object.'
146
148
  )
147
149
  exit 1
148
150
  end
@@ -155,7 +157,7 @@ class Chef
155
157
  end
156
158
 
157
159
  def override_runlist_given?
158
- !config[:override_runlist].nil? && !config[:override_runlist].empty?
160
+ !config[:override_runlist].nil? && !config[:override_runlist].empty? || @config[:chef_client_json]&.key?('run_list')
159
161
  end
160
162
 
161
163
  def named_run_list_given?
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Zero
3
- VERSION = '2.0.4'.freeze
3
+ VERSION = '2.1.0'.freeze
4
4
  MAJOR, MINOR, TINY = VERSION.split('.')
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sawanoboly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-23 00:00:00.000000000 Z
11
+ date: 2019-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler