berkshelf 5.5.0 → 5.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -3
  3. data/Gemfile +31 -31
  4. data/Gemfile.lock +3 -3
  5. data/Guardfile +13 -13
  6. data/Rakefile +1 -0
  7. data/Thorfile +16 -16
  8. data/berkshelf.gemspec +35 -35
  9. data/features/step_definitions/chef/config_steps.rb +4 -4
  10. data/features/step_definitions/chef_server_steps.rb +6 -6
  11. data/features/step_definitions/cli_steps.rb +3 -3
  12. data/features/step_definitions/config_steps.rb +5 -5
  13. data/features/step_definitions/filesystem_steps.rb +12 -11
  14. data/features/support/env.rb +21 -21
  15. data/lib/berkshelf.rb +66 -66
  16. data/lib/berkshelf/base_generator.rb +10 -11
  17. data/lib/berkshelf/berksfile.rb +38 -38
  18. data/lib/berkshelf/cached_cookbook.rb +7 -7
  19. data/lib/berkshelf/cli.rb +126 -126
  20. data/lib/berkshelf/commands/shelf.rb +19 -18
  21. data/lib/berkshelf/commands/test_command.rb +2 -2
  22. data/lib/berkshelf/community_rest.rb +38 -38
  23. data/lib/berkshelf/config.rb +42 -41
  24. data/lib/berkshelf/cookbook_generator.rb +38 -38
  25. data/lib/berkshelf/cookbook_store.rb +4 -4
  26. data/lib/berkshelf/core_ext/file_utils.rb +1 -1
  27. data/lib/berkshelf/dependency.rb +23 -21
  28. data/lib/berkshelf/downloader.rb +24 -25
  29. data/lib/berkshelf/errors.rb +17 -17
  30. data/lib/berkshelf/file_syncer.rb +9 -8
  31. data/lib/berkshelf/formatters/human.rb +3 -3
  32. data/lib/berkshelf/formatters/json.rb +2 -2
  33. data/lib/berkshelf/init_generator.rb +64 -64
  34. data/lib/berkshelf/installer.rb +103 -102
  35. data/lib/berkshelf/location.rb +9 -9
  36. data/lib/berkshelf/locations/git.rb +16 -16
  37. data/lib/berkshelf/locations/github.rb +1 -1
  38. data/lib/berkshelf/locations/path.rb +2 -2
  39. data/lib/berkshelf/lockfile.rb +309 -315
  40. data/lib/berkshelf/mixin/git.rb +3 -3
  41. data/lib/berkshelf/packager.rb +4 -4
  42. data/lib/berkshelf/resolver.rb +2 -2
  43. data/lib/berkshelf/resolver/graph.rb +1 -1
  44. data/lib/berkshelf/shell.rb +1 -1
  45. data/lib/berkshelf/source.rb +6 -6
  46. data/lib/berkshelf/source_uri.rb +2 -2
  47. data/lib/berkshelf/ssl_policies.rb +3 -3
  48. data/lib/berkshelf/thor.rb +1 -1
  49. data/lib/berkshelf/uploader.rb +48 -48
  50. data/lib/berkshelf/validator.rb +2 -2
  51. data/lib/berkshelf/version.rb +1 -1
  52. data/lib/berkshelf/visualizer.rb +11 -11
  53. data/spec/config/knife.rb +2 -2
  54. data/spec/fixtures/Berksfile +3 -3
  55. data/spec/fixtures/cookbook-path/jenkins-config/metadata.rb +3 -3
  56. data/spec/fixtures/cookbook-store/jenkins-2.0.3/metadata.rb +5 -5
  57. data/spec/fixtures/cookbook-store/jenkins-2.0.4/metadata.rb +4 -4
  58. data/spec/fixtures/cookbooks/example_cookbook-0.5.0/metadata.rb +3 -3
  59. data/spec/fixtures/cookbooks/example_cookbook/metadata.rb +3 -3
  60. data/spec/spec_helper.rb +9 -9
  61. data/spec/support/chef_api.rb +11 -12
  62. data/spec/support/chef_server.rb +10 -10
  63. data/spec/support/git.rb +23 -23
  64. data/spec/support/kitchen.rb +2 -2
  65. data/spec/support/matchers/filepath_matchers.rb +2 -2
  66. data/spec/support/path_helpers.rb +12 -12
  67. data/spec/support/shared_examples/formatter.rb +1 -1
  68. data/spec/unit/berkshelf/berksfile_spec.rb +78 -78
  69. data/spec/unit/berkshelf/cached_cookbook_spec.rb +42 -42
  70. data/spec/unit/berkshelf/cli_spec.rb +6 -6
  71. data/spec/unit/berkshelf/community_rest_spec.rb +83 -83
  72. data/spec/unit/berkshelf/config_spec.rb +13 -13
  73. data/spec/unit/berkshelf/cookbook_generator_spec.rb +39 -39
  74. data/spec/unit/berkshelf/cookbook_store_spec.rb +41 -41
  75. data/spec/unit/berkshelf/core_ext/file_utils_spec.rb +5 -6
  76. data/spec/unit/berkshelf/core_ext/pathname_spec.rb +1 -1
  77. data/spec/unit/berkshelf/dependency_spec.rb +43 -43
  78. data/spec/unit/berkshelf/downloader_spec.rb +20 -20
  79. data/spec/unit/berkshelf/errors_spec.rb +3 -3
  80. data/spec/unit/berkshelf/file_syncer_spec.rb +86 -86
  81. data/spec/unit/berkshelf/formatters/base_spec.rb +23 -23
  82. data/spec/unit/berkshelf/formatters/human_spec.rb +2 -2
  83. data/spec/unit/berkshelf/formatters/json_spec.rb +2 -2
  84. data/spec/unit/berkshelf/formatters/null_spec.rb +3 -3
  85. data/spec/unit/berkshelf/init_generator_spec.rb +92 -92
  86. data/spec/unit/berkshelf/installer_spec.rb +8 -8
  87. data/spec/unit/berkshelf/location_spec.rb +11 -11
  88. data/spec/unit/berkshelf/locations/base_spec.rb +35 -35
  89. data/spec/unit/berkshelf/locations/git_spec.rb +87 -87
  90. data/spec/unit/berkshelf/locations/path_spec.rb +40 -40
  91. data/spec/unit/berkshelf/lockfile_parser_spec.rb +71 -71
  92. data/spec/unit/berkshelf/lockfile_spec.rb +197 -197
  93. data/spec/unit/berkshelf/logger_spec.rb +3 -3
  94. data/spec/unit/berkshelf/mixin/logging_spec.rb +5 -5
  95. data/spec/unit/berkshelf/packager_spec.rb +2 -2
  96. data/spec/unit/berkshelf/resolver/graph_spec.rb +1 -1
  97. data/spec/unit/berkshelf/resolver_spec.rb +17 -17
  98. data/spec/unit/berkshelf/shell_spec.rb +34 -34
  99. data/spec/unit/berkshelf/source_spec.rb +12 -11
  100. data/spec/unit/berkshelf/source_uri_spec.rb +1 -1
  101. data/spec/unit/berkshelf/ssl_policies_spec.rb +25 -25
  102. data/spec/unit/berkshelf/uploader_spec.rb +54 -54
  103. data/spec/unit/berkshelf/validator_spec.rb +16 -16
  104. data/spec/unit/berkshelf/visualizer_spec.rb +17 -17
  105. data/spec/unit/berkshelf_spec.rb +18 -18
  106. metadata +5 -5
@@ -1,11 +1,11 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  module Berkshelf
4
4
  describe Uploader do
5
5
  let(:berksfile) do
6
6
  double(Berksfile,
7
7
  lockfile: lockfile,
8
- dependencies: [],
8
+ dependencies: []
9
9
  )
10
10
  end
11
11
 
@@ -16,53 +16,53 @@ module Berkshelf
16
16
  end
17
17
 
18
18
  let(:graph) { double(Lockfile::Graph, locks: {}) }
19
- let(:self_signed_crt_path) { File.join(BERKS_SPEC_DATA, 'trusted_certs') }
19
+ let(:self_signed_crt_path) { File.join(BERKS_SPEC_DATA, "trusted_certs") }
20
20
  let(:self_signed_crt) { OpenSSL::X509::Certificate.new(IO.read("#{self_signed_crt_path}/example.crt")) }
21
21
  let(:cert_store) { OpenSSL::X509::Store.new.add_cert(self_signed_crt) }
22
22
  let(:ssl_policy) { double(SSLPolicy, store: cert_store) }
23
23
 
24
24
  subject { Uploader.new(berksfile) }
25
25
 
26
- describe '#initialize' do
27
- it 'saves the berksfile' do
26
+ describe "#initialize" do
27
+ it "saves the berksfile" do
28
28
  instance = Uploader.new(berksfile)
29
29
  expect(instance.berksfile).to be(berksfile)
30
30
  end
31
31
 
32
- it 'saves the lockfile' do
32
+ it "saves the lockfile" do
33
33
  instance = Uploader.new(berksfile)
34
34
  expect(instance.lockfile).to be(lockfile)
35
35
  end
36
36
 
37
- it 'saves the options' do
37
+ it "saves the options" do
38
38
  instance = Uploader.new(berksfile, force: true, validate: false)
39
39
  options = instance.options
40
40
  expect(options[:force]).to be(true)
41
41
  expect(options[:validate]).to be(false)
42
42
  end
43
43
 
44
- it 'saves the names' do
45
- instance = Uploader.new(berksfile, 'cookbook_1', 'cookbook_2')
46
- expect(instance.names).to eq(['cookbook_1', 'cookbook_2'])
44
+ it "saves the names" do
45
+ instance = Uploader.new(berksfile, "cookbook_1", "cookbook_2")
46
+ expect(instance.names).to eq(%w{cookbook_1 cookbook_2})
47
47
  end
48
48
  end
49
49
 
50
- describe '#run' do
50
+ describe "#run" do
51
51
  let(:options) { Hash.new }
52
52
 
53
53
  let(:chef_config) do
54
54
  double(Ridley::Chef::Config,
55
- node_name: 'fake-client',
56
- client_key: 'client-key',
57
- chef_server_url: 'http://configured-chef-server/',
58
- validation_client_name: 'validator',
59
- validation_key: 'validator.pem',
60
- cookbook_copyright: 'user',
61
- cookbook_email: 'user@example.com',
62
- cookbook_license: 'apachev2',
55
+ node_name: "fake-client",
56
+ client_key: "client-key",
57
+ chef_server_url: "http://configured-chef-server/",
58
+ validation_client_name: "validator",
59
+ validation_key: "validator.pem",
60
+ cookbook_copyright: "user",
61
+ cookbook_email: "user@example.com",
62
+ cookbook_license: "apachev2",
63
63
  trusted_certs_dir: self_signed_crt_path,
64
64
  knife: {
65
- chef_guard: false
65
+ chef_guard: false,
66
66
  }
67
67
  )
68
68
  end
@@ -76,11 +76,11 @@ module Berkshelf
76
76
 
77
77
  let(:default_ridley_options) do
78
78
  {
79
- client_name: 'fake-client',
80
- client_key: 'client-key',
79
+ client_name: "fake-client",
80
+ client_key: "client-key",
81
81
  ssl: {
82
- verify: true
83
- }
82
+ verify: true,
83
+ },
84
84
  }
85
85
  end
86
86
 
@@ -89,97 +89,97 @@ module Berkshelf
89
89
  allow(Berkshelf).to receive(:ssl_policy).and_return(ssl_policy)
90
90
  end
91
91
 
92
- context 'when there is no value for :chef_server_url' do
92
+ context "when there is no value for :chef_server_url" do
93
93
  before { allow(chef_config).to receive_messages(chef_server_url: nil) }
94
- let(:message) { 'Missing required attribute in your Berkshelf configuration: chef.server_url' }
94
+ let(:message) { "Missing required attribute in your Berkshelf configuration: chef.server_url" }
95
95
 
96
- it 'raises an error' do
96
+ it "raises an error" do
97
97
  expect { subject.run }.to raise_error(Berkshelf::ChefConnectionError, message)
98
98
  end
99
99
  end
100
100
 
101
- context 'when there is no value for :client_name' do
101
+ context "when there is no value for :client_name" do
102
102
  before { allow(chef_config).to receive_messages(node_name: nil) }
103
- let(:message) { 'Missing required attribute in your Berkshelf configuration: chef.node_name' }
103
+ let(:message) { "Missing required attribute in your Berkshelf configuration: chef.node_name" }
104
104
 
105
- it 'raises an error' do
105
+ it "raises an error" do
106
106
  expect { subject.run }.to raise_error(Berkshelf::ChefConnectionError, message)
107
107
  end
108
108
  end
109
109
 
110
- context 'when there is no value for :client_key' do
110
+ context "when there is no value for :client_key" do
111
111
  before { allow(chef_config).to receive_messages(client_key: nil) }
112
- let(:message) { 'Missing required attribute in your Berkshelf configuration: chef.client_key' }
112
+ let(:message) { "Missing required attribute in your Berkshelf configuration: chef.client_key" }
113
113
 
114
- it 'raises an error' do
115
- expect {
114
+ it "raises an error" do
115
+ expect do
116
116
  subject.run
117
- }.to raise_error(Berkshelf::ChefConnectionError, message)
117
+ end.to raise_error(Berkshelf::ChefConnectionError, message)
118
118
  end
119
119
  end
120
120
 
121
- context 'when no options are given' do
121
+ context "when no options are given" do
122
122
  let(:ridley_options) do
123
- { server_url: 'http://configured-chef-server/' }.merge(default_ridley_options)
123
+ { server_url: "http://configured-chef-server/" }.merge(default_ridley_options)
124
124
  end
125
125
 
126
- it 'uses the Berkshelf::Config options' do
126
+ it "uses the Berkshelf::Config options" do
127
127
  expect(Ridley).to receive(:open).with(
128
128
  server_url: chef_config.chef_server_url,
129
129
  client_name: chef_config.node_name,
130
130
  client_key: chef_config.client_key,
131
131
  ssl: {
132
132
  verify: berkshelf_config.ssl.verify,
133
- cert_store: cert_store
133
+ cert_store: cert_store,
134
134
  }
135
135
  )
136
136
  subject.run
137
137
  end
138
138
  end
139
139
 
140
- context 'when ssl_verify: false is passed as an option' do
140
+ context "when ssl_verify: false is passed as an option" do
141
141
  subject { Uploader.new(berksfile, ssl_verify: false) }
142
142
 
143
- it 'uses the passed option' do
143
+ it "uses the passed option" do
144
144
  expect(Ridley).to receive(:open).with(
145
145
  server_url: chef_config.chef_server_url,
146
146
  client_name: chef_config.node_name,
147
147
  client_key: chef_config.client_key,
148
148
  ssl: {
149
149
  verify: false,
150
- cert_store: cert_store
150
+ cert_store: cert_store,
151
151
  }
152
152
  )
153
153
  subject.run
154
154
  end
155
155
  end
156
156
 
157
- context 'when a Chef Server url is passed as an option' do
158
- subject { Uploader.new(berksfile, server_url: 'http://custom') }
157
+ context "when a Chef Server url is passed as an option" do
158
+ subject { Uploader.new(berksfile, server_url: "http://custom") }
159
159
 
160
- it 'uses the passed in :server_url' do
160
+ it "uses the passed in :server_url" do
161
161
  expect(Ridley).to receive(:open)
162
- .with(include(server_url: 'http://custom'))
162
+ .with(include(server_url: "http://custom"))
163
163
  subject.run
164
164
  end
165
165
  end
166
166
 
167
- context 'when a client name is passed as an option' do
168
- subject { Uploader.new(berksfile, client_name: 'custom') }
167
+ context "when a client name is passed as an option" do
168
+ subject { Uploader.new(berksfile, client_name: "custom") }
169
169
 
170
- it 'uses the passed in :client_name' do
170
+ it "uses the passed in :client_name" do
171
171
  expect(Ridley).to receive(:open)
172
- .with(include(client_name: 'custom'))
172
+ .with(include(client_name: "custom"))
173
173
  subject.run
174
174
  end
175
175
  end
176
176
 
177
- context 'when a client key is passed as an option' do
178
- subject { Uploader.new(berksfile, client_key: 'custom') }
177
+ context "when a client key is passed as an option" do
178
+ subject { Uploader.new(berksfile, client_key: "custom") }
179
179
 
180
- it 'uses the passed in :client_key' do
180
+ it "uses the passed in :client_key" do
181
181
  expect(Ridley).to receive(:open)
182
- .with(include(client_key: 'custom'))
182
+ .with(include(client_key: "custom"))
183
183
  subject.run
184
184
  end
185
185
  end
@@ -1,30 +1,30 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe Berkshelf::Validator do
4
- describe '#validate_files' do
5
- let(:cookbook) { double('cookbook', cookbook_name: 'cookbook', path: 'path') }
4
+ describe "#validate_files" do
5
+ let(:cookbook) { double("cookbook", cookbook_name: "cookbook", path: "path") }
6
6
 
7
- it 'raises an error when the cookbook has spaces in the files' do
8
- allow(Dir).to receive(:glob).and_return(['/there are/spaces/in this/recipes/default.rb'])
9
- expect {
7
+ it "raises an error when the cookbook has spaces in the files" do
8
+ allow(Dir).to receive(:glob).and_return(["/there are/spaces/in this/recipes/default.rb"])
9
+ expect do
10
10
  subject.validate_files(cookbook)
11
- }.to raise_error(Berkshelf::InvalidCookbookFiles)
11
+ end.to raise_error(Berkshelf::InvalidCookbookFiles)
12
12
  end
13
13
 
14
- it 'does not raise an error when the cookbook is valid' do
15
- allow(Dir).to receive(:glob).and_return(['/there-are/no-spaces/in-this/recipes/default.rb'])
16
- expect {
14
+ it "does not raise an error when the cookbook is valid" do
15
+ allow(Dir).to receive(:glob).and_return(["/there-are/no-spaces/in-this/recipes/default.rb"])
16
+ expect do
17
17
  subject.validate_files(cookbook)
18
- }.to_not raise_error
18
+ end.to_not raise_error
19
19
  end
20
20
 
21
- it 'does not raise an exception with spaces in the path' do
22
- allow(Dir).to receive(:glob).and_return(['/there are/spaces/in this/recipes/default.rb'])
23
- allow_any_instance_of(Pathname).to receive(:dirname).and_return('/there are/spaces/in this')
21
+ it "does not raise an exception with spaces in the path" do
22
+ allow(Dir).to receive(:glob).and_return(["/there are/spaces/in this/recipes/default.rb"])
23
+ allow_any_instance_of(Pathname).to receive(:dirname).and_return("/there are/spaces/in this")
24
24
 
25
- expect {
25
+ expect do
26
26
  subject.validate_files(cookbook)
27
- }.to_not raise_error
27
+ end.to_not raise_error
28
28
  end
29
29
  end
30
30
  end
@@ -1,48 +1,48 @@
1
- require 'rspec'
2
- require 'spec_helper'
1
+ require "rspec"
2
+ require "spec_helper"
3
3
 
4
4
  module Berkshelf
5
5
  describe Visualizer, :not_supported_on_windows do
6
- describe '#to_png' do
7
- context 'when graphviz is not installed' do
6
+ describe "#to_png" do
7
+ context "when graphviz is not installed" do
8
8
  before do
9
9
  allow(Berkshelf).to receive(:which)
10
- .with('dot')
10
+ .with("dot")
11
11
  .and_return(nil)
12
12
  allow(Berkshelf).to receive(:which)
13
- .with('dot.exe')
13
+ .with("dot.exe")
14
14
  .and_return(nil)
15
15
  end
16
16
 
17
- it 'raises a GraphvizNotInstalled exception' do
17
+ it "raises a GraphvizNotInstalled exception" do
18
18
  expect { subject.to_png }.to raise_error(GraphvizNotInstalled)
19
19
  end
20
20
  end
21
21
 
22
- context 'when the graphviz command fails', :graphviz do
22
+ context "when the graphviz command fails", :graphviz do
23
23
  before do
24
- response = double(success?: false, stderr: 'Something happened!')
24
+ response = double(success?: false, stderr: "Something happened!")
25
25
  allow(subject).to receive(:shell_out).and_return(response)
26
26
  end
27
27
 
28
- it 'raises a GraphvizCommandFailed exception' do
28
+ it "raises a GraphvizCommandFailed exception" do
29
29
  expect { subject.to_png }.to raise_error(GraphvizCommandFailed)
30
30
  end
31
31
  end
32
32
 
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)
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
37
 
38
38
  Visualizer.from_lockfile(lockfile).to_dot_file(outfile)
39
39
 
40
40
  expect(File.exists?(outfile)).to be true
41
41
  end
42
42
 
43
- it 'builds a png from a Lockfile' do
44
- outfile = tmp_path.join('test-graph.png').to_s
45
- lockfile = Lockfile.from_file(fixtures_path.join('lockfiles/default.lock').to_s)
43
+ it "builds a png from a Lockfile" do
44
+ outfile = tmp_path.join("test-graph.png").to_s
45
+ lockfile = Lockfile.from_file(fixtures_path.join("lockfiles/default.lock").to_s)
46
46
 
47
47
  Visualizer.from_lockfile(lockfile).to_png(outfile)
48
48
 
@@ -1,16 +1,16 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  module Berkshelf
4
- describe '.formatter' do
5
- context 'with default formatter' do
4
+ describe ".formatter" do
5
+ context "with default formatter" do
6
6
  before { Berkshelf.instance_variable_set(:@formatter, nil) }
7
7
 
8
- it 'is human readable' do
8
+ it "is human readable" do
9
9
  expect(Berkshelf.formatter).to be_an_instance_of(HumanFormatter)
10
10
  end
11
11
  end
12
12
 
13
- context 'with a custom formatter' do
13
+ context "with a custom formatter" do
14
14
  before(:all) do
15
15
  Berkshelf.instance_eval { @formatter = nil }
16
16
  end
@@ -21,41 +21,41 @@ module Berkshelf
21
21
  Berkshelf.set_format :custom
22
22
  end
23
23
 
24
- it 'is custom class' do
24
+ it "is custom class" do
25
25
  expect(Berkshelf.formatter).to be_an_instance_of(CustomFormatter)
26
26
  end
27
27
  end
28
28
  end
29
29
 
30
- describe '.berkshelf_path' do
30
+ describe ".berkshelf_path" do
31
31
  before { Berkshelf.instance_variable_set(:@berkshelf_path, nil) }
32
32
 
33
- context 'with default path' do
33
+ context "with default path" do
34
34
  before do
35
- @berkshelf_path = ENV['BERKSHELF_PATH']
36
- ENV['BERKSHELF_PATH'] = nil
35
+ @berkshelf_path = ENV["BERKSHELF_PATH"]
36
+ ENV["BERKSHELF_PATH"] = nil
37
37
  end
38
38
 
39
39
  after do
40
- ENV['BERKSHELF_PATH'] = @berkshelf_path
40
+ ENV["BERKSHELF_PATH"] = @berkshelf_path
41
41
  end
42
42
 
43
- it 'is ~/.berkshelf' do
44
- expect(Berkshelf.berkshelf_path).to eq File.expand_path('~/.berkshelf')
45
- expect(Berkshelf.instance_variable_get(:@berkshelf_path)).to eq File.expand_path('~/.berkshelf')
43
+ it "is ~/.berkshelf" do
44
+ expect(Berkshelf.berkshelf_path).to eq File.expand_path("~/.berkshelf")
45
+ expect(Berkshelf.instance_variable_get(:@berkshelf_path)).to eq File.expand_path("~/.berkshelf")
46
46
  end
47
47
  end
48
48
 
49
49
  context 'with ENV["BERKSHELF_PATH"]' do
50
50
  it 'is ENV["BERKSHELF_PATH"]' do
51
- expect(Berkshelf.berkshelf_path).to eq File.expand_path(ENV['BERKSHELF_PATH'])
52
- expect(Berkshelf.instance_variable_get(:@berkshelf_path)).to eq File.expand_path(ENV['BERKSHELF_PATH'])
51
+ expect(Berkshelf.berkshelf_path).to eq File.expand_path(ENV["BERKSHELF_PATH"])
52
+ expect(Berkshelf.instance_variable_get(:@berkshelf_path)).to eq File.expand_path(ENV["BERKSHELF_PATH"])
53
53
  end
54
54
  end
55
55
  end
56
56
 
57
- describe '::log' do
58
- it 'returns Berkshelf::Logger' do
57
+ describe "::log" do
58
+ it "returns Berkshelf::Logger" do
59
59
  expect(Berkshelf.log).to be_a(Berkshelf::Logger)
60
60
  end
61
61
  end
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.5.0
4
+ version: 5.6.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-24 00:00:00.000000000 Z
15
+ date: 2017-02-02 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: addressable
@@ -246,14 +246,14 @@ dependencies:
246
246
  requirements:
247
247
  - - "~>"
248
248
  - !ruby/object:Gem::Version
249
- version: '0.1'
249
+ version: '0.4'
250
250
  type: :runtime
251
251
  prerelease: false
252
252
  version_requirements: !ruby/object:Gem::Requirement
253
253
  requirements:
254
254
  - - "~>"
255
255
  - !ruby/object:Gem::Version
256
- version: '0.1'
256
+ version: '0.4'
257
257
  description: Manages a Cookbook's, or an Application's, Cookbook dependencies
258
258
  email:
259
259
  - jamie@vialstudios.com
@@ -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.9
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