chef-apply 0.4.16 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/chef-apply.gemspec +7 -12
- data/i18n/errors/en.yml +1 -1
- data/lib/chef_apply/action/converge_target.rb +2 -2
- data/lib/chef_apply/action/generate_temp_cookbook/recipe_lookup.rb +1 -1
- data/lib/chef_apply/action/generate_temp_cookbook/temp_cookbook.rb +3 -3
- data/lib/chef_apply/action/install_chef.rb +1 -1
- data/lib/chef_apply/cli.rb +1 -1
- data/lib/chef_apply/config.rb +3 -3
- data/lib/chef_apply/errors/standard_error_resolver.rb +2 -2
- data/lib/chef_apply/file_fetcher.rb +2 -2
- data/lib/chef_apply/startup.rb +1 -1
- data/lib/chef_apply/target_host.rb +1 -1
- data/lib/chef_apply/version.rb +1 -1
- metadata +12 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3249228c66633761ae1d2718070c68d1c85042f07dfc08da7ae098ca262eddc7
|
4
|
+
data.tar.gz: 80488b02ac0b76192debcec1e97416e96d746db66a6f65d531f224abe1cde4d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9fa8938dc3276b6204c21ca28073eb3f36b58735d750b0ad67bbe0c36401dbfde64a70f7110c29127d2c376ce075ff8a3c97150381e7390ef898fa5ffbb53a1
|
7
|
+
data.tar.gz: 04f2afd5b1a3210c86fb7aebf8bca351528458595fa277d72ca56c61e2bb80252029c5daa377cf8f5f083f4b2e5542a6ccf7125d9b2ea30131ef288e81c02381
|
data/Gemfile
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright:: Copyright (c)
|
2
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -19,7 +19,7 @@ source "https://rubygems.org"
|
|
19
19
|
gemspec
|
20
20
|
|
21
21
|
group :development do
|
22
|
-
gem "chefstyle"
|
22
|
+
gem "chefstyle", "1.3.2"
|
23
23
|
gem "rake", ">= 10.1.0"
|
24
24
|
gem "rspec", "~> 3.0"
|
25
25
|
gem "simplecov"
|
data/chef-apply.gemspec
CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.description = "Ad-hoc management of individual nodes and devices."
|
30
30
|
spec.homepage = "https://github.com/chef/chef-apply"
|
31
31
|
spec.license = "Apache-2.0"
|
32
|
-
spec.required_ruby_version = ">= 2.
|
32
|
+
spec.required_ruby_version = ">= 2.6"
|
33
33
|
|
34
34
|
spec.files = %w{Rakefile LICENSE warning.txt} +
|
35
35
|
Dir.glob("Gemfile*") + # Includes Gemfile and locks
|
@@ -40,24 +40,19 @@ Gem::Specification.new do |spec|
|
|
40
40
|
spec.require_paths = ["lib"]
|
41
41
|
|
42
42
|
spec.add_dependency "mixlib-cli" # Provides argument handling DSL for CLI applications
|
43
|
-
spec.add_dependency "mixlib-config", ">= 3.0.5"
|
44
|
-
# simplifies managing a configuration file
|
43
|
+
spec.add_dependency "mixlib-config", ">= 3.0.5" # shared chef configuration library that simplifies managing a configuration file
|
45
44
|
spec.add_dependency "mixlib-log" # Basis for our traditional logger
|
46
45
|
spec.add_dependency "mixlib-install" # URL resolver + install tool for chef products
|
47
|
-
spec.add_dependency "r18n-desktop" # easy path to message text management via
|
48
|
-
|
49
|
-
spec.add_dependency "toml-rb" # This isn't ideal because mixlib-config uses 'tomlrb'
|
50
|
-
# but that library does not support a dumper
|
46
|
+
spec.add_dependency "r18n-desktop" # easy path to message text management via localization gem...
|
47
|
+
spec.add_dependency "toml-rb" # This isn't ideal because mixlib-config uses 'tomlrb' but that library does not support a dumper
|
51
48
|
spec.add_dependency "train-core", "~> 3.0" # remote connection management over ssh, winrm
|
52
49
|
spec.add_dependency "train-winrm" # winrm transports were pulled out into this plugin
|
53
50
|
spec.add_dependency "pastel" # A color library
|
54
51
|
spec.add_dependency "tty-spinner" # Pretty output for status updates in the CLI
|
55
|
-
spec.add_dependency "chef", ">=
|
56
|
-
spec.add_dependency "chef-cli", ">=
|
52
|
+
spec.add_dependency "chef", ">= 16.0" # Needed to load cookbooks
|
53
|
+
spec.add_dependency "chef-cli", ">= 2.0.10 " # Policyfile
|
57
54
|
spec.add_dependency "chef-telemetry", ">= 1.0.2"
|
58
|
-
spec.add_dependency "license-acceptance", "
|
59
|
-
|
60
|
-
spec.add_development_dependency "bundler"
|
55
|
+
spec.add_dependency "license-acceptance", ">= 1.0.11", "< 3"
|
61
56
|
|
62
57
|
spec.post_install_message = File.read(File.expand_path("../warning.txt", __FILE__))
|
63
58
|
end
|
data/i18n/errors/en.yml
CHANGED
@@ -319,7 +319,7 @@ errors:
|
|
319
319
|
CHEFVAL009:
|
320
320
|
display: { decorations: false }
|
321
321
|
text: |
|
322
|
-
File extension '%1' is unsupported. Currently recipes must be specified with a `.rb` extension.
|
322
|
+
File extension '%1' is unsupported. Currently recipes must be specified with a `.rb` or `.yml` extension.
|
323
323
|
|
324
324
|
CHEFVAL010:
|
325
325
|
display: { decorations: false }
|
@@ -81,7 +81,7 @@ module ChefApply
|
|
81
81
|
# Find the specified recipe or default recipe if none is specified.
|
82
82
|
# Raise an error if recipe cannot be found.
|
83
83
|
def find_recipe(cookbook, recipe_name = nil)
|
84
|
-
recipes = cookbook.recipe_filenames_by_name
|
84
|
+
recipes = cookbook.recipe_filenames_by_name.merge(cookbook.recipe_yml_filenames_by_name)
|
85
85
|
if recipe_name.nil?
|
86
86
|
default_recipe = recipes["default"]
|
87
87
|
raise NoDefaultRecipe.new(cookbook.root_dir, cookbook.name) if default_recipe.nil?
|
@@ -15,8 +15,8 @@
|
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
17
|
|
18
|
-
require "tmpdir"
|
19
|
-
require "fileutils"
|
18
|
+
require "tmpdir" unless defined?(Dir.mktmpdir)
|
19
|
+
require "fileutils" unless defined?(FileUtils)
|
20
20
|
require_relative "../../log"
|
21
21
|
require_relative "../../error"
|
22
22
|
require_relative "../generate_temp_cookbook"
|
@@ -34,7 +34,7 @@ module ChefApply
|
|
34
34
|
|
35
35
|
def from_existing_recipe(existing_recipe_path)
|
36
36
|
ext_name = File.extname(existing_recipe_path)
|
37
|
-
raise UnsupportedExtension.new(ext_name) unless ext_name == ".rb"
|
37
|
+
raise UnsupportedExtension.new(ext_name) unless ext_name == ".rb" || ext_name == ".yml"
|
38
38
|
|
39
39
|
cb = cookbook_for_recipe(existing_recipe_path)
|
40
40
|
if cb
|
data/lib/chef_apply/cli.rb
CHANGED
data/lib/chef_apply/config.rb
CHANGED
@@ -16,9 +16,9 @@
|
|
16
16
|
#
|
17
17
|
|
18
18
|
require_relative "log"
|
19
|
-
require "mixlib/config"
|
20
|
-
require "fileutils"
|
21
|
-
require "pathname"
|
19
|
+
require "mixlib/config" unless defined?(Mixlib::Config)
|
20
|
+
require "fileutils" unless defined?(FileUtils)
|
21
|
+
require "pathname" unless defined?(Pathname)
|
22
22
|
require "chef-config/config"
|
23
23
|
require "chef-config/workstation_config_loader"
|
24
24
|
|
data/lib/chef_apply/startup.rb
CHANGED
@@ -119,7 +119,7 @@ module ChefApply
|
|
119
119
|
end
|
120
120
|
|
121
121
|
def setup_telemetry
|
122
|
-
require "securerandom"
|
122
|
+
require "securerandom" unless defined?(SecureRandom)
|
123
123
|
installation_id = SecureRandom.uuid
|
124
124
|
File.write(Config.telemetry_installation_identifier_file, installation_id)
|
125
125
|
|
data/lib/chef_apply/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-apply
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chef Software, Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-cli
|
@@ -156,28 +156,28 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - ">="
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: '
|
159
|
+
version: '16.0'
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: '
|
166
|
+
version: '16.0'
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: chef-cli
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
171
|
- - ">="
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version:
|
173
|
+
version: 2.0.10
|
174
174
|
type: :runtime
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - ">="
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version:
|
180
|
+
version: 2.0.10
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: chef-telemetry
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -196,36 +196,22 @@ dependencies:
|
|
196
196
|
name: license-acceptance
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
198
198
|
requirements:
|
199
|
-
- - "~>"
|
200
|
-
- !ruby/object:Gem::Version
|
201
|
-
version: '1.0'
|
202
199
|
- - ">="
|
203
200
|
- !ruby/object:Gem::Version
|
204
201
|
version: 1.0.11
|
202
|
+
- - "<"
|
203
|
+
- !ruby/object:Gem::Version
|
204
|
+
version: '3'
|
205
205
|
type: :runtime
|
206
206
|
prerelease: false
|
207
207
|
version_requirements: !ruby/object:Gem::Requirement
|
208
208
|
requirements:
|
209
|
-
- - "~>"
|
210
|
-
- !ruby/object:Gem::Version
|
211
|
-
version: '1.0'
|
212
209
|
- - ">="
|
213
210
|
- !ruby/object:Gem::Version
|
214
211
|
version: 1.0.11
|
215
|
-
-
|
216
|
-
name: bundler
|
217
|
-
requirement: !ruby/object:Gem::Requirement
|
218
|
-
requirements:
|
219
|
-
- - ">="
|
220
|
-
- !ruby/object:Gem::Version
|
221
|
-
version: '0'
|
222
|
-
type: :development
|
223
|
-
prerelease: false
|
224
|
-
version_requirements: !ruby/object:Gem::Requirement
|
225
|
-
requirements:
|
226
|
-
- - ">="
|
212
|
+
- - "<"
|
227
213
|
- !ruby/object:Gem::Version
|
228
|
-
version: '
|
214
|
+
version: '3'
|
229
215
|
description: Ad-hoc management of individual nodes and devices.
|
230
216
|
email:
|
231
217
|
- workstation@chef.io
|
@@ -294,7 +280,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
294
280
|
requirements:
|
295
281
|
- - ">="
|
296
282
|
- !ruby/object:Gem::Version
|
297
|
-
version: 2.
|
283
|
+
version: '2.6'
|
298
284
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
299
285
|
requirements:
|
300
286
|
- - ">="
|