berkshelf 5.3.0 → 5.4.0

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
2
  SHA1:
3
- metadata.gz: ca3e18fe34db1ef6247c982bfcdee59145909ace
4
- data.tar.gz: 2349d6fd268fe58dd5f28096bbd16aa57f8a4d57
3
+ metadata.gz: 5e3a4dcddb8f6d12c77772490069f719ead98156
4
+ data.tar.gz: dba1a0d5105358905a3c0ca3d54047e02d295ae8
5
5
  SHA512:
6
- metadata.gz: 670473789eb3606bc9e867fbb6f28ce2858bfa1ef0092862627043008ffb7b807580bcfa06c3a01fb111a847144f9ff262041f93e0cc103e3b2db2a944101ecf
7
- data.tar.gz: 0beb850938db36494f3ed5b272c6974706c57731cacc74ec62578a5c9f821fad1737dadbdd91a5f30f28be791b0b9781de9c685bcc73b121ad2202c1d7f3698e
6
+ metadata.gz: f933116dd5dbbe78186a8798e50cb9f15c92749e632fde5a7bdee589a74404d27ad049a020106e8dd5dbde4bba05befab68e2bd0850a388757a021bdcda08b76
7
+ data.tar.gz: 5d239e8b15c8a78138776a16a7e1795ea199c26a1978b506441124b23c6f54d54ee3cb5e836071103d6dd6cb919d808b8e674b71f3e6b307c1870c08d0c53e55
@@ -1,7 +1,15 @@
1
1
  # Change Log
2
2
 
3
- ## [5.3.0](https://github.com/berkshelf/berkshelf/tree/5.3.0) (2016-12-15)
4
- [Full Changelog](https://github.com/berkshelf/berkshelf/compare/v5.2.0...5.3.0)
3
+ ## [5.4.0](https://github.com/berkshelf/berkshelf/tree/5.4.0) (2017-01-19)
4
+ [Full Changelog](https://github.com/berkshelf/berkshelf/compare/v5.3.0...5.4.0)
5
+
6
+ **Merged pull requests:**
7
+
8
+ - vendor the metadata.rb file [\#1652](https://github.com/berkshelf/berkshelf/pull/1652) ([lamont-granquist](https://github.com/lamont-granquist))
9
+ - Add a format option to berkz viz that outputs a dotfile [\#1646](https://github.com/berkshelf/berkshelf/pull/1646) ([borntyping](https://github.com/borntyping))
10
+
11
+ ## [v5.3.0](https://github.com/berkshelf/berkshelf/tree/v5.3.0) (2016-12-15)
12
+ [Full Changelog](https://github.com/berkshelf/berkshelf/compare/v5.2.0...v5.3.0)
5
13
 
6
14
  **Merged pull requests:**
7
15
 
@@ -302,7 +310,7 @@
302
310
  - Fix typo in show cmd description [\#1187](https://github.com/berkshelf/berkshelf/pull/1187) ([dougireton](https://github.com/dougireton))
303
311
  - Do not care about ordered output during installation [\#1186](https://github.com/berkshelf/berkshelf/pull/1186) ([sethvargo](https://github.com/sethvargo))
304
312
  - Update README.md.erb [\#1183](https://github.com/berkshelf/berkshelf/pull/1183) ([mjuszczak](https://github.com/mjuszczak))
305
- - Fix Berkshelf::Graph\#update [\#1182](https://github.com/berkshelf/berkshelf/pull/1182) ([mjcdiggity](https://github.com/mjcdiggity))
313
+ - Fix Berkshelf::Graph\#update [\#1182](https://github.com/berkshelf/berkshelf/pull/1182) ([carkmorwin](https://github.com/carkmorwin))
306
314
  - Update to buff-config ~\> 0.4 [\#1180](https://github.com/berkshelf/berkshelf/pull/1180) ([sethvargo](https://github.com/sethvargo))
307
315
  - Fix infinite lock check [\#1178](https://github.com/berkshelf/berkshelf/pull/1178) ([mi-wood](https://github.com/mi-wood))
308
316
  - Create a subclass of the shell instead of a module [\#1177](https://github.com/berkshelf/berkshelf/pull/1177) ([sethvargo](https://github.com/sethvargo))
@@ -359,7 +367,7 @@
359
367
  **Merged pull requests:**
360
368
 
361
369
  - `berks vendor` "cannot be trusted!" error [\#1124](https://github.com/berkshelf/berkshelf/pull/1124) ([JeanMertz](https://github.com/JeanMertz))
362
- - Fix community cookbook download error [\#1123](https://github.com/berkshelf/berkshelf/pull/1123) ([mjcdiggity](https://github.com/mjcdiggity))
370
+ - Fix community cookbook download error [\#1123](https://github.com/berkshelf/berkshelf/pull/1123) ([carkmorwin](https://github.com/carkmorwin))
363
371
  - Remove gecode install instructions from README [\#1122](https://github.com/berkshelf/berkshelf/pull/1122) ([danielsdeleo](https://github.com/danielsdeleo))
364
372
 
365
373
  ## [v3.0.0.rc1](https://github.com/berkshelf/berkshelf/tree/v3.0.0.rc1) (2014-04-09)
@@ -1318,6 +1326,8 @@
1318
1326
  [Full Changelog](https://github.com/berkshelf/berkshelf/compare/v0.1.0...v0.1.1)
1319
1327
 
1320
1328
  ## [v0.1.0](https://github.com/berkshelf/berkshelf/tree/v0.1.0) (2012-06-21)
1329
+ [Full Changelog](https://github.com/berkshelf/berkshelf/compare/25612cf3601733a37727f1f490e69fdf48963d36...v0.1.0)
1330
+
1321
1331
  **Merged pull requests:**
1322
1332
 
1323
1333
  - Rename to Berkshelf [\#54](https://github.com/berkshelf/berkshelf/pull/54) ([reset](https://github.com/reset))
@@ -1363,4 +1373,4 @@
1363
1373
 
1364
1374
 
1365
1375
 
1366
- \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
1376
+ \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
data/Gemfile CHANGED
@@ -2,6 +2,10 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
+ group :changelog do
6
+ gem "github_changelog_generator", git: "https://github.com/tduffield/github-changelog-generator", branch: "adjust-tag-section-mapping"
7
+ end
8
+
5
9
  group :guard do
6
10
  gem 'coolline'
7
11
  gem 'guard'
@@ -30,6 +34,10 @@ group :guard do
30
34
  end
31
35
  end
32
36
 
37
+ group :build do
38
+ gem 'rake', '>= 10.1'
39
+ end
40
+
33
41
  group :development do
34
42
  # these all deliberately float because berkshelf has a Gemfile.lock that
35
43
  # equality pins them. temporarily pin as necessary for API breaks.
@@ -37,7 +45,6 @@ group :development do
37
45
  gem 'chef-zero', '>= 4.0'
38
46
  gem 'dep_selector', '>= 1.0'
39
47
  gem 'fuubar', '>= 2.0'
40
- gem 'rake', '>= 10.1'
41
48
  gem 'rspec', '>= 3.0'
42
49
  gem 'spork', '>= 0.9'
43
50
  gem 'test-kitchen', '>= 1.2'
@@ -47,10 +54,6 @@ group :development do
47
54
  gem 'activesupport', '~> 4.0' # pinning for ruby 2.1.x
48
55
  end
49
56
 
50
- group :changelog do
51
- gem 'github_changelog_generator', "1.11.3"
52
- end
53
-
54
57
  group :test do
55
58
  gem "berkshelf-api", git: "https://github.com/berkshelf/berkshelf-api.git", ref: "9fb3d95779c4ff72b0074072105caaf70b978bf0"
56
59
  end
@@ -17,10 +17,24 @@ GIT
17
17
  semverse (>= 1.0, < 3.0)
18
18
  varia_model (~> 0.4)
19
19
 
20
+ GIT
21
+ remote: https://github.com/tduffield/github-changelog-generator
22
+ revision: 8effcdd6988617b453669965fedc1280aa84bd7a
23
+ branch: adjust-tag-section-mapping
24
+ specs:
25
+ github_changelog_generator (1.14.2)
26
+ activesupport
27
+ faraday-http-cache
28
+ multi_json
29
+ octokit (~> 4.6)
30
+ rainbow (>= 2.1)
31
+ rake (>= 10.0)
32
+ retriable (>= 1.4)
33
+
20
34
  PATH
21
35
  remote: .
22
36
  specs:
23
- berkshelf (5.3.0)
37
+ berkshelf (5.4.0)
24
38
  addressable (~> 2.3, >= 2.3.4)
25
39
  berkshelf-api-client (>= 2.0.2, < 4.0)
26
40
  buff-config (~> 2.0)
@@ -57,7 +71,6 @@ GEM
57
71
  ffi (~> 1.9.10)
58
72
  rspec-expectations (>= 2.99)
59
73
  thor (~> 0.19)
60
- ast (2.3.0)
61
74
  axiom-types (0.1.1)
62
75
  descendants_tracker (~> 0.0.4)
63
76
  ice_nine (~> 0.11.0)
@@ -97,7 +110,6 @@ GEM
97
110
  coderay (1.1.1)
98
111
  coercible (1.0.0)
99
112
  descendants_tracker (~> 0.0.1)
100
- colorize (0.8.1)
101
113
  contracts (0.14.0)
102
114
  coolline (0.5.0)
103
115
  unicode_utils (~> 1.4)
@@ -127,6 +139,8 @@ GEM
127
139
  erubis (2.7.0)
128
140
  faraday (0.9.2)
129
141
  multipart-post (>= 1.2, < 3)
142
+ faraday-http-cache (2.0.0)
143
+ faraday (~> 0.8)
130
144
  ffi (1.9.14)
131
145
  ffi-yajl (2.3.0)
132
146
  libyajl2 (~> 1.2)
@@ -136,20 +150,6 @@ GEM
136
150
  ruby-progressbar (~> 1.4)
137
151
  fuzzyurl (0.9.0)
138
152
  gherkin (4.0.0)
139
- github_api (0.14.5)
140
- addressable (~> 2.4.0)
141
- descendants_tracker (~> 0.0.4)
142
- faraday (~> 0.8, < 0.10)
143
- hashie (>= 3.4)
144
- oauth2 (~> 1.0)
145
- github_changelog_generator (1.11.3)
146
- bundler (>= 1.7)
147
- colorize (~> 0.7)
148
- github_api (~> 0.12)
149
- overcommit (>= 0.31)
150
- rake (>= 10.0)
151
- rspec (>= 3.2)
152
- rubocop (>= 0.31)
153
153
  grape (0.18.0)
154
154
  activesupport
155
155
  builder
@@ -202,9 +202,7 @@ GEM
202
202
  httpclient (2.8.2.4)
203
203
  i18n (0.7.0)
204
204
  ice_nine (0.11.2)
205
- iniparse (1.4.2)
206
205
  json (1.8.3)
207
- jwt (1.5.6)
208
206
  libyajl2 (1.2.0)
209
207
  listen (3.1.5)
210
208
  rb-fsevent (~> 0.9, >= 0.9.4)
@@ -227,7 +225,7 @@ GEM
227
225
  mixlib-log (1.7.1)
228
226
  mixlib-shellout (2.2.7)
229
227
  mixlib-versioning (1.1.0)
230
- molinillo (0.5.4)
228
+ molinillo (0.5.5)
231
229
  msgpack (1.0.2)
232
230
  multi_json (1.12.1)
233
231
  multi_test (0.1.2)
@@ -247,20 +245,8 @@ GEM
247
245
  notiffany (0.1.1)
248
246
  nenv (~> 0.1)
249
247
  shellany (~> 0.0)
250
- oauth2 (1.2.0)
251
- faraday (>= 0.8, < 0.10)
252
- jwt (~> 1.0)
253
- multi_json (~> 1.3)
254
- multi_xml (~> 0.5)
255
- rack (>= 1.2, < 3)
256
248
  octokit (4.6.2)
257
249
  sawyer (~> 0.8.0, >= 0.5.3)
258
- overcommit (0.37.0)
259
- childprocess (~> 0.5.8)
260
- iniparse (~> 1.4)
261
- parser (2.3.3.0)
262
- ast (~> 2.2)
263
- powerpack (0.1.1)
264
250
  pry (0.10.4)
265
251
  coderay (~> 1.1.0)
266
252
  method_source (~> 0.8.1)
@@ -268,7 +254,7 @@ GEM
268
254
  rack (2.0.1)
269
255
  rack-accept (0.4.5)
270
256
  rack (>= 0.4)
271
- rainbow (2.1.0)
257
+ rainbow (2.2.1)
272
258
  rake (11.3.0)
273
259
  rb-fsevent (0.9.8)
274
260
  rb-inotify (0.9.7)
@@ -279,6 +265,7 @@ GEM
279
265
  http (>= 0.6.0.pre)
280
266
  http_parser.rb (>= 0.6.0)
281
267
  websocket-driver (>= 0.5.1)
268
+ retriable (3.0.0)
282
269
  retryable (2.0.4)
283
270
  ridley (5.1.0)
284
271
  addressable
@@ -311,12 +298,6 @@ GEM
311
298
  diff-lcs (>= 1.2.0, < 2.0)
312
299
  rspec-support (~> 3.5.0)
313
300
  rspec-support (3.5.0)
314
- rubocop (0.45.0)
315
- parser (>= 2.3.1.1, < 3.0)
316
- powerpack (~> 0.1)
317
- rainbow (>= 1.99.1, < 3.0)
318
- ruby-progressbar (~> 1.7)
319
- unicode-display_width (~> 1.0, >= 1.0.1)
320
301
  ruby-progressbar (1.8.1)
321
302
  ruby_dep (1.5.0)
322
303
  safe_yaml (1.0.4)
@@ -348,7 +329,6 @@ GEM
348
329
  unf (0.1.4)
349
330
  unf_ext
350
331
  unf_ext (0.0.7.2)
351
- unicode-display_width (1.1.1)
352
332
  unicode_utils (1.4.0)
353
333
  uuidtools (2.1.5)
354
334
  varia_model (0.6.0)
@@ -380,7 +360,7 @@ DEPENDENCIES
380
360
  coolline
381
361
  dep_selector (>= 1.0)
382
362
  fuubar (>= 2.0)
383
- github_changelog_generator (= 1.11.3)
363
+ github_changelog_generator!
384
364
  growl
385
365
  guard
386
366
  guard-cucumber
@@ -396,4 +376,4 @@ DEPENDENCIES
396
376
  yard (>= 0.8)
397
377
 
398
378
  BUNDLED WITH
399
- 1.13.6
379
+ 1.13.7
@@ -629,8 +629,6 @@ module Berkshelf
629
629
  Dir.mktmpdir('vendor') do |scratch|
630
630
  chefignore = nil
631
631
  cached_cookbooks = install
632
- raw_metadata_files = []
633
-
634
632
  return nil if cached_cookbooks.empty?
635
633
 
636
634
  cached_cookbooks.each do |cookbook|
@@ -649,27 +647,10 @@ module Berkshelf
649
647
  cookbook.compile_metadata(cookbook_destination)
650
648
  end
651
649
 
652
- raw_metadata_files << File::join(cookbook.cookbook_name, 'metadata.rb')
653
-
654
650
  FileUtils.cp_r(files, cookbook_destination)
655
651
  end
656
652
 
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)
653
+ FileSyncer.sync(scratch, destination, exclude: EXCLUDED_VCS_FILES_WHEN_VENDORING, delete: @delete)
673
654
  end
674
655
 
675
656
  destination
@@ -694,12 +675,21 @@ module Berkshelf
694
675
  #
695
676
  # @return [String] path
696
677
  # the path where the image was written
697
- def viz(outfile = nil)
678
+ def viz(outfile = nil, format = 'png')
698
679
  outfile = File.join(Dir.pwd, outfile || 'graph.png')
699
680
 
700
681
  validate_lockfile_present!
701
682
  validate_lockfile_trusted!
702
- Visualizer.from_lockfile(lockfile).to_png(outfile)
683
+ vizualiser = Visualizer.from_lockfile(lockfile)
684
+
685
+ case format
686
+ when 'dot'
687
+ vizualiser.to_dot_file(outfile)
688
+ when 'png'
689
+ vizualiser.to_png(outfile)
690
+ else
691
+ raise ConfigurationError, "Vizualiser format #{format} not recognised."
692
+ end
703
693
  end
704
694
 
705
695
  # Get the lockfile corresponding to this Berksfile. This is necessary because
@@ -421,10 +421,16 @@ EOF
421
421
  desc: 'The name of the output file',
422
422
  aliases: '-o',
423
423
  banner: 'NAME'
424
+ method_option :outfile_format,
425
+ type: :string,
426
+ default: 'png',
427
+ desc: 'The format of the output file, either png or dot.',
428
+ aliases: '-f',
429
+ banner: 'FORMAT'
424
430
  desc "viz", "Visualize the dependency graph"
425
431
  def viz
426
432
  berksfile = Berksfile.from_options(options)
427
- path = berksfile.viz(options[:outfile])
433
+ path = berksfile.viz(options[:outfile], options[:outfile_format])
428
434
 
429
435
  Berkshelf.ui.info(path)
430
436
  end
@@ -1,3 +1,3 @@
1
1
  module Berkshelf
2
- VERSION = "5.3.0"
2
+ VERSION = "5.4.0"
3
3
  end
@@ -76,6 +76,11 @@ module Berkshelf
76
76
  out
77
77
  end
78
78
 
79
+ def to_dot_file(outfile = 'graph.dot')
80
+ File.open(outfile, 'w') { |f| f.write(to_dot) }
81
+ File.expand_path(outfile)
82
+ end
83
+
79
84
  # Save the graph visually as a PNG.
80
85
  #
81
86
  # @param [String] outfile
@@ -387,10 +387,9 @@ 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')] }
391
390
 
392
391
  let(:destination) { '/a/destination/path' }
393
- let(:options) { { :exclude => raw_metadata_files + Berkshelf::Berksfile::EXCLUDED_VCS_FILES_WHEN_VENDORING, delete: nil } }
392
+ let(:options) { { :exclude => Berkshelf::Berksfile::EXCLUDED_VCS_FILES_WHEN_VENDORING, delete: nil } }
394
393
 
395
394
  before do
396
395
  allow(Berkshelf::Installer).to receive(:new).and_return(installer)
@@ -402,9 +401,9 @@ describe Berkshelf::Berksfile do
402
401
  subject.vendor(destination)
403
402
  end
404
403
 
405
- it 'excludes the top-level metadata.rb file' do
404
+ it 'includes the top-level metadata.rb file' do
406
405
  expect(options[:exclude].any? { |exclude| File.fnmatch?(exclude, 'my_cookbook/recipes/metadata.rb', File::FNM_DOTMATCH) }).to be(false)
407
- expect(options[:exclude].any? { |exclude| File.fnmatch?(exclude, 'my_cookbook/metadata.rb', File::FNM_DOTMATCH) }).to be(true)
406
+ expect(options[:exclude].any? { |exclude| File.fnmatch?(exclude, 'my_cookbook/metadata.rb', File::FNM_DOTMATCH) }).to be(false)
408
407
  end
409
408
  end
410
409
 
@@ -31,6 +31,15 @@ module Berkshelf
31
31
  end
32
32
 
33
33
  context 'when the graphviz command succeeds', :graphviz do
34
+ it 'builds a dot from a Lockfile' do
35
+ outfile = tmp_path.join('test-graph.dot').to_s
36
+ lockfile = Lockfile.from_file(fixtures_path.join('lockfiles/default.lock').to_s)
37
+
38
+ Visualizer.from_lockfile(lockfile).to_dot_file(outfile)
39
+
40
+ expect(File.exists?(outfile)).to be true
41
+ end
42
+
34
43
  it 'builds a png from a Lockfile' do
35
44
  outfile = tmp_path.join('test-graph.png').to_s
36
45
  lockfile = Lockfile.from_file(fixtures_path.join('lockfiles/default.lock').to_s)
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.3.0
4
+ version: 5.4.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: 2016-12-15 00:00:00.000000000 Z
15
+ date: 2017-01-19 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.6.8
481
+ rubygems_version: 2.5.1
482
482
  signing_key:
483
483
  specification_version: 4
484
484
  summary: Manages a Cookbook's, or an Application's, Cookbook dependencies