berkshelf 5.6.2 → 5.6.3
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 +17 -17
- data/CHANGELOG.md +16 -1
- data/Gemfile +6 -8
- data/Gemfile.lock +18 -14
- data/Guardfile +7 -12
- data/features/support/env.rb +64 -70
- data/lib/berkshelf/community_rest.rb +3 -2
- data/lib/berkshelf/version.rb +1 -1
- data/spec/spec_helper.rb +59 -65
- 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: ff1504161410f0f7f535a2d3c1227e66596d0e85
|
|
4
|
+
data.tar.gz: b0ee0d0640c9f5c3025b8cb26c694e9e3941bf91
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 11617a70da55c976441d47ce96baf8e89a4ed2f3edb88c9e102dafda4be9338953518d7b5e6fadb50e1e91094f28cc65ed4b52c702557c4c9300b15e4bc698a1
|
|
7
|
+
data.tar.gz: 92662654355e09f0537a46a00a96f8de7a39d9f127ee97b94ce86f734811513ce8db0dbc76681a00ef9ca79a5a0cf0cac8a3f39cbcf627826a01ac79211cab06
|
data/.travis.yml
CHANGED
|
@@ -44,23 +44,23 @@ matrix:
|
|
|
44
44
|
- rvm: 2.3.1
|
|
45
45
|
before_install:
|
|
46
46
|
rm Gemfile.lock
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
47
|
+
- rvm: 2.2.5
|
|
48
|
+
before_install:
|
|
49
|
+
# Failures in the berkshelf-api gemspec were happening with bundler 1.8
|
|
50
|
+
- gem install bundler --version=1.10.6
|
|
51
|
+
# Needed until https://github.com/travis-ci/apt-package-whitelist/pull/1820 is merged
|
|
52
|
+
- sudo apt-get update
|
|
53
|
+
- sudo apt-get -y install squid3
|
|
54
|
+
sudo: required
|
|
55
|
+
env:
|
|
56
|
+
- PROXY_TESTS_DIR=/tmp/proxy_tests
|
|
57
|
+
- PROXY_TESTS_REPO=$PROXY_TESTS_DIR/repo
|
|
58
|
+
- rvmsudo_secure_path=1
|
|
59
|
+
script:
|
|
60
|
+
- git clone https://github.com/chef/proxy_tests.git
|
|
61
|
+
- cd proxy_tests && chef-client -z -o proxy_tests::render && cd ..
|
|
62
|
+
- rvmsudo -E bundle exec bash $PROXY_TESTS_DIR/run_tests.sh berkshelf \* \* /tmp/out.txt
|
|
63
|
+
after_script: cat /tmp/out.txt
|
|
64
64
|
allow_failures:
|
|
65
65
|
- rvm: ruby-head
|
|
66
66
|
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## [5.6.3](https://github.com/berkshelf/berkshelf/tree/5.6.3) (2017-02-23)
|
|
4
|
+
[Full Changelog](https://github.com/berkshelf/berkshelf/compare/v5.6.2...5.6.3)
|
|
5
|
+
|
|
6
|
+
**Merged pull requests:**
|
|
7
|
+
|
|
8
|
+
- Specify appropriate proxies based on URI [\#1679](https://github.com/berkshelf/berkshelf/pull/1679) ([tduffield](https://github.com/tduffield))
|
|
9
|
+
- Remove spork [\#1672](https://github.com/berkshelf/berkshelf/pull/1672) ([biinari](https://github.com/biinari))
|
|
10
|
+
|
|
11
|
+
## [v5.6.2](https://github.com/berkshelf/berkshelf/tree/v5.6.2) (2017-02-05)
|
|
12
|
+
[Full Changelog](https://github.com/berkshelf/berkshelf/compare/v5.6.1...v5.6.2)
|
|
13
|
+
|
|
14
|
+
**Merged pull requests:**
|
|
15
|
+
|
|
16
|
+
- fix for including hashie versions before the logger appeared [\#1675](https://github.com/berkshelf/berkshelf/pull/1675) ([lamont-granquist](https://github.com/lamont-granquist))
|
|
17
|
+
|
|
3
18
|
## [v5.6.1](https://github.com/berkshelf/berkshelf/tree/v5.6.1) (2017-02-03)
|
|
4
19
|
[Full Changelog](https://github.com/berkshelf/berkshelf/compare/v5.6.0...v5.6.1)
|
|
5
20
|
|
|
@@ -1396,4 +1411,4 @@
|
|
|
1396
1411
|
|
|
1397
1412
|
|
|
1398
1413
|
|
|
1399
|
-
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
|
1414
|
+
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
data/Gemfile
CHANGED
|
@@ -11,23 +11,22 @@ group :guard do
|
|
|
11
11
|
gem "guard"
|
|
12
12
|
gem "guard-cucumber"
|
|
13
13
|
gem "guard-rspec"
|
|
14
|
-
gem "guard-spork"
|
|
15
14
|
|
|
16
15
|
require "rbconfig"
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
install_if -> { RbConfig::CONFIG["target_os"] =~ /darwin/i } do
|
|
19
18
|
gem "growl", require: false
|
|
20
19
|
gem "rb-fsevent", require: false
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
install_if -> { `uname`.strip == "Darwin" && `sw_vers -productVersion`.strip >= "10.8" } do
|
|
23
22
|
gem "terminal-notifier-guard", "~> 1.5.3", require: false
|
|
24
23
|
end rescue Errno::ENOENT
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
end
|
|
25
|
+
install_if -> {RbConfig::CONFIG["target_os"] =~ /linux/i } do
|
|
27
26
|
gem "libnotify", "~> 0.8.0", require: false
|
|
28
27
|
gem "rb-inotify", require: false
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
end
|
|
29
|
+
install_if -> { RbConfig::CONFIG["target_os"] =~ /mswin|mingw/i } do
|
|
31
30
|
gem "rb-notifu", ">= 0.0.4", require: false
|
|
32
31
|
gem "wdm", require: false
|
|
33
32
|
gem "win32console", require: false
|
|
@@ -46,7 +45,6 @@ group :development do
|
|
|
46
45
|
gem "dep_selector", ">= 1.0"
|
|
47
46
|
gem "fuubar", ">= 2.0"
|
|
48
47
|
gem "rspec", ">= 3.0"
|
|
49
|
-
gem "spork", ">= 0.9"
|
|
50
48
|
gem "test-kitchen", ">= 1.2"
|
|
51
49
|
gem "webmock", ">= 1.11"
|
|
52
50
|
gem "yard", ">= 0.8"
|
data/Gemfile.lock
CHANGED
|
@@ -20,7 +20,7 @@ GIT
|
|
|
20
20
|
PATH
|
|
21
21
|
remote: .
|
|
22
22
|
specs:
|
|
23
|
-
berkshelf (5.6.
|
|
23
|
+
berkshelf (5.6.3)
|
|
24
24
|
addressable (~> 2.3, >= 2.3.4)
|
|
25
25
|
berkshelf-api-client (>= 2.0.2, < 4.0)
|
|
26
26
|
buff-config (~> 2.0)
|
|
@@ -80,7 +80,7 @@ GEM
|
|
|
80
80
|
celluloid-io (0.16.2)
|
|
81
81
|
celluloid (>= 0.16.0)
|
|
82
82
|
nio4r (>= 1.1.0)
|
|
83
|
-
chef-config (12.
|
|
83
|
+
chef-config (12.19.33)
|
|
84
84
|
addressable
|
|
85
85
|
fuzzyurl
|
|
86
86
|
mixlib-config (~> 2.0)
|
|
@@ -177,13 +177,8 @@ GEM
|
|
|
177
177
|
guard (~> 2.1)
|
|
178
178
|
guard-compat (~> 1.1)
|
|
179
179
|
rspec (>= 2.99.0, < 4.0)
|
|
180
|
-
guard-spork (2.1.0)
|
|
181
|
-
childprocess (>= 0.2.3)
|
|
182
|
-
guard (~> 2.0)
|
|
183
|
-
guard-compat (~> 1.0)
|
|
184
|
-
spork (>= 0.8.4)
|
|
185
180
|
hashdiff (0.3.2)
|
|
186
|
-
hashie (3.5.
|
|
181
|
+
hashie (3.5.4)
|
|
187
182
|
hitimes (1.2.4)
|
|
188
183
|
http (2.2.0)
|
|
189
184
|
addressable (~> 2.3)
|
|
@@ -198,6 +193,8 @@ GEM
|
|
|
198
193
|
i18n (0.8.0)
|
|
199
194
|
ice_nine (0.11.2)
|
|
200
195
|
json (1.8.6)
|
|
196
|
+
libnotify (0.8.4)
|
|
197
|
+
ffi (>= 1.0.11)
|
|
201
198
|
libyajl2 (1.2.0)
|
|
202
199
|
listen (3.1.5)
|
|
203
200
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
|
@@ -205,7 +202,7 @@ GEM
|
|
|
205
202
|
ruby_dep (~> 1.2)
|
|
206
203
|
lumberjack (1.0.11)
|
|
207
204
|
method_source (0.8.2)
|
|
208
|
-
minitar (0.
|
|
205
|
+
minitar (0.6.1)
|
|
209
206
|
minitest (5.10.1)
|
|
210
207
|
mixlib-archive (0.4.1)
|
|
211
208
|
mixlib-log
|
|
@@ -220,7 +217,7 @@ GEM
|
|
|
220
217
|
mixlib-log (1.7.1)
|
|
221
218
|
mixlib-shellout (2.2.7)
|
|
222
219
|
mixlib-versioning (1.1.0)
|
|
223
|
-
molinillo (0.5.
|
|
220
|
+
molinillo (0.5.6)
|
|
224
221
|
msgpack (1.0.3)
|
|
225
222
|
multi_json (1.12.1)
|
|
226
223
|
multi_test (0.1.2)
|
|
@@ -255,6 +252,7 @@ GEM
|
|
|
255
252
|
rb-fsevent (0.9.8)
|
|
256
253
|
rb-inotify (0.9.8)
|
|
257
254
|
ffi (>= 0.5.0)
|
|
255
|
+
rb-notifu (0.0.4)
|
|
258
256
|
reel (0.6.1)
|
|
259
257
|
celluloid (>= 0.15.1)
|
|
260
258
|
celluloid-io (>= 0.15.0)
|
|
@@ -306,7 +304,7 @@ GEM
|
|
|
306
304
|
solve (3.1.0)
|
|
307
305
|
molinillo (>= 0.5)
|
|
308
306
|
semverse (>= 1.1, < 3.0)
|
|
309
|
-
|
|
307
|
+
terminal-notifier-guard (1.5.3)
|
|
310
308
|
test-kitchen (1.15.0)
|
|
311
309
|
mixlib-install (>= 1.2, < 3.0)
|
|
312
310
|
mixlib-shellout (>= 1.2, < 3.0)
|
|
@@ -335,6 +333,7 @@ GEM
|
|
|
335
333
|
coercible (~> 1.0)
|
|
336
334
|
descendants_tracker (~> 0.0, >= 0.0.3)
|
|
337
335
|
equalizer (~> 0.0, >= 0.0.9)
|
|
336
|
+
wdm (0.1.1)
|
|
338
337
|
webmock (2.3.2)
|
|
339
338
|
addressable (>= 2.3.6)
|
|
340
339
|
crack (>= 0.3.2)
|
|
@@ -342,6 +341,7 @@ GEM
|
|
|
342
341
|
websocket-driver (0.6.5)
|
|
343
342
|
websocket-extensions (>= 0.1.0)
|
|
344
343
|
websocket-extensions (0.1.2)
|
|
344
|
+
win32console (1.3.2)
|
|
345
345
|
yard (0.9.8)
|
|
346
346
|
|
|
347
347
|
PLATFORMS
|
|
@@ -361,15 +361,19 @@ DEPENDENCIES
|
|
|
361
361
|
guard
|
|
362
362
|
guard-cucumber
|
|
363
363
|
guard-rspec
|
|
364
|
-
guard-spork
|
|
365
364
|
http (>= 0.9.8)
|
|
365
|
+
libnotify (~> 0.8.0)
|
|
366
366
|
rake (>= 10.1)
|
|
367
367
|
rb-fsevent
|
|
368
|
+
rb-inotify
|
|
369
|
+
rb-notifu (>= 0.0.4)
|
|
368
370
|
rspec (>= 3.0)
|
|
369
|
-
|
|
371
|
+
terminal-notifier-guard (~> 1.5.3)
|
|
370
372
|
test-kitchen (>= 1.2)
|
|
373
|
+
wdm
|
|
371
374
|
webmock (>= 1.11)
|
|
375
|
+
win32console
|
|
372
376
|
yard (>= 0.8)
|
|
373
377
|
|
|
374
378
|
BUNDLED WITH
|
|
375
|
-
1.14.
|
|
379
|
+
1.14.3
|
data/Guardfile
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
end
|
|
6
|
-
|
|
7
|
-
rspec_cli = "--color --drb --format Fuubar"
|
|
8
|
-
rspec_cli += " --tag ~@api_client --tag ~@not_supported_on_windows" if RUBY_PLATFORM =~ /mswin|mingw|windows/
|
|
9
|
-
guard "rspec", cli: rspec_cli, all_on_start: false, all_after_pass: false do
|
|
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
|
|
10
5
|
watch(%r{^spec/unit/.+_spec\.rb$})
|
|
11
6
|
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/unit/#{m[1]}_spec.rb" }
|
|
12
7
|
watch("spec/spec_helper.rb") { "spec" }
|
|
13
8
|
end
|
|
14
9
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
guard "cucumber",
|
|
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
|
|
18
13
|
watch(%r{^features/.+\.feature$})
|
|
19
14
|
watch(%r{^features/support/.+$}) { "features" }
|
|
20
15
|
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || "features" }
|
data/features/support/env.rb
CHANGED
|
@@ -1,82 +1,76 @@
|
|
|
1
|
-
require "spork"
|
|
2
|
-
|
|
3
1
|
def windows?
|
|
4
2
|
!!(RUBY_PLATFORM =~ /mswin|mingw|windows/)
|
|
5
3
|
end
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
BERKS_API_PORT = 26210
|
|
22
|
-
|
|
23
|
-
at_exit do
|
|
24
|
-
Berkshelf::RSpec::ChefServer.stop
|
|
25
|
-
Berkshelf::API::RSpec::Server.stop unless windows?
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
Before do
|
|
29
|
-
|
|
30
|
-
# Legacy ENV variables until we can move over to all InProcess
|
|
31
|
-
Berkshelf.instance_variable_set(:@berkshelf_path, nil)
|
|
32
|
-
ENV["BERKSHELF_PATH"] = berkshelf_path.to_s
|
|
33
|
-
ENV["BERKSHELF_CONFIG"] = Berkshelf.config.path.to_s
|
|
34
|
-
ENV["BERKSHELF_CHEF_CONFIG"] = chef_config_path.to_s
|
|
35
|
-
|
|
36
|
-
aruba.config.command_launcher = :in_process
|
|
37
|
-
aruba.config.main_class = Berkshelf::Cli::Runner
|
|
38
|
-
@dirs = ["spec/tmp/aruba"] # set aruba's temporary directory
|
|
39
|
-
|
|
40
|
-
stub_kitchen!
|
|
41
|
-
clean_tmp_path
|
|
42
|
-
Berkshelf.initialize_filesystem
|
|
43
|
-
Berkshelf::CookbookStore.instance.initialize_filesystem
|
|
44
|
-
reload_configs
|
|
45
|
-
Berkshelf::CachedCookbook.instance_variable_set(:@loaded_cookbooks, nil)
|
|
46
|
-
|
|
47
|
-
endpoints = [
|
|
48
|
-
{
|
|
49
|
-
type: "chef_server",
|
|
50
|
-
options: {
|
|
51
|
-
url: "http://localhost:#{CHEF_SERVER_PORT}",
|
|
52
|
-
client_name: "reset",
|
|
53
|
-
client_key: File.expand_path("spec/config/berkshelf.pem"),
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
]
|
|
5
|
+
require "aruba/cucumber"
|
|
6
|
+
require "aruba/in_process"
|
|
7
|
+
require "aruba/spawn_process"
|
|
8
|
+
require "cucumber/rspec/doubles"
|
|
9
|
+
require "berkshelf/api/rspec" unless windows?
|
|
10
|
+
require "berkshelf/api/cucumber" unless windows?
|
|
11
|
+
|
|
12
|
+
Dir["spec/support/**/*.rb"].each { |f| require File.expand_path(f) }
|
|
13
|
+
|
|
14
|
+
World(Berkshelf::RSpec::PathHelpers)
|
|
15
|
+
World(Berkshelf::RSpec::Kitchen)
|
|
16
|
+
|
|
17
|
+
CHEF_SERVER_PORT = 26310
|
|
18
|
+
BERKS_API_PORT = 26210
|
|
57
19
|
|
|
58
|
-
|
|
59
|
-
|
|
20
|
+
at_exit do
|
|
21
|
+
Berkshelf::RSpec::ChefServer.stop
|
|
22
|
+
Berkshelf::API::RSpec::Server.stop unless windows?
|
|
23
|
+
end
|
|
60
24
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
25
|
+
Before do
|
|
26
|
+
|
|
27
|
+
# Legacy ENV variables until we can move over to all InProcess
|
|
28
|
+
Berkshelf.instance_variable_set(:@berkshelf_path, nil)
|
|
29
|
+
ENV["BERKSHELF_PATH"] = berkshelf_path.to_s
|
|
30
|
+
ENV["BERKSHELF_CONFIG"] = Berkshelf.config.path.to_s
|
|
31
|
+
ENV["BERKSHELF_CHEF_CONFIG"] = chef_config_path.to_s
|
|
32
|
+
|
|
33
|
+
aruba.config.command_launcher = :in_process
|
|
34
|
+
aruba.config.main_class = Berkshelf::Cli::Runner
|
|
35
|
+
@dirs = ["spec/tmp/aruba"] # set aruba's temporary directory
|
|
36
|
+
|
|
37
|
+
stub_kitchen!
|
|
38
|
+
clean_tmp_path
|
|
39
|
+
Berkshelf.initialize_filesystem
|
|
40
|
+
Berkshelf::CookbookStore.instance.initialize_filesystem
|
|
41
|
+
reload_configs
|
|
42
|
+
Berkshelf::CachedCookbook.instance_variable_set(:@loaded_cookbooks, nil)
|
|
43
|
+
|
|
44
|
+
endpoints = [
|
|
45
|
+
{
|
|
46
|
+
type: "chef_server",
|
|
47
|
+
options: {
|
|
48
|
+
url: "http://localhost:#{CHEF_SERVER_PORT}",
|
|
49
|
+
client_name: "reset",
|
|
50
|
+
client_key: File.expand_path("spec/config/berkshelf.pem"),
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
]
|
|
64
54
|
|
|
65
|
-
|
|
66
|
-
|
|
55
|
+
Berkshelf::RSpec::ChefServer.start(port: CHEF_SERVER_PORT)
|
|
56
|
+
Berkshelf::API::RSpec::Server.start(port: BERKS_API_PORT, endpoints: endpoints) unless windows?
|
|
67
57
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
set_environment_variable("BERKSHELF_CHEF_CONFIG", chef_config_path.to_s)
|
|
72
|
-
end
|
|
58
|
+
aruba.config.io_wait_timeout = Cucumber::JRUBY ? 7 : 5
|
|
59
|
+
@aruba_timeout_seconds = Cucumber::JRUBY ? 35 : 15
|
|
60
|
+
end
|
|
73
61
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
62
|
+
Before("@spawn") do
|
|
63
|
+
aruba.config.command_launcher = :spawn
|
|
64
|
+
|
|
65
|
+
Berkshelf.instance_variable_set(:@berkshelf_path, nil)
|
|
66
|
+
set_environment_variable("BERKSHELF_PATH", berkshelf_path.to_s)
|
|
67
|
+
set_environment_variable("BERKSHELF_CONFIG", Berkshelf.config.path.to_s)
|
|
68
|
+
set_environment_variable("BERKSHELF_CHEF_CONFIG", chef_config_path.to_s)
|
|
78
69
|
end
|
|
79
70
|
|
|
80
|
-
|
|
81
|
-
|
|
71
|
+
Before("@slow_process") do
|
|
72
|
+
aruba.config.io_wait_timeout = Cucumber::JRUBY ? 70 : 30
|
|
73
|
+
@aruba_timeout_seconds = Cucumber::JRUBY ? 140 : 60
|
|
82
74
|
end
|
|
75
|
+
|
|
76
|
+
require "berkshelf/cli"
|
|
@@ -180,7 +180,7 @@ module Berkshelf
|
|
|
180
180
|
local.binmode
|
|
181
181
|
|
|
182
182
|
Retryable.retryable(tries: retries, on: OpenURI::HTTPError, sleep: retry_interval) do
|
|
183
|
-
open(target, "rb", open_uri_options) do |remote|
|
|
183
|
+
open(target, "rb", open_uri_options(target)) do |remote|
|
|
184
184
|
local.write(remote.read)
|
|
185
185
|
end
|
|
186
186
|
end
|
|
@@ -192,11 +192,12 @@ module Berkshelf
|
|
|
192
192
|
|
|
193
193
|
private
|
|
194
194
|
|
|
195
|
-
def open_uri_options
|
|
195
|
+
def open_uri_options(target)
|
|
196
196
|
options = {}
|
|
197
197
|
options.merge!(headers)
|
|
198
198
|
options.merge!(open_uri_proxy_options)
|
|
199
199
|
options.merge!(ssl_verify_mode: ssl_verify_mode)
|
|
200
|
+
options.merge!(proxy: URI.parse(target).find_proxy())
|
|
200
201
|
end
|
|
201
202
|
|
|
202
203
|
def open_uri_proxy_options
|
data/lib/berkshelf/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
|
@@ -1,89 +1,83 @@
|
|
|
1
|
-
require "spork"
|
|
2
|
-
|
|
3
1
|
def windows?
|
|
4
2
|
!!(RUBY_PLATFORM =~ /mswin|mingw|windows/)
|
|
5
3
|
end
|
|
6
4
|
|
|
7
5
|
BERKS_SPEC_DATA = File.expand_path("../data", __FILE__)
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
require "berkshelf/api/rspec" unless windows?
|
|
7
|
+
require "rspec"
|
|
8
|
+
require "cleanroom/rspec"
|
|
9
|
+
require "webmock/rspec"
|
|
10
|
+
require "berkshelf/api/rspec" unless windows?
|
|
14
11
|
|
|
15
|
-
|
|
12
|
+
Dir["spec/support/**/*.rb"].each { |f| require File.expand_path(f) }
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
RSpec.configure do |config|
|
|
15
|
+
config.include Berkshelf::RSpec::FileSystemMatchers
|
|
16
|
+
config.include Berkshelf::RSpec::ChefAPI
|
|
17
|
+
config.include Berkshelf::RSpec::ChefServer
|
|
18
|
+
config.include Berkshelf::RSpec::Git
|
|
19
|
+
config.include Berkshelf::RSpec::PathHelpers
|
|
20
|
+
config.include Berkshelf::API::RSpec unless windows?
|
|
24
21
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
config.expect_with :rspec do |c|
|
|
23
|
+
c.syntax = :expect
|
|
24
|
+
end
|
|
28
25
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
config.mock_with :rspec
|
|
27
|
+
config.filter_run focus: true
|
|
28
|
+
config.filter_run_excluding not_supported_on_windows: windows?
|
|
29
|
+
config.run_all_when_everything_filtered = true
|
|
33
30
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
config.before(:suite) do
|
|
41
|
-
WebMock.disable_net_connect!(allow_localhost: true, net_http_connect_on_start: true)
|
|
42
|
-
Berkshelf::RSpec::ChefServer.start
|
|
43
|
-
Berkshelf::API::RSpec::Server.start unless windows?
|
|
44
|
-
end
|
|
31
|
+
config.before(:each) do
|
|
32
|
+
Berkshelf.logger = Berkshelf::Logger.new(nil)
|
|
33
|
+
Berkshelf.set_format(:null)
|
|
34
|
+
Berkshelf.ui.mute!
|
|
35
|
+
end
|
|
45
36
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
37
|
+
config.before(:suite) do
|
|
38
|
+
WebMock.disable_net_connect!(allow_localhost: true, net_http_connect_on_start: true)
|
|
39
|
+
Berkshelf::RSpec::ChefServer.start
|
|
40
|
+
Berkshelf::API::RSpec::Server.start unless windows?
|
|
41
|
+
end
|
|
49
42
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
clean_tmp_path
|
|
53
|
-
Berkshelf.initialize_filesystem
|
|
54
|
-
Berkshelf::CookbookStore.instance.initialize_filesystem
|
|
55
|
-
reload_configs
|
|
56
|
-
end
|
|
43
|
+
config.before(:all) do
|
|
44
|
+
ENV["BERKSHELF_PATH"] = berkshelf_path.to_s
|
|
57
45
|
end
|
|
58
46
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
end
|
|
47
|
+
config.before(:each) do
|
|
48
|
+
Berkshelf::API::RSpec::Server.clear_cache unless windows?
|
|
49
|
+
clean_tmp_path
|
|
50
|
+
Berkshelf.initialize_filesystem
|
|
51
|
+
Berkshelf::CookbookStore.instance.initialize_filesystem
|
|
52
|
+
reload_configs
|
|
53
|
+
end
|
|
54
|
+
end
|
|
68
55
|
|
|
69
|
-
|
|
56
|
+
def capture(stream)
|
|
57
|
+
begin
|
|
58
|
+
stream = stream.to_s
|
|
59
|
+
eval "$#{stream} = StringIO.new"
|
|
60
|
+
yield
|
|
61
|
+
result = eval("$#{stream}").string
|
|
62
|
+
ensure
|
|
63
|
+
eval("$#{stream} = #{stream.upcase}")
|
|
70
64
|
end
|
|
65
|
+
|
|
66
|
+
result
|
|
71
67
|
end
|
|
72
68
|
|
|
73
|
-
|
|
74
|
-
require "berkshelf"
|
|
69
|
+
require "berkshelf"
|
|
75
70
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
71
|
+
module Berkshelf
|
|
72
|
+
class GitLocation
|
|
73
|
+
include Berkshelf::RSpec::Git
|
|
79
74
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
end
|
|
75
|
+
alias :real_clone :clone
|
|
76
|
+
def clone
|
|
77
|
+
fake_remote = generate_fake_git_remote(uri, tags: @branch ? [@branch] : [])
|
|
78
|
+
tmp_clone = File.join(self.class.tmpdir, uri.gsub(/[\/:]/, "-"))
|
|
79
|
+
@uri = "file://#{fake_remote}"
|
|
80
|
+
real_clone
|
|
87
81
|
end
|
|
88
82
|
end
|
|
89
83
|
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.6.
|
|
4
|
+
version: 5.6.3
|
|
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-02-
|
|
15
|
+
date: 2017-02-23 00:00:00.000000000 Z
|
|
16
16
|
dependencies:
|
|
17
17
|
- !ruby/object:Gem::Dependency
|
|
18
18
|
name: addressable
|
|
@@ -479,7 +479,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
479
479
|
version: 2.0.0
|
|
480
480
|
requirements: []
|
|
481
481
|
rubyforge_project:
|
|
482
|
-
rubygems_version: 2.6.
|
|
482
|
+
rubygems_version: 2.6.10
|
|
483
483
|
signing_key:
|
|
484
484
|
specification_version: 4
|
|
485
485
|
summary: Manages a Cookbook's, or an Application's, Cookbook dependencies
|