stove 4.1.1 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile +3 -0
- data/lib/stove/cli.rb +3 -3
- data/lib/stove/cookbook/metadata.rb +15 -2
- data/lib/stove/plugins/git.rb +1 -1
- data/lib/stove/version.rb +1 -1
- data/spec/unit/cookbook/metadata_spec.rb +44 -0
- data/stove.gemspec +1 -1
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a5b3636377d2a72d01138c74bc0d1a02c4019b5
|
4
|
+
data.tar.gz: f2252e862624ad4862bec9da34fc2160d0aa6995
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86a17cf2099b2771ea197c6c0614fbf494ee3f8304ed143281ef127efaf27dc27376fb860e4598d79e7f267251a9cf9ca438c7fb6ccbd346dcb0deb734497184
|
7
|
+
data.tar.gz: c40bf883da00c1b1dc2c7a6fab8355f625320f438989a284b1ef4e43f4720364883cda41e22d30b2a7ff3287a1bbc65f9d10a8e45b08c80a1404efdce4e216f0
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
This is the Changelog for the Stove gem.
|
4
4
|
|
5
|
+
## v5.0.0 (2017-03-22)
|
6
|
+
|
7
|
+
- Enable pushing extended metadata for Chef 12 by default
|
8
|
+
- Add gem metadata to the extended metadata whitelist
|
9
|
+
- Use git porcelain vs. -s to avoid having local git configs interfere with stove functionality
|
10
|
+
- Only populate the extended metadata if the fields are actually present in the metadata
|
11
|
+
- Support for Ruby 2.0 has been dropped as Ruby 2.0 has been EOL'd
|
12
|
+
|
5
13
|
## v4.1.1 (2016-06-02)
|
6
14
|
|
7
15
|
- Don't delete the metadata.json file if there isn't a metadata.rb
|
data/Gemfile
CHANGED
data/lib/stove/cli.rb
CHANGED
@@ -118,8 +118,8 @@ module Stove
|
|
118
118
|
options[:key] = v
|
119
119
|
end
|
120
120
|
|
121
|
-
opts.on('--extended-metadata', 'Include non-backwards compatible metadata keys such as `issues_url`') do
|
122
|
-
options[:extended_metadata] =
|
121
|
+
opts.on('--[no-]extended-metadata', 'Include non-backwards compatible metadata keys such as `issues_url`') do |v|
|
122
|
+
options[:extended_metadata] = v
|
123
123
|
end
|
124
124
|
|
125
125
|
opts.on('--no-ssl-verify', 'Turn off ssl verify') do
|
@@ -174,7 +174,7 @@ module Stove
|
|
174
174
|
:endpoint => nil,
|
175
175
|
:username => Config.username,
|
176
176
|
:key => Config.key,
|
177
|
-
:extended_metadata =>
|
177
|
+
:extended_metadata => true,
|
178
178
|
:ssl_verify => true,
|
179
179
|
|
180
180
|
# Git options
|
@@ -54,6 +54,14 @@ module Stove
|
|
54
54
|
end
|
55
55
|
EOM
|
56
56
|
end
|
57
|
+
|
58
|
+
def def_meta_gems(field, instance_variable)
|
59
|
+
class_eval <<-EOM, __FILE__, __LINE__ + 1
|
60
|
+
def #{field}(thing)
|
61
|
+
@#{instance_variable} << thing
|
62
|
+
end
|
63
|
+
EOM
|
64
|
+
end
|
57
65
|
end
|
58
66
|
|
59
67
|
DEFAULT_VERSION = '>= 0.0.0'.freeze
|
@@ -79,6 +87,7 @@ module Stove
|
|
79
87
|
def_attribute :issues_url
|
80
88
|
def_attribute :chef_version
|
81
89
|
def_attribute :ohai_version
|
90
|
+
def_attribute :gem
|
82
91
|
|
83
92
|
def_meta_cookbook :supports, :platforms
|
84
93
|
def_meta_cookbook :depends, :dependencies
|
@@ -91,11 +100,13 @@ module Stove
|
|
91
100
|
def_meta_setter :recipe, :recipes
|
92
101
|
def_meta_setter :grouping, :groupings
|
93
102
|
def_meta_setter :attribute, :attributes
|
103
|
+
def_meta_gems :gem, :gems
|
94
104
|
|
95
105
|
attr_reader :cookbook
|
96
106
|
attr_reader :platforms
|
97
107
|
attr_reader :dependencies
|
98
108
|
attr_reader :recommendations
|
109
|
+
attr_reader :gems
|
99
110
|
attr_reader :suggestions
|
100
111
|
attr_reader :conflicting
|
101
112
|
attr_reader :providing
|
@@ -111,6 +122,7 @@ module Stove
|
|
111
122
|
@long_description = ''
|
112
123
|
@source_url = Stove::Mash.new
|
113
124
|
@issues_url = Stove::Mash.new
|
125
|
+
@gems = []
|
114
126
|
@chef_version = Stove::Mash.new
|
115
127
|
@ohai_version = Stove::Mash.new
|
116
128
|
@platforms = Stove::Mash.new
|
@@ -190,8 +202,9 @@ module Stove
|
|
190
202
|
}
|
191
203
|
|
192
204
|
if extended_metadata
|
193
|
-
hash['source_url'] = self.source_url
|
194
|
-
hash['issues_url'] = self.issues_url
|
205
|
+
hash['source_url'] = self.source_url unless self.source_url.empty?
|
206
|
+
hash['issues_url'] = self.issues_url unless self.issues_url.empty?
|
207
|
+
hash['gems'] = self.gems unless self.gems.empty?
|
195
208
|
hash['chef_version'] = self.chef_version
|
196
209
|
hash['ohai_version'] = self.ohai_version
|
197
210
|
end
|
data/lib/stove/plugins/git.rb
CHANGED
data/lib/stove/version.rb
CHANGED
@@ -8,14 +8,58 @@ class Stove::Cookbook
|
|
8
8
|
hash = subject.to_hash(false)
|
9
9
|
expect(hash).to_not include('issues_url')
|
10
10
|
expect(hash).to_not include('source_url')
|
11
|
+
expect(hash).to_not include('chef')
|
11
12
|
end
|
12
13
|
end
|
13
14
|
|
14
15
|
context 'when the extra metadata is included' do
|
15
16
|
it 'includes the new metadata fields' do
|
17
|
+
subject.source_url('http://foo.example.com')
|
18
|
+
subject.issues_url('http://bar.example.com')
|
19
|
+
subject.gem('rspec')
|
16
20
|
hash = subject.to_hash(true)
|
17
21
|
expect(hash).to include('issues_url')
|
22
|
+
expect(hash['source_url']).to eq 'http://foo.example.com'
|
18
23
|
expect(hash).to include('source_url')
|
24
|
+
expect(hash['issues_url']).to eq 'http://bar.example.com'
|
25
|
+
expect(hash).to include('gems')
|
26
|
+
expect(hash['gems']).to eq(['rspec'])
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context 'when the extra metadata is not defined' do
|
31
|
+
it 'does not include the new metadata fields' do
|
32
|
+
hash = subject.to_hash(true)
|
33
|
+
expect(hash).not_to include('source_url')
|
34
|
+
expect(hash).not_to include('issues_url')
|
35
|
+
expect(hash).not_to include('gems')
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context 'when only some of the extra metadata is defined' do
|
40
|
+
it 'only includes the source_url if issues_url is empty' do
|
41
|
+
subject.source_url('http://foo.example.com')
|
42
|
+
hash = subject.to_hash(true)
|
43
|
+
expect(hash).to include('source_url')
|
44
|
+
expect(hash['source_url']).to eq 'http://foo.example.com'
|
45
|
+
expect(hash).not_to include('issues_url')
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'only includes the issues_url if source_url is empty' do
|
49
|
+
subject.issues_url('http://bar.example.com')
|
50
|
+
hash = subject.to_hash(true)
|
51
|
+
expect(hash).to include('issues_url')
|
52
|
+
expect(hash['issues_url']).to eq 'http://bar.example.com'
|
53
|
+
expect(hash).not_to include('source_url')
|
54
|
+
end
|
55
|
+
|
56
|
+
it 'only includes the gems' do
|
57
|
+
subject.gem('rspec')
|
58
|
+
hash = subject.to_hash(true)
|
59
|
+
expect(hash).to include('gems')
|
60
|
+
expect(hash['gems']).to eq(['rspec'])
|
61
|
+
expect(hash).not_to include('source_url')
|
62
|
+
expect(hash).not_to include('issues_url')
|
19
63
|
end
|
20
64
|
end
|
21
65
|
end
|
data/stove.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.required_ruby_version = '>= 2.
|
21
|
+
spec.required_ruby_version = '>= 2.1'
|
22
22
|
|
23
23
|
# Runtime dependencies
|
24
24
|
spec.add_dependency 'chef-api', '~> 0.5'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stove
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Vargo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-api
|
@@ -186,7 +186,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
186
186
|
requirements:
|
187
187
|
- - ">="
|
188
188
|
- !ruby/object:Gem::Version
|
189
|
-
version: '2.
|
189
|
+
version: '2.1'
|
190
190
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - ">="
|
@@ -194,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
194
194
|
version: '0'
|
195
195
|
requirements: []
|
196
196
|
rubyforge_project:
|
197
|
-
rubygems_version: 2.6.
|
197
|
+
rubygems_version: 2.6.10
|
198
198
|
signing_key:
|
199
199
|
specification_version: 4
|
200
200
|
summary: A command-line utility for releasing Chef community cookbooks
|
@@ -214,4 +214,3 @@ test_files:
|
|
214
214
|
- spec/support/generators.rb
|
215
215
|
- spec/unit/cookbook/metadata_spec.rb
|
216
216
|
- spec/unit/error_spec.rb
|
217
|
-
has_rdoc:
|