berkshelf 5.1.0 → 5.2.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: 4bc1d114a16270012c8e6554bdeeef10c8daeb60
4
- data.tar.gz: 097633f8a8909d0e1d2a3c5d68c17576723aa62f
3
+ metadata.gz: 5089b7006471b9e1a535ab4fc5f3ee1b83ae6114
4
+ data.tar.gz: 15c5ac0f94f60ea0d741975e13ed4af81fa5ef70
5
5
  SHA512:
6
- metadata.gz: 9d600075727841156d0ef1fb24c5f0577b7f657acd299d7743901b499db08a83ff482f9c937b3d026609fa53a67d619c1a826a2705676ce3cd3697739404bb69
7
- data.tar.gz: f845e6cd2bb95e7e90dd3b267d4c9d06f7692c09d299b4b2068b945c1c68fdc2f0caba8bc740c4378e1999ccf7280456f0335a805940ab659ecc6965607c3604
6
+ metadata.gz: a6a0945ca8000eb04ae6d381c04235ad9c9657635ba6eda6453134207421a8054df09407972988750ff89b5d93d183e2f2a966933eabc977471672ffd07ab530
7
+ data.tar.gz: ae1cfadeee18dda60605775d86d31720524636eb4e600a13d1802a75e4fa955621ba37463af8dc5b41c9537b5028d2274eda88e3a4c398dfae75a59c71dfafe3
@@ -41,21 +41,24 @@ matrix:
41
41
  - rvm: 2.2.5
42
42
  - rvm: 2.3.1
43
43
  - rvm: ruby-head
44
- - rvm: 2.2.5
45
- before_install:
46
- # Failures in the berkshelf-api gemspec were happening with bundler 1.8
47
- - gem install bundler --version=1.10.6
48
- # Needed until https://github.com/travis-ci/apt-package-whitelist/pull/1820 is merged
49
- - sudo apt-get update
50
- - sudo apt-get -y install squid3
51
- sudo: required
52
- env:
53
- - PROXY_TESTS_DIR=/tmp/proxy_tests
54
- - PROXY_TESTS_REPO=$PROXY_TESTS_DIR/repo
55
- - rvmsudo_secure_path=1
56
- script:
57
- - git clone https://github.com/chef/proxy_tests.git
58
- - cd proxy_tests && chef-client -z -o proxy_tests::render && cd ..
59
- - rvmsudo -E bundle exec bash $PROXY_TESTS_DIR/run_tests.sh berkshelf \* \* /tmp/out.txt
60
- after_script: cat /tmp/out.txt
44
+ # - rvm: 2.2.5
45
+ # before_install:
46
+ # # Failures in the berkshelf-api gemspec were happening with bundler 1.8
47
+ # - gem install bundler --version=1.10.6
48
+ # # Needed until https://github.com/travis-ci/apt-package-whitelist/pull/1820 is merged
49
+ # - sudo apt-get update
50
+ # - sudo apt-get -y install squid3
51
+ # sudo: required
52
+ # env:
53
+ # - PROXY_TESTS_DIR=/tmp/proxy_tests
54
+ # - PROXY_TESTS_REPO=$PROXY_TESTS_DIR/repo
55
+ # - rvmsudo_secure_path=1
56
+ # script:
57
+ # - git clone https://github.com/chef/proxy_tests.git
58
+ # - cd proxy_tests && chef-client -z -o proxy_tests::render && cd ..
59
+ # - rvmsudo -E bundle exec bash $PROXY_TESTS_DIR/run_tests.sh berkshelf \* \* /tmp/out.txt
60
+ # after_script: cat /tmp/out.txt
61
+ allow_failures:
62
+ - rvm: ruby-head
63
+
61
64
  script: bundle exec thor spec:ci
@@ -1,10 +1,20 @@
1
1
  # Change Log
2
2
 
3
- ## [5.1.0](https://github.com/berkshelf/berkshelf/tree/5.1.0) (2016-09-16)
4
- [Full Changelog](https://github.com/berkshelf/berkshelf/compare/v5.0.0...5.1.0)
3
+ ## [5.2.0](https://github.com/berkshelf/berkshelf/tree/5.2.0) (2016-11-07)
4
+ [Full Changelog](https://github.com/berkshelf/berkshelf/compare/v5.1.0...5.2.0)
5
5
 
6
6
  **Merged pull requests:**
7
7
 
8
+ - pin berkshelf-api, bump deps, remove failing matrix tests [\#1623](https://github.com/berkshelf/berkshelf/pull/1623) ([lamont-granquist](https://github.com/lamont-granquist))
9
+ - Community site error message missing URL [\#1621](https://github.com/berkshelf/berkshelf/pull/1621) ([tkling](https://github.com/tkling))
10
+ - Pass all ssl/X509 parameters to configuration [\#1600](https://github.com/berkshelf/berkshelf/pull/1600) ([thommay](https://github.com/thommay))
11
+
12
+ ## [v5.1.0](https://github.com/berkshelf/berkshelf/tree/v5.1.0) (2016-09-16)
13
+ [Full Changelog](https://github.com/berkshelf/berkshelf/compare/v5.0.0...v5.1.0)
14
+
15
+ **Merged pull requests:**
16
+
17
+ - Update version to 5.1.0 [\#1615](https://github.com/berkshelf/berkshelf/pull/1615) ([jkeiser](https://github.com/jkeiser))
8
18
  - Disable caching of bundler since it's broken [\#1612](https://github.com/berkshelf/berkshelf/pull/1612) ([thommay](https://github.com/thommay))
9
19
  - Update cli.rb [\#1611](https://github.com/berkshelf/berkshelf/pull/1611) ([martinmosegaard](https://github.com/martinmosegaard))
10
20
  - fix cucumber tests [\#1609](https://github.com/berkshelf/berkshelf/pull/1609) ([mwrock](https://github.com/mwrock))
data/Gemfile CHANGED
@@ -52,5 +52,5 @@ group :changelog do
52
52
  end
53
53
 
54
54
  group :test do
55
- gem "berkshelf-api", git: "https://github.com/berkshelf/berkshelf-api.git"
55
+ gem "berkshelf-api", git: "https://github.com/berkshelf/berkshelf-api.git", ref: "9fb3d95779c4ff72b0074072105caaf70b978bf0"
56
56
  end
@@ -1,6 +1,7 @@
1
1
  GIT
2
2
  remote: https://github.com/berkshelf/berkshelf-api.git
3
3
  revision: 9fb3d95779c4ff72b0074072105caaf70b978bf0
4
+ ref: 9fb3d95779c4ff72b0074072105caaf70b978bf0
4
5
  specs:
5
6
  berkshelf-api (3.0.0)
6
7
  archive (= 0.0.6)
@@ -19,7 +20,7 @@ GIT
19
20
  PATH
20
21
  remote: .
21
22
  specs:
22
- berkshelf (5.1.0)
23
+ berkshelf (5.2.0)
23
24
  addressable (~> 2.3, >= 2.3.4)
24
25
  berkshelf-api-client (>= 2.0.2, < 4.0)
25
26
  buff-config (~> 2.0)
@@ -48,7 +49,7 @@ GEM
48
49
  addressable (2.4.0)
49
50
  archive (0.0.6)
50
51
  ffi (~> 1.9.3)
51
- artifactory (2.4.0)
52
+ artifactory (2.5.0)
52
53
  aruba (0.14.2)
53
54
  childprocess (~> 0.5.6)
54
55
  contracts (~> 0.9)
@@ -79,7 +80,7 @@ GEM
79
80
  celluloid-io (0.16.2)
80
81
  celluloid (>= 0.16.0)
81
82
  nio4r (>= 1.1.0)
82
- chef-config (12.14.60)
83
+ chef-config (12.15.19)
83
84
  addressable
84
85
  fuzzyurl
85
86
  mixlib-config (~> 2.0)
@@ -120,9 +121,8 @@ GEM
120
121
  descendants_tracker (0.0.4)
121
122
  thread_safe (~> 0.3, >= 0.3.1)
122
123
  diff-lcs (1.2.5)
123
- domain_name (0.5.20160826)
124
+ domain_name (0.5.20161021)
124
125
  unf (>= 0.0.5, < 1.0.0)
125
- enumerable-lazy (0.0.1)
126
126
  equalizer (0.0.11)
127
127
  erubis (2.7.0)
128
128
  faraday (0.9.2)
@@ -150,13 +150,13 @@ GEM
150
150
  rake (>= 10.0)
151
151
  rspec (>= 3.2)
152
152
  rubocop (>= 0.31)
153
- grape (0.17.0)
153
+ grape (0.18.0)
154
154
  activesupport
155
155
  builder
156
156
  hashie (>= 2.1.0)
157
157
  multi_json (>= 1.3.2)
158
158
  multi_xml (>= 0.5.2)
159
- mustermann19 (~> 0.4.3)
159
+ mustermann-grape (~> 0.4.0)
160
160
  rack (>= 1.3.0)
161
161
  rack-accept
162
162
  virtus (>= 1.0.0)
@@ -188,14 +188,14 @@ GEM
188
188
  guard-compat (~> 1.0)
189
189
  spork (>= 0.8.4)
190
190
  hashdiff (0.3.0)
191
- hashie (3.4.4)
191
+ hashie (3.4.6)
192
192
  hitimes (1.2.4)
193
193
  http (2.0.3)
194
194
  addressable (~> 2.3)
195
195
  http-cookie (~> 1.0)
196
196
  http-form_data (~> 1.0.1)
197
197
  http_parser.rb (~> 0.6.0)
198
- http-cookie (1.0.2)
198
+ http-cookie (1.0.3)
199
199
  domain_name (~> 0.5)
200
200
  http-form_data (1.0.1)
201
201
  http_parser.rb (0.6.0)
@@ -204,7 +204,7 @@ GEM
204
204
  ice_nine (0.11.2)
205
205
  iniparse (1.4.2)
206
206
  json (1.8.3)
207
- jwt (1.5.4)
207
+ jwt (1.5.6)
208
208
  libyajl2 (1.2.0)
209
209
  listen (3.1.5)
210
210
  rb-fsevent (~> 0.9, >= 0.9.4)
@@ -213,27 +213,30 @@ GEM
213
213
  lumberjack (1.0.10)
214
214
  method_source (0.8.2)
215
215
  minitar (0.5.4)
216
- minitest (5.9.0)
216
+ minitest (5.9.1)
217
217
  mixlib-archive (0.2.0)
218
218
  mixlib-log
219
219
  mixlib-authentication (1.4.1)
220
220
  mixlib-log
221
221
  mixlib-config (2.2.4)
222
- mixlib-install (1.1.0)
222
+ mixlib-install (2.1.6)
223
223
  artifactory
224
224
  mixlib-shellout
225
225
  mixlib-versioning
226
+ thor
226
227
  mixlib-log (1.7.1)
227
228
  mixlib-shellout (2.2.7)
228
229
  mixlib-versioning (1.1.0)
229
- molinillo (0.5.1)
230
- msgpack (1.0.0)
230
+ molinillo (0.5.3)
231
+ msgpack (1.0.2)
231
232
  multi_json (1.12.1)
232
233
  multi_test (0.1.2)
233
234
  multi_xml (0.5.5)
234
235
  multipart-post (2.0.0)
235
- mustermann19 (0.4.4)
236
- enumerable-lazy
236
+ mustermann (0.4.0)
237
+ tool (~> 0.2)
238
+ mustermann-grape (0.4.0)
239
+ mustermann (= 0.4.0)
237
240
  nenv (0.3.0)
238
241
  net-scp (1.2.1)
239
242
  net-ssh (>= 2.6.5)
@@ -250,12 +253,12 @@ GEM
250
253
  multi_json (~> 1.3)
251
254
  multi_xml (~> 0.5)
252
255
  rack (>= 1.2, < 3)
253
- octokit (4.3.0)
256
+ octokit (4.4.1)
254
257
  sawyer (~> 0.7.0, >= 0.5.3)
255
- overcommit (0.36.0)
258
+ overcommit (0.37.0)
256
259
  childprocess (~> 0.5.8)
257
260
  iniparse (~> 1.4)
258
- parser (2.3.1.2)
261
+ parser (2.3.1.4)
259
262
  ast (~> 2.2)
260
263
  powerpack (0.1.1)
261
264
  pry (0.10.4)
@@ -266,8 +269,8 @@ GEM
266
269
  rack-accept (0.4.5)
267
270
  rack (>= 0.4)
268
271
  rainbow (2.1.0)
269
- rake (11.2.2)
270
- rb-fsevent (0.9.7)
272
+ rake (11.3.0)
273
+ rb-fsevent (0.9.8)
271
274
  rb-inotify (0.9.7)
272
275
  ffi (>= 0.5.0)
273
276
  reel (0.6.1)
@@ -299,7 +302,7 @@ GEM
299
302
  rspec-core (~> 3.5.0)
300
303
  rspec-expectations (~> 3.5.0)
301
304
  rspec-mocks (~> 3.5.0)
302
- rspec-core (3.5.3)
305
+ rspec-core (3.5.4)
303
306
  rspec-support (~> 3.5.0)
304
307
  rspec-expectations (3.5.0)
305
308
  diff-lcs (>= 1.2.0, < 2.0)
@@ -308,14 +311,14 @@ GEM
308
311
  diff-lcs (>= 1.2.0, < 2.0)
309
312
  rspec-support (~> 3.5.0)
310
313
  rspec-support (3.5.0)
311
- rubocop (0.42.0)
314
+ rubocop (0.45.0)
312
315
  parser (>= 2.3.1.1, < 3.0)
313
316
  powerpack (~> 0.1)
314
317
  rainbow (>= 1.99.1, < 3.0)
315
318
  ruby-progressbar (~> 1.7)
316
319
  unicode-display_width (~> 1.0, >= 1.0.1)
317
320
  ruby-progressbar (1.8.1)
318
- ruby_dep (1.4.0)
321
+ ruby_dep (1.5.0)
319
322
  safe_yaml (1.0.4)
320
323
  sawyer (0.7.0)
321
324
  addressable (>= 2.3.5, < 2.5)
@@ -327,8 +330,8 @@ GEM
327
330
  molinillo (~> 0.4)
328
331
  semverse (>= 1.1, < 3.0)
329
332
  spork (0.9.2)
330
- test-kitchen (1.12.0)
331
- mixlib-install (~> 1.0, >= 1.0.4)
333
+ test-kitchen (1.13.2)
334
+ mixlib-install (>= 1.2, < 3.0)
332
335
  mixlib-shellout (>= 1.2, < 3.0)
333
336
  net-scp (~> 1.1)
334
337
  net-ssh (>= 2.9, < 4.0)
@@ -339,6 +342,7 @@ GEM
339
342
  thread_safe (0.3.5)
340
343
  timers (4.0.4)
341
344
  hitimes
345
+ tool (0.2.3)
342
346
  tzinfo (1.2.2)
343
347
  thread_safe (~> 0.1)
344
348
  unf (0.1.4)
@@ -392,4 +396,4 @@ DEPENDENCIES
392
396
  yard (>= 0.8)
393
397
 
394
398
  BUNDLED WITH
395
- 1.12.5
399
+ 1.13.6
@@ -67,7 +67,7 @@ module Berkshelf
67
67
  # @option options [Float] :retry_interval (0.5)
68
68
  # how often we should pause between retries
69
69
  def initialize(uri = V1_API, options = {})
70
- options = options.reverse_merge(retries: 5, retry_interval: 0.5, ssl: { verify: Berkshelf::Config.instance.ssl.verify })
70
+ options = options.reverse_merge(retries: 5, retry_interval: 0.5, ssl: Berkshelf::Config.instance.ssl)
71
71
  @api_uri = uri
72
72
  @retries = options.delete(:retries)
73
73
  @retry_interval = options.delete(:retry_interval)
@@ -1,4 +1,5 @@
1
1
  require 'buff/config/json'
2
+ require 'openssl'
2
3
 
3
4
  module Berkshelf
4
5
  class Config < Buff::Config::JSON
@@ -45,6 +46,7 @@ module Berkshelf
45
46
  else
46
47
  new
47
48
  end
49
+ coerce_ssl
48
50
  end
49
51
 
50
52
  # Reload the currently instantiated Berkshelf configuration
@@ -54,6 +56,17 @@ module Berkshelf
54
56
  @instance = nil
55
57
  self.instance
56
58
  end
59
+
60
+ # force proper X509 types from any configuration strings
61
+ #
62
+ # @return [Config]
63
+ def coerce_ssl
64
+ ssl = @instance.ssl
65
+ ssl[:ca_cert] = OpenSSL::X509::Certificate.new(File.read(ssl[:ca_cert])) if ssl[:ca_cert] && ssl[:ca_cert].is_a?(String)
66
+ ssl[:client_cert] = OpenSSL::X509::Certificate.new(File.read(ssl[:client_cert])) if ssl[:client_cert] && ssl[:client_cert].is_a?(String)
67
+ ssl[:client_key] = OpenSSL::PKey::RSA.new(File.read(ssl[:client_key])) if ssl[:client_key] && ssl[:client_key].is_a?(String)
68
+ @instance
69
+ end
57
70
  end
58
71
 
59
72
  # @param [String] path
@@ -134,6 +147,26 @@ module Berkshelf
134
147
  type: Buff::Boolean,
135
148
  default: true,
136
149
  required: true
150
+ attribute 'ssl.cert_store',
151
+ type: Buff::Boolean,
152
+ default: false,
153
+ required: false
154
+ attribute 'ssl.ca_file',
155
+ type: String,
156
+ default: nil,
157
+ required: false
158
+ attribute 'ssl.ca_path',
159
+ type: String,
160
+ default: nil,
161
+ required: false
162
+ attribute 'ssl.client_cert',
163
+ type: String,
164
+ default: nil,
165
+ required: false
166
+ attribute 'ssl.client_key',
167
+ type: String,
168
+ default: nil,
169
+ required: false
137
170
  attribute 'github',
138
171
  type: Array,
139
172
  default: [],
@@ -65,9 +65,7 @@ module Berkshelf
65
65
  server_url: remote_cookbook.location_path,
66
66
  client_name: Berkshelf::Config.instance.chef.node_name,
67
67
  client_key: Berkshelf::Config.instance.chef.client_key,
68
- ssl: {
69
- verify: Berkshelf::Config.instance.ssl.verify
70
- }
68
+ ssl: Berkshelf::Config.instance.ssl
71
69
  }
72
70
  # @todo Something scary going on here - getting an instance of Kitchen::Logger from test-kitchen
73
71
  # https://github.com/opscode/test-kitchen/blob/master/lib/kitchen.rb#L99
@@ -222,7 +222,7 @@ module Berkshelf
222
222
  set_status_code(123)
223
223
 
224
224
  def initialize(uri, message)
225
- @uri = uri
225
+ @api_uri = uri
226
226
  @message = message
227
227
  end
228
228
 
@@ -16,7 +16,7 @@ module Berkshelf
16
16
  @api_client ||= begin
17
17
  if source == :chef_server
18
18
  APIClient.chef_server(
19
- ssl: {verify: Berkshelf::Config.instance.ssl.verify},
19
+ ssl: Berkshelf::Config.instance.ssl,
20
20
  timeout: api_timeout,
21
21
  open_timeout: [(api_timeout / 10), 3].max,
22
22
  client_name: Berkshelf::Config.instance.chef.node_name,
@@ -25,9 +25,10 @@ module Berkshelf
25
25
  )
26
26
  else
27
27
  APIClient.new(uri,
28
- timeout: api_timeout,
29
- open_timeout: [(api_timeout / 10), 3].max,
30
- ssl: {verify: Berkshelf::Config.instance.ssl.verify})
28
+ timeout: api_timeout,
29
+ open_timeout: [(api_timeout / 10), 3].max,
30
+ ssl: Berkshelf::Config.instance.ssl
31
+ )
31
32
  end
32
33
  end
33
34
  end
@@ -1,3 +1,3 @@
1
1
  module Berkshelf
2
- VERSION = "5.1.0"
2
+ VERSION = "5.2.0"
3
3
  end
@@ -3,3 +3,18 @@ require 'spec_helper'
3
3
  describe Berkshelf::BerkshelfError do
4
4
  skip
5
5
  end
6
+
7
+ describe Berkshelf::CommunitySiteError do
8
+ let(:api_uri) { 'https://infra.as.code' }
9
+ let(:message) { 'Cookbook name' }
10
+
11
+ subject { described_class.new(api_uri, message) }
12
+
13
+ it "includes the supplied uri in the error message" do
14
+ expect(subject.message).to include api_uri
15
+ end
16
+
17
+ it "includes the supplied message in the error message" do
18
+ expect(subject.message).to include message
19
+ end
20
+ 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.1.0
4
+ version: 5.2.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-09-16 00:00:00.000000000 Z
15
+ date: 2016-11-07 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: addressable
@@ -469,7 +469,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
469
469
  version: 2.0.0
470
470
  requirements: []
471
471
  rubyforge_project:
472
- rubygems_version: 2.6.6
472
+ rubygems_version: 2.5.1
473
473
  signing_key:
474
474
  specification_version: 4
475
475
  summary: Manages a Cookbook's, or an Application's, Cookbook dependencies