cookbook-release 1.9.0 → 2.0.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
  SHA256:
3
- metadata.gz: 1a2b23c7c9af0dd7ecb83cd1a4f89601951cacd6b8bf2577984559f2fc02cf81
4
- data.tar.gz: 5940dfa4456a6003415dfdbdd22b558c912c59edbeecf587e2c0121e4bc492b5
3
+ metadata.gz: 629cb7b2301b4598ac3df2bec55c94e0ee7359196ecc91033e398dffadc374b1
4
+ data.tar.gz: 5a961bd3cafc52049e80401424f1ea36e7982f274279ee1cdf5f73ec931f6532
5
5
  SHA512:
6
- metadata.gz: 4ed18ffa88071327c4ba652561e0b3d7bc2beabe18f472d2f75fe9865801743d81b3d78bf4343989e2e04504093b62b15b1c6266b22e3084dbfc1e1460844b8c
7
- data.tar.gz: 2abe84b04bb5a9a5879f850dd4296cc0bff59d14a3de12e3ddafa886aaf0cfa88df0556d0ce631ad171221c58a31ed94d74a602c71945040979abbbf1194f551
6
+ metadata.gz: 6aa94e1a75d10392075fed059d82f27762e196e0525b3c441d6c92b031112de4a6a925850663b70988eeaa7ec218894ca0f474a6f812b6aa4154fb4f7421e4fe
7
+ data.tar.gz: a2a9eca39cef781c24826f662235cc21f353f66dfeb1a721ca43225755f95b466b9db5a5ded003acde5531ff4f3cb646053b8ed3e9ee0012cc86c1b877c1b83f
@@ -5,7 +5,7 @@ jobs:
5
5
  runs-on: ubuntu-latest
6
6
  strategy:
7
7
  matrix:
8
- ruby-version: ['2.5', '2.7']
8
+ ruby-version: ['2.7']
9
9
  steps:
10
10
  - uses: actions/checkout@v2
11
11
  - uses: ruby/setup-ruby@v1
@@ -6,7 +6,7 @@ require 'English'
6
6
 
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = 'cookbook-release'
9
- spec.version = '1.9.0'
9
+ spec.version = '2.0.0'
10
10
  spec.authors = ['Grégoire Seux']
11
11
  spec.email = 'g.seux@criteo.com'
12
12
  spec.summary = 'Provide primitives (and rake tasks) to release a cookbook'
@@ -22,8 +22,8 @@ Gem::Specification.new do |spec|
22
22
  spec.add_dependency 'semantic'
23
23
  spec.add_dependency 'highline'
24
24
  spec.add_dependency 'mixlib-shellout'
25
- # TODO: support Chef 17 and leverage knife gem at some point
26
- spec.add_dependency 'chef', '>= 12.18.31', '< 17.0' # knife code has been moved to dedicated gem starting with Chef 17
25
+ spec.add_dependency 'chef', '>= 17'
26
+ spec.add_dependency 'knife', '>= 17'
27
27
  spec.add_dependency 'git'
28
28
  spec.add_dependency 'unicode-emoji'
29
29
 
@@ -1,7 +1,7 @@
1
1
  require 'chef/cookbook_loader'
2
2
  require 'chef/cookbook/cookbook_version_loader'
3
3
  require 'chef/cookbook_uploader'
4
- require 'chef/cookbook_site_streaming_uploader'
4
+ require 'chef/knife/core/cookbook_site_streaming_uploader'
5
5
  require 'chef/mixin/shell_out'
6
6
  require 'json'
7
7
 
@@ -28,7 +28,7 @@ module CookbookRelease
28
28
  # client.pem key
29
29
  ::Chef::CookbookUploader.new(cookbook, rest: 'fake_rest').validate_cookbooks
30
30
 
31
- tmp_cookbook_dir = Chef::CookbookSiteStreamingUploader.create_build_dir(cookbook)
31
+ tmp_cookbook_dir = ::Chef::Knife::Core::CookbookSiteStreamingUploader.create_build_dir(cookbook)
32
32
  begin
33
33
  shell_out!("tar -czf #{cookbook.name}.tgz #{cookbook.name}", :cwd => tmp_cookbook_dir)
34
34
  rescue StandardError => e
@@ -46,7 +46,7 @@ module CookbookRelease
46
46
  end
47
47
 
48
48
  def upload(filename, category)
49
- http_resp = ::Chef::CookbookSiteStreamingUploader.post(
49
+ http_resp = ::Chef::Knife::Core::CookbookSiteStreamingUploader.post(
50
50
  @url,
51
51
  @user_id,
52
52
  @client_key,
@@ -39,7 +39,7 @@ version '2.0.0'
39
39
  body: "{}",
40
40
  code: "201"
41
41
  )
42
- expect(::Chef::CookbookSiteStreamingUploader).
42
+ expect(::Chef::Knife::Core::CookbookSiteStreamingUploader).
43
43
  to receive(:post).
44
44
  with('http://a_url', 'a_name', 'a_file', anything()).
45
45
  and_return(response)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cookbook-release
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grégoire Seux
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-28 00:00:00.000000000 Z
11
+ date: 2024-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: semantic
@@ -58,20 +58,28 @@ dependencies:
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 12.18.31
62
- - - "<"
63
- - !ruby/object:Gem::Version
64
- version: '17.0'
61
+ version: '17'
65
62
  type: :runtime
66
63
  prerelease: false
67
64
  version_requirements: !ruby/object:Gem::Requirement
68
65
  requirements:
69
66
  - - ">="
70
67
  - !ruby/object:Gem::Version
71
- version: 12.18.31
72
- - - "<"
68
+ version: '17'
69
+ - !ruby/object:Gem::Dependency
70
+ name: knife
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '17'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
73
81
  - !ruby/object:Gem::Version
74
- version: '17.0'
82
+ version: '17'
75
83
  - !ruby/object:Gem::Dependency
76
84
  name: git
77
85
  requirement: !ruby/object:Gem::Requirement