stove 2.0.0.beta.1 → 2.0.0.beta.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -0
- data/README.md +8 -7
- data/features/actions/changelog.feature +7 -0
- data/features/actions/upload.feature +6 -28
- data/features/plugins/community.feature +40 -0
- data/features/plugins/git.feature +5 -0
- data/features/step_definitions/cookbook_steps.rb +5 -5
- data/lib/stove/actions/bump.rb +1 -1
- data/lib/stove/actions/changelog.rb +1 -1
- data/lib/stove/actions/upload.rb +3 -19
- data/lib/stove/cli.rb +5 -0
- data/lib/stove/config.rb +1 -1
- data/lib/stove/cookbook.rb +8 -0
- data/lib/stove/plugins/community.rb +26 -0
- data/lib/stove/plugins/github.rb +1 -2
- data/lib/stove/version.rb +1 -1
- data/lib/stove.rb +5 -4
- data/locales/en.yml +2 -3
- data/stove.gemspec +6 -3
- metadata +16 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d576bd5d791bfa1f3a6119bc0a2da2ba5576d8a
|
4
|
+
data.tar.gz: 951ed197d25bb581336f69da68d8509baf1f678a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8504c7fc94657dcff042bdc86458099fb30a30e9d9b279c145df1f443aa7286a37474b4f7a00211b56199759a336dcc016f14e22a96c241d940ea891d4359693
|
7
|
+
data.tar.gz: 6f3a76458636021f386cb1d47b939f1864bf8e43d76a6a23b160803ade0f52ef956430bd0ef0f1afd3eec2f6624af69e0ba478dd681f051f996715c38beeca9a
|
data/CHANGELOG.md
CHANGED
@@ -18,6 +18,7 @@ v2.0.0 (unreleased)
|
|
18
18
|
- Improve rake task to automatically perfom a minor bump when no version if given
|
19
19
|
- Persist data across the cookbook object
|
20
20
|
- Use singleton classes to save memory and loadtime
|
21
|
+
- Force a non-broken version of log4r
|
21
22
|
|
22
23
|
v1.1.0
|
23
24
|
------
|
data/README.md
CHANGED
@@ -78,15 +78,16 @@ You can always use the `--help` flag to get information:
|
|
78
78
|
Usage: bake x.y.z
|
79
79
|
|
80
80
|
Actions:
|
81
|
-
--no-bump
|
82
|
-
--no-changelog
|
83
|
-
--no-dev
|
84
|
-
--no-upload
|
81
|
+
--[no-]bump [Don't] Perform a version bump the local version automatically
|
82
|
+
--[no-]changelog [Don't] Generate and prompt for a CHANGELOG
|
83
|
+
--[no-]dev [Don't] Bump a minor version release for development purposes
|
84
|
+
--[no-]upload [Don't] Execute upload stages of enabled plugins
|
85
85
|
|
86
86
|
Plugins:
|
87
|
-
--no-
|
88
|
-
--no-
|
89
|
-
--no-
|
87
|
+
--[no-]community [Don't] Upload to the community site
|
88
|
+
--[no-]git [Don't] Tag and push to a git remote
|
89
|
+
--[no-]github [Don't] Publish the release to GitHub
|
90
|
+
--[no-]jira [Don't] Resolve JIRA issues
|
90
91
|
|
91
92
|
Global Options:
|
92
93
|
--locale [LANGUAGE] Change the language to output messages
|
@@ -32,6 +32,13 @@ Feature: Changelog
|
|
32
32
|
* I successfully run `bake 1.0.0 --changelog --bump`
|
33
33
|
* the file "CHANGELOG.md" should contain "v1.0.0"
|
34
34
|
|
35
|
+
Scenario: With a hyphenated cookbook name
|
36
|
+
* I have a cookbook named "bacon-maple-bars"
|
37
|
+
* the environment variable "EDITOR" is "cat"
|
38
|
+
* I successfully run `bake 1.0.0 --changelog --bump`
|
39
|
+
* the file "CHANGELOG.md" should contain "bacon-maple-bars Changelog"
|
40
|
+
* the file "CHANGELOG.md" should contain "v1.0.0"
|
41
|
+
|
35
42
|
Scenario: With the git plugin
|
36
43
|
* I have a cookbook named "bacon" with git support
|
37
44
|
* the environment variable "EDITOR" is "cat"
|
@@ -5,42 +5,20 @@ Feature: Upload
|
|
5
5
|
* I have a cookbook named "bacon"
|
6
6
|
* I am using the community server
|
7
7
|
|
8
|
-
Scenario: When the configuration does not exist
|
9
|
-
* I run `bake --upload`
|
10
|
-
* it should fail with "configuration for the Chef community site does not exist"
|
11
|
-
|
12
|
-
Scenario: When the username does not exist
|
13
|
-
* the Stove config at "community._" is ""
|
14
|
-
* I run `bake --upload`
|
15
|
-
* it should fail with "does not contain a username"
|
16
|
-
|
17
|
-
Scenario: When the key does not exist
|
18
|
-
* the Stove config at "community.username" is "bobo"
|
19
|
-
* I run `bake --upload`
|
20
|
-
* it should fail with "does not contain a key"
|
21
|
-
|
22
|
-
Scenario: When the category does not exist
|
23
|
-
* the Stove config at "community.username" is "bobo"
|
24
|
-
* the Stove config at "community.key" is "../../features/support/stove.pem"
|
25
|
-
* I run `bake --upload`
|
26
|
-
* it should fail with "You did not specify a category"
|
27
|
-
|
28
|
-
Scenario: In isolation
|
29
|
-
* the Stove config at "community.username" is "bobo"
|
30
|
-
* the Stove config at "community.key" is "../../features/support/stove.pem"
|
31
|
-
* the community server has the cookbook:
|
32
|
-
| bacon | 1.2.3 | Application |
|
33
|
-
* I successfully run `bake --upload`
|
34
|
-
|
35
8
|
Scenario: With the git plugin
|
36
9
|
* I have a cookbook named "bacon" with git support
|
37
10
|
* the Stove config at "community.username" is "bobo"
|
38
11
|
* the Stove config at "community.key" is "../../features/support/stove.pem"
|
39
12
|
* the community server has the cookbook:
|
40
13
|
| bacon | 1.2.3 | Application |
|
41
|
-
* I successfully run `bake --git --upload`
|
14
|
+
* I successfully run `bake --git --upload --community`
|
42
15
|
* the git remote should have the tag "v0.0.0"
|
43
16
|
|
17
|
+
Scenario: With the git plugin and the upload action disabled
|
18
|
+
* I have a cookbook named "bacon" with git support
|
19
|
+
* I successfully run `bake --git --no-upload`
|
20
|
+
* the git remote should not have the tag "v0.0.0"
|
21
|
+
|
44
22
|
@wip
|
45
23
|
Scenario: With the GitHub plugin
|
46
24
|
|
@@ -0,0 +1,40 @@
|
|
1
|
+
Feature: Community
|
2
|
+
Background:
|
3
|
+
* the Stove config is empty
|
4
|
+
* the CLI options are all off
|
5
|
+
* I have a cookbook named "bacon"
|
6
|
+
* I am using the community server
|
7
|
+
|
8
|
+
Scenario: When the configuration does not exist
|
9
|
+
* I run `bake --upload --community`
|
10
|
+
* it should fail with "configuration for the Chef community site does not exist"
|
11
|
+
|
12
|
+
Scenario: When the username does not exist
|
13
|
+
* the Stove config at "community._" is ""
|
14
|
+
* I run `bake --upload --community`
|
15
|
+
* it should fail with "does not contain a username"
|
16
|
+
|
17
|
+
Scenario: When the key does not exist
|
18
|
+
* the Stove config at "community.username" is "bobo"
|
19
|
+
* I run `bake --upload --community`
|
20
|
+
* it should fail with "does not contain a key"
|
21
|
+
|
22
|
+
Scenario: When the category does not exist
|
23
|
+
* the Stove config at "community.username" is "bobo"
|
24
|
+
* the Stove config at "community.key" is "../../features/support/stove.pem"
|
25
|
+
* I run `bake --upload --community`
|
26
|
+
* it should fail with "You did not specify a category"
|
27
|
+
|
28
|
+
Scenario: In isolation
|
29
|
+
* the Stove config at "community.username" is "bobo"
|
30
|
+
* the Stove config at "community.key" is "../../features/support/stove.pem"
|
31
|
+
* the community server has the cookbook:
|
32
|
+
| bacon | 1.2.3 | Application |
|
33
|
+
* I successfully run `bake --upload --community`
|
34
|
+
|
35
|
+
Scenario: When the community plugin is explicitly disabled
|
36
|
+
* the Stove config at "community.username" is "bobo"
|
37
|
+
* the Stove config at "community.key" is "../../features/support/stove.pem"
|
38
|
+
* I successfully run `bake --upload --no-community`
|
39
|
+
* the community server will not have the cookbook:
|
40
|
+
| bacon | | |
|
@@ -22,3 +22,8 @@ Feature: git Plugin
|
|
22
22
|
* the remote repository has additional commits
|
23
23
|
* I run `bake --git`
|
24
24
|
* it should fail with "out of sync with the remote repository"
|
25
|
+
|
26
|
+
Scenario: When a git upload should be done
|
27
|
+
* I have a cookbook named "bacon" with git support
|
28
|
+
* I successfully run `bake --upload --git`
|
29
|
+
* the git remote should have the tag "v0.0.0"
|
@@ -1,12 +1,12 @@
|
|
1
|
-
Given /^I have a cookbook named "(\w+)" at version "([\d\.]+)"$/ do |name, version|
|
1
|
+
Given /^I have a cookbook named "([\w\-]+)" at version "([\d\.]+)"$/ do |name, version|
|
2
2
|
create_cookbook(name, version)
|
3
3
|
end
|
4
4
|
|
5
|
-
Given /^I have a cookbook named "(\w+)"$/ do |name|
|
5
|
+
Given /^I have a cookbook named "([\w\-]+)"$/ do |name|
|
6
6
|
create_cookbook(name, '0.0.0')
|
7
7
|
end
|
8
8
|
|
9
|
-
Given /^I have a cookbook named "(\w+)" with git support$/ do |name|
|
9
|
+
Given /^I have a cookbook named "([\w\-]+)" with git support$/ do |name|
|
10
10
|
create_cookbook(name, '0.0.0', git: true)
|
11
11
|
end
|
12
12
|
|
@@ -23,8 +23,8 @@ def create_cookbook(name, version, options = {})
|
|
23
23
|
cd(name)
|
24
24
|
|
25
25
|
write_file('CHANGELOG.md', <<-EOH.gsub(/^ {4}/, ''))
|
26
|
-
Changelog
|
27
|
-
|
26
|
+
#{name} Changelog
|
27
|
+
=================
|
28
28
|
|
29
29
|
v#{version} (#{Time.now.to_date})
|
30
30
|
----------------------------
|
data/lib/stove/actions/bump.rb
CHANGED
data/lib/stove/actions/upload.rb
CHANGED
@@ -1,27 +1,11 @@
|
|
1
1
|
module Stove
|
2
2
|
class Action::Upload < Action::Base
|
3
3
|
id 'upload'
|
4
|
-
description '
|
5
|
-
|
6
|
-
validate(:configuration) do
|
7
|
-
Config.has_key?(:community)
|
8
|
-
end
|
9
|
-
|
10
|
-
validate(:username) do
|
11
|
-
Config[:community].has_key?(:username)
|
12
|
-
end
|
13
|
-
|
14
|
-
validate(:key) do
|
15
|
-
Config[:community].has_key?(:key)
|
16
|
-
end
|
17
|
-
|
18
|
-
validate(:category) do
|
19
|
-
!cookbook.category.nil?
|
20
|
-
end
|
4
|
+
description 'Publish the release to enabled plugin destinations'
|
21
5
|
|
22
6
|
def run
|
23
|
-
log.
|
24
|
-
|
7
|
+
log.debug('Running upload hooks...')
|
8
|
+
log.info('Done!')
|
25
9
|
end
|
26
10
|
end
|
27
11
|
end
|
data/lib/stove/cli.rb
CHANGED
@@ -36,6 +36,11 @@ module Stove
|
|
36
36
|
# no cookbook at the given path
|
37
37
|
cookbook = Cookbook.new(options[:path])
|
38
38
|
|
39
|
+
# Set the category on the cookbook object if one was given
|
40
|
+
if category = options.delete(:category)
|
41
|
+
cookbook.category = category
|
42
|
+
end
|
43
|
+
|
39
44
|
# Now execute the actual runners (validations and errors might occur)
|
40
45
|
Runner.run(cookbook, options)
|
41
46
|
|
data/lib/stove/config.rb
CHANGED
data/lib/stove/cookbook.rb
CHANGED
@@ -37,6 +37,14 @@ module Stove
|
|
37
37
|
#
|
38
38
|
attr_reader :metadata
|
39
39
|
|
40
|
+
#
|
41
|
+
# Set the category for this cookbook
|
42
|
+
#
|
43
|
+
# @param [String]
|
44
|
+
# the name of the category (values are restricted by the Community Site)
|
45
|
+
#
|
46
|
+
attr_writer :category
|
47
|
+
|
40
48
|
#
|
41
49
|
# The changeset for this cookbook. This is written by the changelog
|
42
50
|
# generator and read by various plugins.
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Stove
|
2
|
+
class Plugin::Community < Plugin::Base
|
3
|
+
id 'community'
|
4
|
+
description 'Publish the release to the Chef community site'
|
5
|
+
|
6
|
+
validate(:configuration) do
|
7
|
+
Config.has_key?(:community)
|
8
|
+
end
|
9
|
+
|
10
|
+
validate(:username) do
|
11
|
+
Config[:community].has_key?(:username)
|
12
|
+
end
|
13
|
+
|
14
|
+
validate(:key) do
|
15
|
+
Config[:community].has_key?(:key)
|
16
|
+
end
|
17
|
+
|
18
|
+
validate(:category) do
|
19
|
+
!cookbook.category.nil?
|
20
|
+
end
|
21
|
+
|
22
|
+
after(:upload, 'Publishing the release to the Chef community site') do
|
23
|
+
Community.upload(cookbook)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/stove/plugins/github.rb
CHANGED
data/lib/stove/version.rb
CHANGED
data/lib/stove.rb
CHANGED
@@ -43,10 +43,11 @@ module Stove
|
|
43
43
|
end
|
44
44
|
|
45
45
|
module Plugin
|
46
|
-
autoload :Base,
|
47
|
-
autoload :
|
48
|
-
autoload :
|
49
|
-
autoload :
|
46
|
+
autoload :Base, 'stove/plugins/base'
|
47
|
+
autoload :Community, 'stove/plugins/community'
|
48
|
+
autoload :Git, 'stove/plugins/git'
|
49
|
+
autoload :GitHub, 'stove/plugins/github'
|
50
|
+
autoload :JIRA, 'stove/plugins/jira'
|
50
51
|
end
|
51
52
|
|
52
53
|
#
|
data/locales/en.yml
CHANGED
@@ -179,10 +179,9 @@ en:
|
|
179
179
|
}
|
180
180
|
}
|
181
181
|
|
182
|
-
|
183
|
-
# Upload validations
|
182
|
+
# Community validations
|
184
183
|
# ---------------------
|
185
|
-
|
184
|
+
community:
|
186
185
|
configuration: >
|
187
186
|
The Stove configuration for the Chef community site does not exist! In
|
188
187
|
order to perform operations against the Chef community site, you must
|
data/stove.gemspec
CHANGED
@@ -19,10 +19,13 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
21
|
# Runtime dependencies
|
22
|
-
spec.add_dependency 'faraday', '~> 0.8'
|
23
|
-
spec.add_dependency 'faraday_middleware', '~> 0.9'
|
22
|
+
spec.add_dependency 'faraday', '~> 0.8.9'
|
23
|
+
spec.add_dependency 'faraday_middleware', '~> 0.9.0'
|
24
24
|
spec.add_dependency 'i18n', '~> 0.6'
|
25
|
-
|
25
|
+
|
26
|
+
# Because log4r doesn't know the meaning of fucking NON-BREAKING bug fixes
|
27
|
+
# in patch releases.
|
28
|
+
spec.add_dependency 'log4r', '~> 1.1', '< 1.1.11'
|
26
29
|
spec.add_dependency 'minitar', '~> 0.5'
|
27
30
|
spec.add_dependency 'mixlib-authentication', '~> 1.3'
|
28
31
|
spec.add_dependency 'octokit', '~> 2.7'
|
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: 2.0.0.beta.
|
4
|
+
version: 2.0.0.beta.2
|
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: 2014-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.8.9
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 0.8.9
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: faraday_middleware
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.9.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.9.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: i18n
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,6 +59,9 @@ dependencies:
|
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '1.1'
|
62
|
+
- - <
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 1.1.11
|
62
65
|
type: :runtime
|
63
66
|
prerelease: false
|
64
67
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -66,6 +69,9 @@ dependencies:
|
|
66
69
|
- - ~>
|
67
70
|
- !ruby/object:Gem::Version
|
68
71
|
version: '1.1'
|
72
|
+
- - <
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 1.1.11
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
76
|
name: minitar
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -213,6 +219,7 @@ files:
|
|
213
219
|
- features/actions/changelog.feature
|
214
220
|
- features/actions/dev.feature
|
215
221
|
- features/actions/upload.feature
|
222
|
+
- features/plugins/community.feature
|
216
223
|
- features/plugins/git.feature
|
217
224
|
- features/rake.feature
|
218
225
|
- features/step_definitions/cli_steps.rb
|
@@ -251,6 +258,7 @@ files:
|
|
251
258
|
- lib/stove/mixins/validatable.rb
|
252
259
|
- lib/stove/packager.rb
|
253
260
|
- lib/stove/plugins/base.rb
|
261
|
+
- lib/stove/plugins/community.rb
|
254
262
|
- lib/stove/plugins/git.rb
|
255
263
|
- lib/stove/plugins/github.rb
|
256
264
|
- lib/stove/plugins/jira.rb
|
@@ -281,7 +289,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
281
289
|
version: 1.3.1
|
282
290
|
requirements: []
|
283
291
|
rubyforge_project:
|
284
|
-
rubygems_version: 2.2.
|
292
|
+
rubygems_version: 2.2.1
|
285
293
|
signing_key:
|
286
294
|
specification_version: 4
|
287
295
|
summary: A simple gem for packaging, releasing, and sanity-checking an Opscode community
|
@@ -292,6 +300,7 @@ test_files:
|
|
292
300
|
- features/actions/changelog.feature
|
293
301
|
- features/actions/dev.feature
|
294
302
|
- features/actions/upload.feature
|
303
|
+
- features/plugins/community.feature
|
295
304
|
- features/plugins/git.feature
|
296
305
|
- features/rake.feature
|
297
306
|
- features/step_definitions/cli_steps.rb
|