berkshelf 4.3.3 → 4.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/CONTRIBUTING.md +1 -0
- data/Gemfile.lock +14 -13
- data/berkshelf.gemspec +1 -0
- data/lib/berkshelf/cli.rb +8 -0
- data/lib/berkshelf/community_rest.rb +3 -5
- data/lib/berkshelf/downloader.rb +3 -8
- data/lib/berkshelf/version.rb +1 -1
- data/spec/unit/berkshelf/community_rest_spec.rb +5 -5
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c27a606d211874278312e4042caafc6216ea359e
|
4
|
+
data.tar.gz: ba10a2b3fb5062ab5b131736d9b6bf81364d97bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67021e4486daa42743d41475869b6b32c47a86529c7c2ba908f2d896b408484819e267381adeec4522b10f73a97c652df03d53796ed02e52202bee60302c0b7e
|
7
|
+
data.tar.gz: 30e944818d39592b23cbaa267fc8788c2ab7ede8afd75cf0b3f0c5f5fbec95c912e4739bcbcfd62a84e1ad8c86c63b580cdd4c24934a8289381fc60d732b2a5e
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [4.3.4](https://github.com/berkshelf/berkshelf/tree/4.3.4)(2016-06-13)
|
4
|
+
[Full Changelog](https://github.com/berkshelf/berkshelf/compare/v4.3.3...4.3.4)
|
5
|
+
|
6
|
+
**Merged pull requests:**
|
7
|
+
|
8
|
+
- Use rubygem's tar implementation [\#1553](https://github.com/berkshelf/berkshelf/pull/1553)
|
9
|
+
- Fixing some specs that fail on Windows [\#1554](https://github.com/berkshelf/berkshelf/pull/1554)
|
10
|
+
- Deprecate `berks cookbook` in favor of `chef generate cookbook` [\#1565](https://github.com/berkshelf/berkshelf/pull/1565)
|
11
|
+
- Deprecate `berks init` in favor of `chef generate cookbook` [\#1567](https://github.com/berkshelf/berkshelf/pull/1567)
|
12
|
+
|
3
13
|
## [4.3.3](https://github.com/berkshelf/berkshelf/tree/4.3.3) (2016-05-09)
|
4
14
|
[Full Changelog](https://github.com/berkshelf/berkshelf/compare/v4.3.2...4.3.3)
|
5
15
|
|
data/CONTRIBUTING.md
CHANGED
@@ -59,5 +59,6 @@ Once you are ready to release Berkshelf, perform the following:
|
|
59
59
|
1. Update `CHANGELOG.md` with a new header indicating the version to be released
|
60
60
|
1. Examine the diff ([example](https://github.com/berkshelf/berkshelf/compare/v4.0.1...master)) between master and the previous version. Add all merged Pull Requests to the `CHANGELOG.md`
|
61
61
|
1. Update `version.rb` to the desired release version
|
62
|
+
1. Run `bundle update berkshelf`
|
62
63
|
1. Create a PR and review the `version.rb` changes and `CHANGELOG.md` changes
|
63
64
|
1. Once the PR is merged to master, run `rake release` on the master branch
|
data/Gemfile.lock
CHANGED
@@ -19,7 +19,7 @@ GIT
|
|
19
19
|
PATH
|
20
20
|
remote: .
|
21
21
|
specs:
|
22
|
-
berkshelf (4.3.
|
22
|
+
berkshelf (4.3.5)
|
23
23
|
addressable (~> 2.3, >= 2.3.4)
|
24
24
|
berkshelf-api-client (~> 2.0, >= 2.0.2)
|
25
25
|
buff-config (~> 1.0)
|
@@ -31,6 +31,7 @@ PATH
|
|
31
31
|
faraday (~> 0.9)
|
32
32
|
httpclient (~> 2.7)
|
33
33
|
minitar (~> 0.5, >= 0.5.4)
|
34
|
+
mixlib-archive (~> 0.1)
|
34
35
|
octokit (~> 4.0)
|
35
36
|
retryable (~> 2.0)
|
36
37
|
ridley (~> 4.5)
|
@@ -80,7 +81,8 @@ GEM
|
|
80
81
|
celluloid-io (0.16.2)
|
81
82
|
celluloid (>= 0.16.0)
|
82
83
|
nio4r (>= 1.1.0)
|
83
|
-
chef-config (12.
|
84
|
+
chef-config (12.11.18)
|
85
|
+
fuzzyurl (~> 0.8.0)
|
84
86
|
mixlib-config (~> 2.0)
|
85
87
|
mixlib-shellout (~> 2.0)
|
86
88
|
chef-zero (4.5.0)
|
@@ -132,6 +134,7 @@ GEM
|
|
132
134
|
fuubar (2.0.0)
|
133
135
|
rspec (~> 3.0)
|
134
136
|
ruby-progressbar (~> 1.4)
|
137
|
+
fuzzyurl (0.8.0)
|
135
138
|
gherkin (3.2.0)
|
136
139
|
github_api (0.13.1)
|
137
140
|
addressable (~> 2.4.0)
|
@@ -180,9 +183,9 @@ GEM
|
|
180
183
|
guard (~> 1.1)
|
181
184
|
spork (>= 0.8.4)
|
182
185
|
hashdiff (0.3.0)
|
183
|
-
hashie (3.4.
|
184
|
-
hitimes (1.2.
|
185
|
-
hitimes (1.2.
|
186
|
+
hashie (3.4.4)
|
187
|
+
hitimes (1.2.4)
|
188
|
+
hitimes (1.2.4-x86-mingw32)
|
186
189
|
http (0.9.9)
|
187
190
|
addressable (~> 2.3)
|
188
191
|
http-cookie (~> 1.0)
|
@@ -192,7 +195,7 @@ GEM
|
|
192
195
|
domain_name (~> 0.5)
|
193
196
|
http-form_data (1.0.1)
|
194
197
|
http_parser.rb (0.6.0)
|
195
|
-
httpclient (2.7.
|
198
|
+
httpclient (2.7.2)
|
196
199
|
i18n (0.7.0)
|
197
200
|
ice_nine (0.11.2)
|
198
201
|
iniparse (1.4.2)
|
@@ -207,11 +210,9 @@ GEM
|
|
207
210
|
method_source (0.8.2)
|
208
211
|
minitar (0.5.4)
|
209
212
|
minitest (5.8.4)
|
210
|
-
mixlib-
|
213
|
+
mixlib-archive (0.1.0)
|
214
|
+
mixlib-authentication (1.4.1)
|
211
215
|
mixlib-log
|
212
|
-
rspec-core (~> 3.2)
|
213
|
-
rspec-expectations (~> 3.2)
|
214
|
-
rspec-mocks (~> 3.2)
|
215
216
|
mixlib-config (2.2.1)
|
216
217
|
mixlib-install (1.0.3)
|
217
218
|
artifactory (>= 2.3.0)
|
@@ -223,7 +224,7 @@ GEM
|
|
223
224
|
win32-process (~> 0.8.2)
|
224
225
|
wmi-lite (~> 1.0)
|
225
226
|
mixlib-versioning (1.1.0)
|
226
|
-
molinillo (0.4.
|
227
|
+
molinillo (0.4.5)
|
227
228
|
msgpack (0.5.12)
|
228
229
|
msgpack (0.5.12-x86-mingw32)
|
229
230
|
multi_json (1.11.2)
|
@@ -272,7 +273,7 @@ GEM
|
|
272
273
|
http_parser.rb (>= 0.6.0)
|
273
274
|
websocket-driver (>= 0.5.1)
|
274
275
|
retryable (2.0.3)
|
275
|
-
ridley (4.5.
|
276
|
+
ridley (4.5.1)
|
276
277
|
addressable
|
277
278
|
buff-config (~> 1.0)
|
278
279
|
buff-extensions (~> 1.0)
|
@@ -387,4 +388,4 @@ DEPENDENCIES
|
|
387
388
|
yard (~> 0.8)
|
388
389
|
|
389
390
|
BUNDLED WITH
|
390
|
-
1.
|
391
|
+
1.12.5
|
data/berkshelf.gemspec
CHANGED
@@ -46,6 +46,7 @@ Gem::Specification.new do |s|
|
|
46
46
|
s.add_dependency 'octokit', '~> 4.0'
|
47
47
|
s.add_dependency 'celluloid', '= 0.16.0'
|
48
48
|
s.add_dependency 'celluloid-io', '~> 0.16.1'
|
49
|
+
s.add_dependency 'mixlib-archive', '~> 0.1'
|
49
50
|
|
50
51
|
s.add_development_dependency 'aruba', '~> 0.10.0' # Lock this here to avoid problems with public API changes
|
51
52
|
s.add_development_dependency 'chef-zero', '~> 4.0'
|
data/lib/berkshelf/cli.rb
CHANGED
@@ -269,6 +269,10 @@ module Berkshelf
|
|
269
269
|
|
270
270
|
desc 'init [PATH]', 'Initialize Berkshelf in the given directory'
|
271
271
|
def init(path = '.')
|
272
|
+
Berkshelf.formatter.deprecation <<EOF
|
273
|
+
This command is being deprecated in favor of `chef generate cookbook` and will soon return an error.
|
274
|
+
Please use `chef generate cookbook` instead of this command.
|
275
|
+
EOF
|
272
276
|
Berkshelf.formatter.deprecation '--git is now the default' if options[:git]
|
273
277
|
Berkshelf.formatter.deprecation '--vagrant is now the default' if options[:vagrant]
|
274
278
|
|
@@ -428,6 +432,10 @@ module Berkshelf
|
|
428
432
|
|
429
433
|
desc 'cookbook NAME [PATH]', 'Create a skeleton for a new cookbook'
|
430
434
|
def cookbook(name, path = nil)
|
435
|
+
Berkshelf.formatter.deprecation <<EOF
|
436
|
+
This command is being deprecated in favor of `chef generate cookbook` and will soon return an error.
|
437
|
+
Please use `chef generate cookbook` instead of this command.
|
438
|
+
EOF
|
431
439
|
path = File.join(Dir.pwd, name) if path.nil?
|
432
440
|
Berkshelf.formatter.deprecation '--git is now the default' if options[:git]
|
433
441
|
Berkshelf.formatter.deprecation '--vagrant is now the default' if options[:vagrant]
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'open-uri'
|
2
2
|
require 'retryable'
|
3
|
+
require 'mixlib/archive'
|
3
4
|
|
4
5
|
module Berkshelf
|
5
6
|
class CommunityREST < Faraday::Connection
|
@@ -11,15 +12,12 @@ module Berkshelf
|
|
11
12
|
#
|
12
13
|
# @return [String]
|
13
14
|
def unpack(target, destination)
|
14
|
-
if is_gzip_file(target)
|
15
|
-
Archive
|
16
|
-
elsif is_tar_file(target)
|
17
|
-
Archive::Tar::Minitar.unpack(target, destination)
|
15
|
+
if is_gzip_file(target) || is_tar_file(target)
|
16
|
+
Mixlib::Archive.new(target).extract(destination)
|
18
17
|
else
|
19
18
|
raise Berkshelf::UnknownCompressionType.new(target, destination)
|
20
19
|
end
|
21
20
|
|
22
|
-
FileUtils.rm_rf Dir.glob("#{destination}/**/PaxHeader")
|
23
21
|
destination
|
24
22
|
end
|
25
23
|
|
data/lib/berkshelf/downloader.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'net/http'
|
2
|
-
require '
|
3
|
-
require 'archive/tar/minitar'
|
2
|
+
require 'mixlib/archive'
|
4
3
|
|
5
4
|
module Berkshelf
|
6
5
|
class Downloader
|
@@ -109,8 +108,7 @@ module Berkshelf
|
|
109
108
|
return nil unless resp.is_a?(Net::HTTPSuccess)
|
110
109
|
open(archive_path, "wb") { |file| file.write(resp.body) }
|
111
110
|
|
112
|
-
|
113
|
-
Archive::Tar::Minitar.unpack(tgz, unpack_dir)
|
111
|
+
Mixlib::Archive.new(archive_path).extract(unpack_dir)
|
114
112
|
|
115
113
|
# we need to figure out where the cookbook is located in the archive. This is because the directory name
|
116
114
|
# pattern is not cosistant between private and public github repositories
|
@@ -131,10 +129,7 @@ module Berkshelf
|
|
131
129
|
archive_path.open('wb') { |local_file| local_file.write remote_file.read }
|
132
130
|
end
|
133
131
|
|
134
|
-
archive_path.
|
135
|
-
tgz = Zlib::GzipReader.new(file)
|
136
|
-
Archive::Tar::Minitar.unpack(tgz, unpack_dir.to_s)
|
137
|
-
end
|
132
|
+
Mixlib::Archive.new(archive_path).extract(unpack_dir)
|
138
133
|
|
139
134
|
# The top level directory is inconsistant. So we unpack it and
|
140
135
|
# use the only directory created in the unpack_dir.
|
data/lib/berkshelf/version.rb
CHANGED
@@ -7,18 +7,18 @@ describe Berkshelf::CommunityREST do
|
|
7
7
|
let(:destination) { '/destination/bar' }
|
8
8
|
let(:file) { double('file') }
|
9
9
|
let(:gzip_reader) { double('gzip_reader') }
|
10
|
+
let(:archive) { double('mixlib_archive') }
|
10
11
|
|
11
12
|
before do
|
12
13
|
allow(File).to receive(:open).with(target, 'rb').and_return(file)
|
13
|
-
allow(
|
14
|
-
allow(Archive
|
14
|
+
allow(archive).to receive(:extract).with(destination)
|
15
|
+
allow(Mixlib::Archive).to receive(:new).with(target).and_return(archive)
|
15
16
|
end
|
16
17
|
|
17
18
|
it 'unpacks the tar' do
|
18
|
-
expect(File).to receive(:open).with(target, 'rb')
|
19
19
|
expect(::IO).to receive(:binread).with(target, 2).and_return([0x1F, 0x8B].pack("C*"))
|
20
|
-
expect(
|
21
|
-
expect(
|
20
|
+
expect(Mixlib::Archive).to receive(:new).with(target).and_return(archive)
|
21
|
+
expect(archive).to receive(:extract).with(destination)
|
22
22
|
|
23
23
|
expect(Berkshelf::CommunityREST.unpack(target, destination)).to eq(destination)
|
24
24
|
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: 4.3.
|
4
|
+
version: 4.3.5
|
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-
|
15
|
+
date: 2016-06-13 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: addressable
|
@@ -256,6 +256,20 @@ dependencies:
|
|
256
256
|
- - "~>"
|
257
257
|
- !ruby/object:Gem::Version
|
258
258
|
version: 0.16.1
|
259
|
+
- !ruby/object:Gem::Dependency
|
260
|
+
name: mixlib-archive
|
261
|
+
requirement: !ruby/object:Gem::Requirement
|
262
|
+
requirements:
|
263
|
+
- - "~>"
|
264
|
+
- !ruby/object:Gem::Version
|
265
|
+
version: '0.1'
|
266
|
+
type: :runtime
|
267
|
+
prerelease: false
|
268
|
+
version_requirements: !ruby/object:Gem::Requirement
|
269
|
+
requirements:
|
270
|
+
- - "~>"
|
271
|
+
- !ruby/object:Gem::Version
|
272
|
+
version: '0.1'
|
259
273
|
- !ruby/object:Gem::Dependency
|
260
274
|
name: aruba
|
261
275
|
requirement: !ruby/object:Gem::Requirement
|
@@ -635,7 +649,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
635
649
|
version: 1.8.0
|
636
650
|
requirements: []
|
637
651
|
rubyforge_project:
|
638
|
-
rubygems_version: 2.
|
652
|
+
rubygems_version: 2.5.1
|
639
653
|
signing_key:
|
640
654
|
specification_version: 4
|
641
655
|
summary: Manages a Cookbook's, or an Application's, Cookbook dependencies
|