berkshelf 5.4.0 → 5.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +29 -27
- data/lib/berkshelf/berksfile.rb +20 -1
- data/lib/berkshelf/downloader.rb +2 -4
- data/lib/berkshelf/version.rb +1 -1
- data/spec/unit/berkshelf/berksfile_spec.rb +4 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a3f9e9bd7d92a7838beb8793edcd04cc798c02d
|
4
|
+
data.tar.gz: a672c2e4b45781178d2cb349cb223ca6dffd3d0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c3144282091497c4ea2ea80e2e360b365a7731123b16184af5aac29fc430265d940c1c5464a2d5d82942055eda7243f67aa47d163bf8e157d1678016f05c7c7
|
7
|
+
data.tar.gz: '01729fc8d5d3f4c946cdc507e0b727a0bb808d0cda011d6455b73c0c44338dbe6d76db3bb6f568d6bd9b3ba7dafc88905815bfa2d70c6fe11a04c41311e1bb4c'
|
data/Gemfile.lock
CHANGED
@@ -34,7 +34,7 @@ GIT
|
|
34
34
|
PATH
|
35
35
|
remote: .
|
36
36
|
specs:
|
37
|
-
berkshelf (5.
|
37
|
+
berkshelf (5.5.0)
|
38
38
|
addressable (~> 2.3, >= 2.3.4)
|
39
39
|
berkshelf-api-client (>= 2.0.2, < 4.0)
|
40
40
|
buff-config (~> 2.0)
|
@@ -60,7 +60,8 @@ GEM
|
|
60
60
|
minitest (~> 5.1)
|
61
61
|
thread_safe (~> 0.3, >= 0.3.4)
|
62
62
|
tzinfo (~> 1.1)
|
63
|
-
addressable (2.
|
63
|
+
addressable (2.5.0)
|
64
|
+
public_suffix (~> 2.0, >= 2.0.2)
|
64
65
|
archive (0.0.6)
|
65
66
|
ffi (~> 1.9.3)
|
66
67
|
artifactory (2.5.1)
|
@@ -87,18 +88,18 @@ GEM
|
|
87
88
|
buff-ruby_engine (1.0.0)
|
88
89
|
buff-shell_out (1.1.0)
|
89
90
|
buff-ruby_engine (~> 1.0)
|
90
|
-
builder (3.2.
|
91
|
+
builder (3.2.3)
|
91
92
|
celluloid (0.16.0)
|
92
93
|
timers (~> 4.0.0)
|
93
94
|
celluloid-io (0.16.2)
|
94
95
|
celluloid (>= 0.16.0)
|
95
96
|
nio4r (>= 1.1.0)
|
96
|
-
chef-config (12.
|
97
|
+
chef-config (12.17.44)
|
97
98
|
addressable
|
98
99
|
fuzzyurl
|
99
100
|
mixlib-config (~> 2.0)
|
100
101
|
mixlib-shellout (~> 2.0)
|
101
|
-
chef-zero (5.1.
|
102
|
+
chef-zero (5.1.1)
|
102
103
|
ffi-yajl (~> 2.2)
|
103
104
|
hashie (>= 2.0, < 4.0)
|
104
105
|
mixlib-log (~> 1.3)
|
@@ -132,8 +133,8 @@ GEM
|
|
132
133
|
ffi (~> 1.9)
|
133
134
|
descendants_tracker (0.0.4)
|
134
135
|
thread_safe (~> 0.3, >= 0.3.1)
|
135
|
-
diff-lcs (1.
|
136
|
-
domain_name (0.5.
|
136
|
+
diff-lcs (1.3)
|
137
|
+
domain_name (0.5.20161129)
|
137
138
|
unf (>= 0.0.5, < 1.0.0)
|
138
139
|
equalizer (0.0.11)
|
139
140
|
erubis (2.7.0)
|
@@ -141,7 +142,7 @@ GEM
|
|
141
142
|
multipart-post (>= 1.2, < 3)
|
142
143
|
faraday-http-cache (2.0.0)
|
143
144
|
faraday (~> 0.8)
|
144
|
-
ffi (1.9.
|
145
|
+
ffi (1.9.17)
|
145
146
|
ffi-yajl (2.3.0)
|
146
147
|
libyajl2 (~> 1.2)
|
147
148
|
formatador (0.2.5)
|
@@ -150,7 +151,7 @@ GEM
|
|
150
151
|
ruby-progressbar (~> 1.4)
|
151
152
|
fuzzyurl (0.9.0)
|
152
153
|
gherkin (4.0.0)
|
153
|
-
grape (0.
|
154
|
+
grape (0.19.1)
|
154
155
|
activesupport
|
155
156
|
builder
|
156
157
|
hashie (>= 2.1.0)
|
@@ -187,7 +188,7 @@ GEM
|
|
187
188
|
guard (~> 2.0)
|
188
189
|
guard-compat (~> 1.0)
|
189
190
|
spork (>= 0.8.4)
|
190
|
-
hashdiff (0.3.
|
191
|
+
hashdiff (0.3.2)
|
191
192
|
hashie (3.4.6)
|
192
193
|
hitimes (1.2.4)
|
193
194
|
http (2.1.0)
|
@@ -199,25 +200,25 @@ GEM
|
|
199
200
|
domain_name (~> 0.5)
|
200
201
|
http-form_data (1.0.1)
|
201
202
|
http_parser.rb (0.6.0)
|
202
|
-
httpclient (2.8.
|
203
|
+
httpclient (2.8.3)
|
203
204
|
i18n (0.7.0)
|
204
205
|
ice_nine (0.11.2)
|
205
|
-
json (1.8.
|
206
|
+
json (1.8.6)
|
206
207
|
libyajl2 (1.2.0)
|
207
208
|
listen (3.1.5)
|
208
209
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
209
210
|
rb-inotify (~> 0.9, >= 0.9.7)
|
210
211
|
ruby_dep (~> 1.2)
|
211
|
-
lumberjack (1.0.
|
212
|
+
lumberjack (1.0.11)
|
212
213
|
method_source (0.8.2)
|
213
214
|
minitar (0.5.4)
|
214
|
-
minitest (5.
|
215
|
-
mixlib-archive (0.
|
215
|
+
minitest (5.10.1)
|
216
|
+
mixlib-archive (0.3.0)
|
216
217
|
mixlib-log
|
217
218
|
mixlib-authentication (1.4.1)
|
218
219
|
mixlib-log
|
219
220
|
mixlib-config (2.2.4)
|
220
|
-
mixlib-install (2.1.
|
221
|
+
mixlib-install (2.1.9)
|
221
222
|
artifactory
|
222
223
|
mixlib-shellout
|
223
224
|
mixlib-versioning
|
@@ -229,7 +230,7 @@ GEM
|
|
229
230
|
msgpack (1.0.2)
|
230
231
|
multi_json (1.12.1)
|
231
232
|
multi_test (0.1.2)
|
232
|
-
multi_xml (0.
|
233
|
+
multi_xml (0.6.0)
|
233
234
|
multipart-post (2.0.0)
|
234
235
|
mustermann (0.4.0)
|
235
236
|
tool (~> 0.2)
|
@@ -238,10 +239,10 @@ GEM
|
|
238
239
|
nenv (0.3.0)
|
239
240
|
net-scp (1.2.1)
|
240
241
|
net-ssh (>= 2.6.5)
|
241
|
-
net-ssh (
|
242
|
+
net-ssh (4.0.1)
|
242
243
|
net-ssh-gateway (1.2.0)
|
243
244
|
net-ssh (>= 2.6.5)
|
244
|
-
nio4r (
|
245
|
+
nio4r (2.0.0)
|
245
246
|
notiffany (0.1.1)
|
246
247
|
nenv (~> 0.1)
|
247
248
|
shellany (~> 0.0)
|
@@ -251,11 +252,12 @@ GEM
|
|
251
252
|
coderay (~> 1.1.0)
|
252
253
|
method_source (~> 0.8.1)
|
253
254
|
slop (~> 3.4)
|
255
|
+
public_suffix (2.0.5)
|
254
256
|
rack (2.0.1)
|
255
257
|
rack-accept (0.4.5)
|
256
258
|
rack (>= 0.4)
|
257
259
|
rainbow (2.2.1)
|
258
|
-
rake (
|
260
|
+
rake (12.0.0)
|
259
261
|
rb-fsevent (0.9.8)
|
260
262
|
rb-inotify (0.9.7)
|
261
263
|
ffi (>= 0.5.0)
|
@@ -311,12 +313,12 @@ GEM
|
|
311
313
|
molinillo (>= 0.5)
|
312
314
|
semverse (>= 1.1, < 3.0)
|
313
315
|
spork (0.9.2)
|
314
|
-
test-kitchen (1.
|
316
|
+
test-kitchen (1.15.0)
|
315
317
|
mixlib-install (>= 1.2, < 3.0)
|
316
318
|
mixlib-shellout (>= 1.2, < 3.0)
|
317
319
|
net-scp (~> 1.1)
|
318
|
-
net-ssh (>= 2.9, <
|
319
|
-
net-ssh-gateway (~> 1.2
|
320
|
+
net-ssh (>= 2.9, < 5.0)
|
321
|
+
net-ssh-gateway (~> 1.2)
|
320
322
|
safe_yaml (~> 1.0)
|
321
323
|
thor (~> 0.18)
|
322
324
|
thor (0.19.1)
|
@@ -339,14 +341,14 @@ GEM
|
|
339
341
|
coercible (~> 1.0)
|
340
342
|
descendants_tracker (~> 0.0, >= 0.0.3)
|
341
343
|
equalizer (~> 0.0, >= 0.0.9)
|
342
|
-
webmock (2.
|
344
|
+
webmock (2.3.2)
|
343
345
|
addressable (>= 2.3.6)
|
344
346
|
crack (>= 0.3.2)
|
345
347
|
hashdiff
|
346
|
-
websocket-driver (0.6.
|
348
|
+
websocket-driver (0.6.5)
|
347
349
|
websocket-extensions (>= 0.1.0)
|
348
350
|
websocket-extensions (0.1.2)
|
349
|
-
yard (0.9.
|
351
|
+
yard (0.9.8)
|
350
352
|
|
351
353
|
PLATFORMS
|
352
354
|
ruby
|
@@ -376,4 +378,4 @@ DEPENDENCIES
|
|
376
378
|
yard (>= 0.8)
|
377
379
|
|
378
380
|
BUNDLED WITH
|
379
|
-
1.
|
381
|
+
1.14.2
|
data/lib/berkshelf/berksfile.rb
CHANGED
@@ -629,6 +629,8 @@ module Berkshelf
|
|
629
629
|
Dir.mktmpdir('vendor') do |scratch|
|
630
630
|
chefignore = nil
|
631
631
|
cached_cookbooks = install
|
632
|
+
raw_metadata_files = []
|
633
|
+
|
632
634
|
return nil if cached_cookbooks.empty?
|
633
635
|
|
634
636
|
cached_cookbooks.each do |cookbook|
|
@@ -647,10 +649,27 @@ module Berkshelf
|
|
647
649
|
cookbook.compile_metadata(cookbook_destination)
|
648
650
|
end
|
649
651
|
|
652
|
+
raw_metadata_files << File::join(cookbook.cookbook_name, 'metadata.rb')
|
653
|
+
|
650
654
|
FileUtils.cp_r(files, cookbook_destination)
|
651
655
|
end
|
652
656
|
|
653
|
-
|
657
|
+
# Don't vendor the raw metadata (metadata.rb). The raw metadata is
|
658
|
+
# unecessary for the client, and this is required until compiled metadata
|
659
|
+
# (metadata.json) takes precedence over raw metadata in the Chef-Client.
|
660
|
+
#
|
661
|
+
# We can change back to including the raw metadata in the future after
|
662
|
+
# this has been fixed or just remove these comments. There is no
|
663
|
+
# circumstance that I can currently think of where raw metadata should
|
664
|
+
# ever be read by the client.
|
665
|
+
#
|
666
|
+
# - Jamie
|
667
|
+
#
|
668
|
+
# See the following tickets for more information:
|
669
|
+
#
|
670
|
+
# * https://tickets.opscode.com/browse/CHEF-4811
|
671
|
+
# * https://tickets.opscode.com/browse/CHEF-4810
|
672
|
+
FileSyncer.sync(scratch, destination, exclude: raw_metadata_files + EXCLUDED_VCS_FILES_WHEN_VENDORING, delete: @delete)
|
654
673
|
end
|
655
674
|
|
656
675
|
destination
|
data/lib/berkshelf/downloader.rb
CHANGED
@@ -80,7 +80,7 @@ module Berkshelf
|
|
80
80
|
Celluloid.logger = nil unless ENV["DEBUG_CELLULOID"]
|
81
81
|
Ridley.open(credentials) { |r| r.cookbook.download(name, version) }
|
82
82
|
when :github
|
83
|
-
|
83
|
+
require 'octokit'
|
84
84
|
|
85
85
|
tmp_dir = Dir.mktmpdir
|
86
86
|
archive_path = File.join(tmp_dir, "#{name}-#{version}.tar.gz")
|
@@ -124,7 +124,7 @@ module Berkshelf
|
|
124
124
|
|
125
125
|
File.join(unpack_dir, cookbook_directory)
|
126
126
|
when :uri
|
127
|
-
|
127
|
+
require 'open-uri'
|
128
128
|
|
129
129
|
tmp_dir = Dir.mktmpdir
|
130
130
|
archive_path = Pathname.new(tmp_dir) + "#{name}-#{version}.tar.gz"
|
@@ -145,8 +145,6 @@ module Berkshelf
|
|
145
145
|
|
146
146
|
(unpack_dir + cookbook_directory).to_s
|
147
147
|
when :gitlab
|
148
|
-
#Thread.exclusive { require 'octokit' unless defined?(Octokit) }
|
149
|
-
|
150
148
|
tmp_dir = Dir.mktmpdir
|
151
149
|
archive_path = Pathname.new(tmp_dir) + "#{name}-#{version}.tar.gz"
|
152
150
|
unpack_dir = Pathname.new(tmp_dir) + "#{name}-#{version}"
|
data/lib/berkshelf/version.rb
CHANGED
@@ -387,9 +387,10 @@ describe Berkshelf::Berksfile do
|
|
387
387
|
describe '#vendor' do
|
388
388
|
let(:cached_cookbook) { double(Berkshelf::CachedCookbook, cookbook_name: 'my_cookbook', path: '/my_cookbook/path', compiled_metadata?: true) }
|
389
389
|
let(:installer) { double(Berkshelf::Installer, run: [cached_cookbook]) }
|
390
|
+
let(:raw_metadata_files) { [File::join(cached_cookbook.cookbook_name, 'metadata.rb')] }
|
390
391
|
|
391
392
|
let(:destination) { '/a/destination/path' }
|
392
|
-
let(:options) { { :exclude => Berkshelf::Berksfile::EXCLUDED_VCS_FILES_WHEN_VENDORING, delete: nil } }
|
393
|
+
let(:options) { { :exclude => raw_metadata_files + Berkshelf::Berksfile::EXCLUDED_VCS_FILES_WHEN_VENDORING, delete: nil } }
|
393
394
|
|
394
395
|
before do
|
395
396
|
allow(Berkshelf::Installer).to receive(:new).and_return(installer)
|
@@ -401,9 +402,9 @@ describe Berkshelf::Berksfile do
|
|
401
402
|
subject.vendor(destination)
|
402
403
|
end
|
403
404
|
|
404
|
-
it '
|
405
|
+
it 'excludes the top-level metadata.rb file' do
|
405
406
|
expect(options[:exclude].any? { |exclude| File.fnmatch?(exclude, 'my_cookbook/recipes/metadata.rb', File::FNM_DOTMATCH) }).to be(false)
|
406
|
-
expect(options[:exclude].any? { |exclude| File.fnmatch?(exclude, 'my_cookbook/metadata.rb', File::FNM_DOTMATCH) }).to be(
|
407
|
+
expect(options[:exclude].any? { |exclude| File.fnmatch?(exclude, 'my_cookbook/metadata.rb', File::FNM_DOTMATCH) }).to be(true)
|
407
408
|
end
|
408
409
|
end
|
409
410
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: berkshelf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamie Winsor
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2017-01-
|
15
|
+
date: 2017-01-24 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: addressable
|
@@ -478,7 +478,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
478
478
|
version: 2.0.0
|
479
479
|
requirements: []
|
480
480
|
rubyforge_project:
|
481
|
-
rubygems_version: 2.
|
481
|
+
rubygems_version: 2.6.9
|
482
482
|
signing_key:
|
483
483
|
specification_version: 4
|
484
484
|
summary: Manages a Cookbook's, or an Application's, Cookbook dependencies
|