knife-playground 0.2.1 → 0.2.2
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.
- data/VERSION +1 -1
- data/lib/chef/knife/pg.rb +4 -20
- metadata +3 -3
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.2
|
data/lib/chef/knife/pg.rb
CHANGED
|
@@ -116,7 +116,6 @@ module KnifePlayground
|
|
|
116
116
|
config[:cookbook_path] ||= Chef::Config[:cookbook_path]
|
|
117
117
|
|
|
118
118
|
assert_environment_valid!
|
|
119
|
-
warn_about_cookbook_shadowing
|
|
120
119
|
version_constraints_to_update = {}
|
|
121
120
|
# Get a list of cookbooks and their versions from the server
|
|
122
121
|
# for checking existence of dependending cookbooks.
|
|
@@ -147,9 +146,9 @@ module KnifePlayground
|
|
|
147
146
|
cookbook.freeze_version if config[:freeze]
|
|
148
147
|
upload(cookbook, justify_width)
|
|
149
148
|
version_constraints_to_update[cookbook_name] = cookbook.version
|
|
150
|
-
rescue Exceptions::CookbookNotFoundInRepo => e
|
|
149
|
+
rescue Chef::Exceptions::CookbookNotFoundInRepo => e
|
|
151
150
|
ui.error("Could not find cookbook #{cookbook_name} in your cookbook path, skipping it")
|
|
152
|
-
Log.debug(e)
|
|
151
|
+
Chef::Log.debug(e)
|
|
153
152
|
end
|
|
154
153
|
end
|
|
155
154
|
end
|
|
@@ -177,28 +176,13 @@ module KnifePlayground
|
|
|
177
176
|
@environment ||= config[:environment] ? Environment.load(config[:environment]) : nil
|
|
178
177
|
end
|
|
179
178
|
|
|
180
|
-
def warn_about_cookbook_shadowing
|
|
181
|
-
unless cookbook_repo.merged_cookbooks.empty?
|
|
182
|
-
ui.warn "* " * 40
|
|
183
|
-
ui.warn(<<-WARNING)
|
|
184
|
-
The cookbooks: #{cookbook_repo.merged_cookbooks.join(', ')} exist in multiple places in your cookbook_path.
|
|
185
|
-
A composite version of these cookbooks has been compiled for uploading.
|
|
186
|
-
|
|
187
|
-
#{ui.color('IMPORTANT:', :red, :bold)} In a future version of Chef, this behavior will be removed and you will no longer
|
|
188
|
-
be able to have the same version of a cookbook in multiple places in your cookbook_path.
|
|
189
|
-
WARNING
|
|
190
|
-
ui.warn "The affected cookbooks are located:"
|
|
191
|
-
ui.output ui.format_for_display(cookbook_repo.merged_cookbook_paths)
|
|
192
|
-
ui.warn "* " * 40
|
|
193
|
-
end
|
|
194
|
-
end
|
|
195
|
-
|
|
196
179
|
private
|
|
197
180
|
|
|
198
181
|
def git_clone(url, opts = {})
|
|
199
182
|
repo = File.basename(URI.parse(url).path.split('/').last, '.git')
|
|
200
183
|
@name_args << repo
|
|
201
|
-
|
|
184
|
+
cbpath = Chef::Config[:cookbook_path].first rescue '/var/chef/cookbooks'
|
|
185
|
+
path = File.join(cbpath.first, repo)
|
|
202
186
|
# Error if previous checkout exist
|
|
203
187
|
if File.directory?(path + '/.git')
|
|
204
188
|
ui.info "Cookbook #{repo} already downloaded."
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: knife-playground
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 19
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 2
|
|
9
|
-
-
|
|
10
|
-
version: 0.2.
|
|
9
|
+
- 2
|
|
10
|
+
version: 0.2.2
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Sergio Rubio
|