berkshelf 6.0.1 → 6.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 +4 -4
- data/.travis.yml +8 -3
- data/Gemfile +1 -28
- data/Gemfile.lock +27 -94
- data/Rakefile +10 -0
- data/appveyor.yml +2 -2
- data/berkshelf.gemspec +2 -1
- data/features/commands/install.feature +21 -0
- data/features/step_definitions/berksfile_steps.rb +1 -1
- data/features/step_definitions/environment_steps.rb +1 -1
- data/features/step_definitions/json_steps.rb +2 -2
- data/features/support/env.rb +0 -2
- data/lib/berkshelf/berksfile.rb +1 -1
- data/lib/berkshelf/chef_repo_universe.rb +45 -0
- data/lib/berkshelf/cli.rb +1 -2
- data/lib/berkshelf/community_rest.rb +6 -37
- data/lib/berkshelf/config.rb +3 -0
- data/lib/berkshelf/downloader.rb +2 -2
- data/lib/berkshelf/formatters/human.rb +3 -1
- data/lib/berkshelf/installer.rb +14 -6
- data/lib/berkshelf/locations/git.rb +0 -2
- data/lib/berkshelf/mixin/git.rb +4 -3
- data/lib/berkshelf/shell_out.rb +17 -0
- data/lib/berkshelf/source.rb +30 -17
- data/lib/berkshelf/source_uri.rb +1 -1
- data/lib/berkshelf/ssl_policies.rb +1 -1
- data/lib/berkshelf/streaming_file_adapter.rb +22 -0
- data/lib/berkshelf/version.rb +1 -1
- data/lib/berkshelf/visualizer.rb +3 -3
- data/spec/fixtures/complex-cookbook-path/cookbooks/app/metadata.rb +2 -0
- data/spec/fixtures/complex-cookbook-path/cookbooks/jenkins-config/metadata.rb +4 -0
- data/spec/fixtures/complex-cookbook-path/cookbooks/jenkins/metadata.rb +2 -0
- data/spec/support/git.rb +18 -17
- data/spec/support/kitchen.rb +0 -14
- data/spec/unit/berkshelf/chef_repo_universe_spec.rb +37 -0
- data/spec/unit/berkshelf/config_spec.rb +46 -0
- data/spec/unit/berkshelf/cookbook_generator_spec.rb +0 -8
- data/spec/unit/berkshelf/downloader_spec.rb +12 -9
- data/spec/unit/berkshelf/init_generator_spec.rb +0 -1
- data/spec/unit/berkshelf/locations/git_spec.rb +2 -2
- data/spec/unit/berkshelf/resolver/graph_spec.rb +3 -2
- data/spec/unit/berkshelf/source_spec.rb +55 -44
- data/spec/unit/berkshelf/ssl_policies_spec.rb +3 -2
- data/spec/unit/berkshelf/uploader_spec.rb +1 -0
- data/spec/unit/berkshelf/visualizer_spec.rb +1 -1
- metadata +30 -7
- data/Guardfile +0 -18
- data/lib/berkshelf/commands/test_command.rb +0 -13
@@ -12,6 +12,7 @@ describe Berkshelf::SSLPolicy do
|
|
12
12
|
chef_server_url: "http://configured-chef-server/",
|
13
13
|
validation_client_name: "validator",
|
14
14
|
validation_key: "validator.pem",
|
15
|
+
artifactory_api_key: "secret",
|
15
16
|
cookbook_copyright: "user",
|
16
17
|
cookbook_email: "user@example.com",
|
17
18
|
cookbook_license: "apachev2",
|
@@ -73,13 +74,13 @@ describe Berkshelf::SSLPolicy do
|
|
73
74
|
end
|
74
75
|
end
|
75
76
|
|
76
|
-
context
|
77
|
+
context "config has Windows backslashes in trusted_certs_dir path" do
|
77
78
|
before do
|
78
79
|
allow(chef_config).to receive_messages(trusted_certs_dir: self_signed_crt_path_windows_backslashes)
|
79
80
|
allow(File).to receive(:exist?).with(self_signed_crt_path_windows_forwardslashes).and_return(true)
|
80
81
|
end
|
81
82
|
|
82
|
-
it
|
83
|
+
it "replaces the backslashes in trusted_certs_dir from Berkshelf config with forwardslashes" do
|
83
84
|
expect(subject.trusted_certs_dir).to eq(
|
84
85
|
self_signed_crt_path_windows_forwardslashes
|
85
86
|
)
|
@@ -57,6 +57,7 @@ module Berkshelf
|
|
57
57
|
chef_server_url: "http://configured-chef-server/",
|
58
58
|
validation_client_name: "validator",
|
59
59
|
validation_key: "validator.pem",
|
60
|
+
artifactory_api_key: "secret",
|
60
61
|
cookbook_copyright: "user",
|
61
62
|
cookbook_email: "user@example.com",
|
62
63
|
cookbook_license: "apachev2",
|
@@ -21,7 +21,7 @@ module Berkshelf
|
|
21
21
|
|
22
22
|
context "when the graphviz command fails", :graphviz do
|
23
23
|
before do
|
24
|
-
response = double(
|
24
|
+
response = double(error?: true, stderr: "Something happened!")
|
25
25
|
allow(subject).to receive(:shell_out).and_return(response)
|
26
26
|
end
|
27
27
|
|
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: 6.0
|
4
|
+
version: 6.1.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-05-
|
15
|
+
date: 2017-05-31 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: addressable
|
@@ -83,19 +83,19 @@ dependencies:
|
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: '2.0'
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
|
-
name:
|
86
|
+
name: mixlib-shellout
|
87
87
|
requirement: !ruby/object:Gem::Requirement
|
88
88
|
requirements:
|
89
89
|
- - "~>"
|
90
90
|
- !ruby/object:Gem::Version
|
91
|
-
version: '
|
91
|
+
version: '2.0'
|
92
92
|
type: :runtime
|
93
93
|
prerelease: false
|
94
94
|
version_requirements: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
96
|
- - "~>"
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
version: '
|
98
|
+
version: '2.0'
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
100
|
name: cleanroom
|
101
101
|
requirement: !ruby/object:Gem::Requirement
|
@@ -254,6 +254,20 @@ dependencies:
|
|
254
254
|
- - "~>"
|
255
255
|
- !ruby/object:Gem::Version
|
256
256
|
version: '0.4'
|
257
|
+
- !ruby/object:Gem::Dependency
|
258
|
+
name: concurrent-ruby
|
259
|
+
requirement: !ruby/object:Gem::Requirement
|
260
|
+
requirements:
|
261
|
+
- - "~>"
|
262
|
+
- !ruby/object:Gem::Version
|
263
|
+
version: '1.0'
|
264
|
+
type: :runtime
|
265
|
+
prerelease: false
|
266
|
+
version_requirements: !ruby/object:Gem::Requirement
|
267
|
+
requirements:
|
268
|
+
- - "~>"
|
269
|
+
- !ruby/object:Gem::Version
|
270
|
+
version: '1.0'
|
257
271
|
description: Manages a Cookbook's, or an Application's, Cookbook dependencies
|
258
272
|
email:
|
259
273
|
- jamie@vialstudios.com
|
@@ -274,7 +288,6 @@ files:
|
|
274
288
|
- CONTRIBUTING.md
|
275
289
|
- Gemfile
|
276
290
|
- Gemfile.lock
|
277
|
-
- Guardfile
|
278
291
|
- LICENSE
|
279
292
|
- PLUGINS.md
|
280
293
|
- README.md
|
@@ -344,9 +357,9 @@ files:
|
|
344
357
|
- lib/berkshelf/base_generator.rb
|
345
358
|
- lib/berkshelf/berksfile.rb
|
346
359
|
- lib/berkshelf/cached_cookbook.rb
|
360
|
+
- lib/berkshelf/chef_repo_universe.rb
|
347
361
|
- lib/berkshelf/cli.rb
|
348
362
|
- lib/berkshelf/commands/shelf.rb
|
349
|
-
- lib/berkshelf/commands/test_command.rb
|
350
363
|
- lib/berkshelf/community_rest.rb
|
351
364
|
- lib/berkshelf/config.rb
|
352
365
|
- lib/berkshelf/cookbook_generator.rb
|
@@ -379,9 +392,11 @@ files:
|
|
379
392
|
- lib/berkshelf/resolver.rb
|
380
393
|
- lib/berkshelf/resolver/graph.rb
|
381
394
|
- lib/berkshelf/shell.rb
|
395
|
+
- lib/berkshelf/shell_out.rb
|
382
396
|
- lib/berkshelf/source.rb
|
383
397
|
- lib/berkshelf/source_uri.rb
|
384
398
|
- lib/berkshelf/ssl_policies.rb
|
399
|
+
- lib/berkshelf/streaming_file_adapter.rb
|
385
400
|
- lib/berkshelf/thor.rb
|
386
401
|
- lib/berkshelf/thor_ext.rb
|
387
402
|
- lib/berkshelf/thor_ext/hash_with_indifferent_access.rb
|
@@ -395,6 +410,9 @@ files:
|
|
395
410
|
- spec/data/trusted_certs/example.crt
|
396
411
|
- spec/fixtures/Berksfile
|
397
412
|
- spec/fixtures/berksfiles/default
|
413
|
+
- spec/fixtures/complex-cookbook-path/cookbooks/app/metadata.rb
|
414
|
+
- spec/fixtures/complex-cookbook-path/cookbooks/jenkins-config/metadata.rb
|
415
|
+
- spec/fixtures/complex-cookbook-path/cookbooks/jenkins/metadata.rb
|
398
416
|
- spec/fixtures/cookbook-path/jenkins-config/metadata.rb
|
399
417
|
- spec/fixtures/cookbook-store/jenkins-2.0.3/metadata.rb
|
400
418
|
- spec/fixtures/cookbook-store/jenkins-2.0.4/metadata.rb
|
@@ -424,6 +442,7 @@ files:
|
|
424
442
|
- spec/support/shared_examples/formatter.rb
|
425
443
|
- spec/unit/berkshelf/berksfile_spec.rb
|
426
444
|
- spec/unit/berkshelf/cached_cookbook_spec.rb
|
445
|
+
- spec/unit/berkshelf/chef_repo_universe_spec.rb
|
427
446
|
- spec/unit/berkshelf/cli_spec.rb
|
428
447
|
- spec/unit/berkshelf/community_rest_spec.rb
|
429
448
|
- spec/unit/berkshelf/config_spec.rb
|
@@ -530,6 +549,9 @@ test_files:
|
|
530
549
|
- spec/data/trusted_certs/example.crt
|
531
550
|
- spec/fixtures/Berksfile
|
532
551
|
- spec/fixtures/berksfiles/default
|
552
|
+
- spec/fixtures/complex-cookbook-path/cookbooks/app/metadata.rb
|
553
|
+
- spec/fixtures/complex-cookbook-path/cookbooks/jenkins-config/metadata.rb
|
554
|
+
- spec/fixtures/complex-cookbook-path/cookbooks/jenkins/metadata.rb
|
533
555
|
- spec/fixtures/cookbook-path/jenkins-config/metadata.rb
|
534
556
|
- spec/fixtures/cookbook-store/jenkins-2.0.3/metadata.rb
|
535
557
|
- spec/fixtures/cookbook-store/jenkins-2.0.4/metadata.rb
|
@@ -559,6 +581,7 @@ test_files:
|
|
559
581
|
- spec/support/shared_examples/formatter.rb
|
560
582
|
- spec/unit/berkshelf/berksfile_spec.rb
|
561
583
|
- spec/unit/berkshelf/cached_cookbook_spec.rb
|
584
|
+
- spec/unit/berkshelf/chef_repo_universe_spec.rb
|
562
585
|
- spec/unit/berkshelf/cli_spec.rb
|
563
586
|
- spec/unit/berkshelf/community_rest_spec.rb
|
564
587
|
- spec/unit/berkshelf/config_spec.rb
|
data/Guardfile
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
rspec_cmd = "rspec"
|
2
|
-
rspec_cmd += " --color --format Fuubar"
|
3
|
-
rspec_cmd += " --tag ~@api_client --tag ~@not_supported_on_windows" if RUBY_PLATFORM =~ /mswin|mingw|windows/
|
4
|
-
guard "rspec", cmd: rspec_cmd, all_on_start: false, all_after_pass: false do
|
5
|
-
watch(%r{^spec/unit/.+_spec\.rb$})
|
6
|
-
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/unit/#{m[1]}_spec.rb" }
|
7
|
-
watch("spec/spec_helper.rb") { "spec" }
|
8
|
-
end
|
9
|
-
|
10
|
-
cucumber_args = "--format pretty --tags ~@no_run --tags ~@wip"
|
11
|
-
cucumber_args += " --tags ~@spawn --tags ~@api_server" if RUBY_PLATFORM =~ /mswin|mingw|windows/
|
12
|
-
guard "cucumber", cmd_additional_args: cucumber_args, all_on_start: false, all_after_pass: false do
|
13
|
-
watch(%r{^features/.+\.feature$})
|
14
|
-
watch(%r{^features/support/.+$}) { "features" }
|
15
|
-
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || "features" }
|
16
|
-
|
17
|
-
watch(%r{^lib/berkshelf/cli.rb}) { "features" }
|
18
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
begin
|
2
|
-
require "kitchen/cli"
|
3
|
-
rescue LoadError; end
|
4
|
-
|
5
|
-
module Berkshelf
|
6
|
-
class TestCommand < Kitchen::CLI
|
7
|
-
namespace "test"
|
8
|
-
end
|
9
|
-
|
10
|
-
class Cli < Thor
|
11
|
-
register(Berkshelf::TestCommand, "test", "test [COMMAND]", "Testing tasks for your cookbook", hide: true)
|
12
|
-
end
|
13
|
-
end if defined?(Kitchen::CLI)
|