stove 2.0.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +6 -1
  4. data/CHANGELOG.md +20 -0
  5. data/README.md +34 -80
  6. data/Rakefile +9 -1
  7. data/bin/bake +2 -0
  8. data/bin/stove +4 -0
  9. data/features/plugins/community.feature +11 -26
  10. data/features/plugins/git.feature +17 -6
  11. data/features/step_definitions/community_steps.rb +3 -1
  12. data/features/step_definitions/config_steps.rb +4 -21
  13. data/features/step_definitions/git_steps.rb +38 -1
  14. data/features/support/env.rb +17 -11
  15. data/features/support/stove/git.rb +28 -8
  16. data/lib/stove/cli.rb +72 -53
  17. data/lib/stove/community.rb +16 -67
  18. data/lib/stove/config.rb +55 -46
  19. data/lib/stove/cookbook/metadata.rb +3 -5
  20. data/lib/stove/cookbook.rb +2 -41
  21. data/lib/stove/error.rb +37 -8
  22. data/lib/stove/filter.rb +2 -1
  23. data/lib/stove/mixins/instanceable.rb +3 -2
  24. data/lib/stove/mixins/validatable.rb +5 -1
  25. data/lib/stove/packager.rb +11 -3
  26. data/lib/stove/plugins/base.rb +26 -13
  27. data/lib/stove/plugins/community.rb +3 -7
  28. data/lib/stove/plugins/git.rb +27 -30
  29. data/lib/stove/rake_task.rb +3 -63
  30. data/lib/stove/runner.rb +16 -65
  31. data/lib/stove/validator.rb +7 -6
  32. data/lib/stove/version.rb +1 -1
  33. data/lib/stove.rb +3 -21
  34. data/spec/spec_helper.rb +2 -0
  35. data/spec/unit/error_spec.rb +148 -0
  36. data/stove.gemspec +10 -14
  37. data/templates/errors/abstract_method.erb +5 -0
  38. data/templates/errors/community_category_validation_failed.erb +5 -0
  39. data/templates/errors/community_key_validation_failed.erb +3 -0
  40. data/templates/errors/community_username_validation_failed.erb +3 -0
  41. data/templates/errors/git_clean_validation_failed.erb +1 -0
  42. data/templates/errors/git_failed.erb +5 -0
  43. data/templates/errors/git_repository_validation_failed.erb +3 -0
  44. data/templates/errors/git_up_to_date_validation_failed.erb +7 -0
  45. data/templates/errors/metadata_not_found.erb +1 -0
  46. data/templates/errors/server_unavailable.erb +1 -0
  47. data/templates/errors/stove_error.erb +1 -0
  48. metadata +32 -114
  49. data/features/actions/bump.feature +0 -22
  50. data/features/actions/changelog.feature +0 -52
  51. data/features/actions/dev.feature +0 -18
  52. data/features/actions/upload.feature +0 -26
  53. data/features/rake.feature +0 -15
  54. data/features/step_definitions/cli_steps.rb +0 -3
  55. data/lib/stove/actions/base.rb +0 -21
  56. data/lib/stove/actions/bump.rb +0 -25
  57. data/lib/stove/actions/changelog.rb +0 -71
  58. data/lib/stove/actions/dev.rb +0 -22
  59. data/lib/stove/actions/finish.rb +0 -8
  60. data/lib/stove/actions/start.rb +0 -7
  61. data/lib/stove/actions/upload.rb +0 -11
  62. data/lib/stove/jira.rb +0 -88
  63. data/lib/stove/middlewares/chef_authentication.rb +0 -60
  64. data/lib/stove/middlewares/exceptions.rb +0 -17
  65. data/lib/stove/mixins/filterable.rb +0 -11
  66. data/lib/stove/plugins/github.rb +0 -107
  67. data/lib/stove/plugins/jira.rb +0 -72
  68. data/locales/en.yml +0 -230
@@ -0,0 +1,3 @@
1
+ You did not specify the username to authenticate with! The Chef community site requires a username for authentication:
2
+
3
+ stove --username sethvargo
@@ -0,0 +1 @@
1
+ The cookbook at `<%= @path %>' has untracked files! In order to use the git plugin, you must have a clean working directory. Please commit or stash your changes before running Stove again.
@@ -0,0 +1,5 @@
1
+ An error occurred while running:
2
+
3
+ git <%= @command %>
4
+
5
+ There is likely an informative message from git that explains what happened right above this message.
@@ -0,0 +1,3 @@
1
+ The cookbook at `<%= @path %>' does not appear to be a valid git repository. In order to use the git plugin, your cookbook must be initialized as a git repository. To create a git repository, run:
2
+
3
+ git init <%= @path %>
@@ -0,0 +1,7 @@
1
+ The cookbook at `<%= @path %>' is out of sync with the remote repository. Please update your local cache with the remote repository before continuing:
2
+
3
+ git pull
4
+
5
+ And then push your local changes to the remote repository:
6
+
7
+ git push
@@ -0,0 +1 @@
1
+ The file at `<%= @path %>' does not exist or does not contain valid metadata. Please make sure you have specified the correct path and that the metdata file exists.
@@ -0,0 +1 @@
1
+ The server at `<%= @url %>' is unavailable or is not currently accepting client connections. Please ensure the server is accessible via ping (or telnet) on your local network. If this error persists, please contact your network administrator.
@@ -0,0 +1 @@
1
+ Oh no! Something really bad happened. I am not sure what actually happened because this is the catch-all error, but you should most definitely report an issue on GitHub at https://github.com/sethvargo/stove.
metadata CHANGED
@@ -1,57 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stove
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 3.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: 2014-04-04 00:00:00.000000000 Z
11
+ date: 2014-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: faraday
14
+ name: chef-api
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.8.9
19
+ version: '0.4'
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: 0.8.9
27
- - !ruby/object:Gem::Dependency
28
- name: faraday_middleware
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: 0.9.0
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: 0.9.0
41
- - !ruby/object:Gem::Dependency
42
- name: i18n
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '0.6'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '0.6'
26
+ version: '0.4'
55
27
  - !ruby/object:Gem::Dependency
56
28
  name: logify
57
29
  requirement: !ruby/object:Gem::Requirement
@@ -80,76 +52,34 @@ dependencies:
80
52
  - - "~>"
81
53
  - !ruby/object:Gem::Version
82
54
  version: '0.5'
83
- - !ruby/object:Gem::Dependency
84
- name: mixlib-authentication
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '1.3'
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '1.3'
97
- - !ruby/object:Gem::Dependency
98
- name: octokit
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '3.0'
104
- type: :runtime
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '3.0'
111
- - !ruby/object:Gem::Dependency
112
- name: solve
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '0.8'
118
- type: :runtime
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: '0.8'
125
55
  - !ruby/object:Gem::Dependency
126
56
  name: aruba
127
57
  requirement: !ruby/object:Gem::Requirement
128
58
  requirements:
129
59
  - - "~>"
130
60
  - !ruby/object:Gem::Version
131
- version: '0.5'
61
+ version: '0.6'
132
62
  type: :development
133
63
  prerelease: false
134
64
  version_requirements: !ruby/object:Gem::Requirement
135
65
  requirements:
136
66
  - - "~>"
137
67
  - !ruby/object:Gem::Version
138
- version: '0.5'
68
+ version: '0.6'
139
69
  - !ruby/object:Gem::Dependency
140
70
  name: bundler
141
71
  requirement: !ruby/object:Gem::Requirement
142
72
  requirements:
143
73
  - - "~>"
144
74
  - !ruby/object:Gem::Version
145
- version: '1.3'
75
+ version: '1.6'
146
76
  type: :development
147
77
  prerelease: false
148
78
  version_requirements: !ruby/object:Gem::Requirement
149
79
  requirements:
150
80
  - - "~>"
151
81
  - !ruby/object:Gem::Version
152
- version: '1.3'
82
+ version: '1.6'
153
83
  - !ruby/object:Gem::Dependency
154
84
  name: community-zero
155
85
  requirement: !ruby/object:Gem::Requirement
@@ -184,20 +114,20 @@ dependencies:
184
114
  requirements:
185
115
  - - "~>"
186
116
  - !ruby/object:Gem::Version
187
- version: '2.14'
117
+ version: '3.0'
188
118
  type: :development
189
119
  prerelease: false
190
120
  version_requirements: !ruby/object:Gem::Requirement
191
121
  requirements:
192
122
  - - "~>"
193
123
  - !ruby/object:Gem::Version
194
- version: '2.14'
195
- description: A simple gem for packaging, releasing, and sanity-checking a community
196
- cookbook
124
+ version: '3.0'
125
+ description: A utility for releasing Chef community cookbooks
197
126
  email:
198
127
  - sethvargo@gmail.com
199
128
  executables:
200
129
  - bake
130
+ - stove
201
131
  extensions: []
202
132
  extra_rdoc_files: []
203
133
  files:
@@ -209,14 +139,9 @@ files:
209
139
  - README.md
210
140
  - Rakefile
211
141
  - bin/bake
212
- - features/actions/bump.feature
213
- - features/actions/changelog.feature
214
- - features/actions/dev.feature
215
- - features/actions/upload.feature
142
+ - bin/stove
216
143
  - features/plugins/community.feature
217
144
  - features/plugins/git.feature
218
- - features/rake.feature
219
- - features/step_definitions/cli_steps.rb
220
145
  - features/step_definitions/community_steps.rb
221
146
  - features/step_definitions/config_steps.rb
222
147
  - features/step_definitions/cookbook_steps.rb
@@ -226,13 +151,6 @@ files:
226
151
  - features/support/stove.pem
227
152
  - features/support/stove/git.rb
228
153
  - lib/stove.rb
229
- - lib/stove/actions/base.rb
230
- - lib/stove/actions/bump.rb
231
- - lib/stove/actions/changelog.rb
232
- - lib/stove/actions/dev.rb
233
- - lib/stove/actions/finish.rb
234
- - lib/stove/actions/start.rb
235
- - lib/stove/actions/upload.rb
236
154
  - lib/stove/cli.rb
237
155
  - lib/stove/community.rb
238
156
  - lib/stove/config.rb
@@ -240,11 +158,7 @@ files:
240
158
  - lib/stove/cookbook/metadata.rb
241
159
  - lib/stove/error.rb
242
160
  - lib/stove/filter.rb
243
- - lib/stove/jira.rb
244
161
  - lib/stove/mash.rb
245
- - lib/stove/middlewares/chef_authentication.rb
246
- - lib/stove/middlewares/exceptions.rb
247
- - lib/stove/mixins/filterable.rb
248
162
  - lib/stove/mixins/insideable.rb
249
163
  - lib/stove/mixins/instanceable.rb
250
164
  - lib/stove/mixins/optionable.rb
@@ -253,15 +167,25 @@ files:
253
167
  - lib/stove/plugins/base.rb
254
168
  - lib/stove/plugins/community.rb
255
169
  - lib/stove/plugins/git.rb
256
- - lib/stove/plugins/github.rb
257
- - lib/stove/plugins/jira.rb
258
170
  - lib/stove/rake_task.rb
259
171
  - lib/stove/runner.rb
260
172
  - lib/stove/util.rb
261
173
  - lib/stove/validator.rb
262
174
  - lib/stove/version.rb
263
- - locales/en.yml
175
+ - spec/spec_helper.rb
176
+ - spec/unit/error_spec.rb
264
177
  - stove.gemspec
178
+ - templates/errors/abstract_method.erb
179
+ - templates/errors/community_category_validation_failed.erb
180
+ - templates/errors/community_key_validation_failed.erb
181
+ - templates/errors/community_username_validation_failed.erb
182
+ - templates/errors/git_clean_validation_failed.erb
183
+ - templates/errors/git_failed.erb
184
+ - templates/errors/git_repository_validation_failed.erb
185
+ - templates/errors/git_up_to_date_validation_failed.erb
186
+ - templates/errors/metadata_not_found.erb
187
+ - templates/errors/server_unavailable.erb
188
+ - templates/errors/stove_error.erb
265
189
  homepage: https://github.com/sethvargo/stove
266
190
  licenses:
267
191
  - Apache 2.0
@@ -274,7 +198,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
274
198
  requirements:
275
199
  - - ">="
276
200
  - !ruby/object:Gem::Version
277
- version: '0'
201
+ version: '1.9'
278
202
  required_rubygems_version: !ruby/object:Gem::Requirement
279
203
  requirements:
280
204
  - - ">="
@@ -282,21 +206,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
282
206
  version: '0'
283
207
  requirements: []
284
208
  rubyforge_project:
285
- rubygems_version: 2.2.2
209
+ rubygems_version: 2.3.0
286
210
  signing_key:
287
211
  specification_version: 4
288
- summary: A simple gem for packaging, releasing, and sanity-checking an Opscode community
289
- cookbook. This gem automatically packages the appropiate files, syncs with JIRA
290
- issues (if applicable), and automatically generates CHANGELOGs.
212
+ summary: A command-line utility for releasing Chef community cookbooks
291
213
  test_files:
292
- - features/actions/bump.feature
293
- - features/actions/changelog.feature
294
- - features/actions/dev.feature
295
- - features/actions/upload.feature
296
214
  - features/plugins/community.feature
297
215
  - features/plugins/git.feature
298
- - features/rake.feature
299
- - features/step_definitions/cli_steps.rb
300
216
  - features/step_definitions/community_steps.rb
301
217
  - features/step_definitions/config_steps.rb
302
218
  - features/step_definitions/cookbook_steps.rb
@@ -305,4 +221,6 @@ test_files:
305
221
  - features/support/env.rb
306
222
  - features/support/stove.pem
307
223
  - features/support/stove/git.rb
224
+ - spec/spec_helper.rb
225
+ - spec/unit/error_spec.rb
308
226
  has_rdoc:
@@ -1,22 +0,0 @@
1
- Feature: Bump
2
- Background:
3
- * the Stove config is empty
4
- * the CLI options are all off
5
- * I have a cookbook named "bacon" at version "1.0.0"
6
-
7
- Scenario: When the version has not changed
8
- * I run `bake 1.0.0 --bump`
9
- * it should fail with "version you are trying to bump already exists"
10
-
11
- Scenario: When the version is not greater than the current
12
- * I run `bake 0.1.0 --bump`
13
- * it should fail with "bump to is less than the existing version"
14
-
15
- Scenario: In isolation
16
- * I successfully run `bake 2.0.0 --bump`
17
- * the file "metadata.rb" should contain "2.0.0"
18
-
19
- Scenario: With the git plugin
20
- * I have a cookbook named "bacon" with git support
21
- * I successfully run `bake 1.0.0 --bump --git`
22
- * the git remote should have the commit "Version bump to 1.0.0"
@@ -1,52 +0,0 @@
1
- Feature: Changelog
2
- Background:
3
- * the Stove config is empty
4
- * the CLI options are all off
5
- * I have a cookbook named "bacon"
6
-
7
- Scenario: When the Changelog does not exist
8
- * I remove the file "CHANGELOG.md"
9
- * I run `bake --changelog`
10
- * it should fail with "There is no `CHANGELOG.md' found"
11
-
12
- Scenario: When the Changelog is not a proper format
13
- * I write to "CHANGELOG.md" with:
14
- """
15
- This can't possibly be a valid Changelog
16
- """
17
- * I run `bake --changelog`
18
- * it should fail with "does not appear to be a valid format"
19
-
20
- Scenario: When the $EDITOR is not set
21
- * the environment variable "EDITOR" is unset
22
- * I run `bake --changelog`
23
- * it should fail with "The `$EDITOR' environment variable is not set"
24
-
25
- Scenario: In isolation
26
- * the environment variable "EDITOR" is "cat"
27
- * I successfully run `bake --changelog`
28
- * the file "CHANGELOG.md" should contain "v0.0.0"
29
-
30
- Scenario: With bump
31
- * the environment variable "EDITOR" is "cat"
32
- * I successfully run `bake 1.0.0 --changelog --bump`
33
- * the file "CHANGELOG.md" should contain "v1.0.0"
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
-
42
- Scenario: With the git plugin
43
- * I have a cookbook named "bacon" with git support
44
- * the environment variable "EDITOR" is "cat"
45
- * I successfully run `bake --changelog --git`
46
- * the git remote should have the commit "Publish 0.0.0 Changelog"
47
-
48
- @wip
49
- Scenario: With the GitHub plugin
50
-
51
- @wip
52
- Scenario: With the JIRA plugin
@@ -1,18 +0,0 @@
1
- Feature: Dev
2
- Background:
3
- * the Stove config is empty
4
- * the CLI options are all off
5
- * I have a cookbook named "bacon" at version "1.0.0"
6
-
7
- Scenario: In isolation
8
- * I successfully run `bake --dev`
9
- * the file "metadata.rb" should contain "1.0.1"
10
-
11
- Scenario: With bump
12
- * I successfully run `bake 2.0.0 --bump --dev`
13
- * the file "metadata.rb" should contain "2.0.1"
14
-
15
- Scenario: With the git plugin
16
- * I have a cookbook named "bacon" with git support
17
- * I successfully run `bake --dev --git`
18
- * the git remote should have the commit "Version bump to 0.0.1 (for development)"
@@ -1,26 +0,0 @@
1
- Feature: Upload
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: With the git plugin
9
- * I have a cookbook named "bacon" with git support
10
- * the Stove config at "community.username" is "bobo"
11
- * the Stove config at "community.key" is "../../features/support/stove.pem"
12
- * the community server has the cookbook:
13
- | bacon | 1.2.3 | Application |
14
- * I successfully run `bake --git --upload --community`
15
- * the git remote should have the tag "v0.0.0"
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
-
22
- @wip
23
- Scenario: With the GitHub plugin
24
-
25
- @wip
26
- Scenario: With the JIRA plugin
@@ -1,15 +0,0 @@
1
- Feature: Rake Task
2
- Background:
3
- * I have a cookbook named "bacon"
4
-
5
- Scenario: Using rake to publish a cookbook
6
- * I write to "Rakefile" with:
7
- """
8
- require 'stove/rake_task'
9
- Stove::RakeTask.new
10
- """
11
- * I successfully run `rake -T`
12
- * the output should contain:
13
- """
14
- rake publish[version] # Publish this cookbook
15
- """
@@ -1,3 +0,0 @@
1
- When /^the CLI options are all off$/ do
2
- set_env('CLI_DEFAULT', 'false')
3
- end
@@ -1,21 +0,0 @@
1
- module Stove
2
- class Action::Base
3
- include Logify
4
- extend Mixin::Optionable
5
- extend Mixin::Validatable
6
-
7
- option :id
8
- option :description
9
-
10
- attr_reader :cookbook
11
- attr_reader :options
12
-
13
- def initialize(cookbook, options = {})
14
- @cookbook, @options = cookbook, options
15
- end
16
-
17
- def run
18
- raise Error::AbstractMethod.new(method: 'Action::Base#run')
19
- end
20
- end
21
- end
@@ -1,25 +0,0 @@
1
- module Stove
2
- class Action::Bump < Action::Base
3
- id 'bump'
4
- description 'Perform a version bump the local version automatically'
5
-
6
- validate(:changed) do
7
- cookbook.version != options[:version]
8
- end
9
-
10
- validate(:incremented) do
11
- version = Gem::Version.new(options[:version].dup)
12
- Gem::Requirement.new("> #{cookbook.version}").satisfied_by?(version)
13
- end
14
-
15
- def run
16
- log.info('Performing version bump')
17
- log.debug("Version is currently #{cookbook.version}")
18
- log.debug("Bumped version is #{options[:version]}")
19
-
20
- cookbook.bump(options[:version])
21
-
22
- log.debug("Version is now #{cookbook.version}")
23
- end
24
- end
25
- end
@@ -1,71 +0,0 @@
1
- module Stove
2
- class Action::Changelog < Action::Base
3
- id 'changelog'
4
- description 'Generate and prompt for a CHANGELOG'
5
-
6
- validate(:exists) do
7
- File.exists?('CHANGELOG.md')
8
- end
9
-
10
- validate(:format) do
11
- lines = File.read('CHANGELOG.md')
12
- lines.match(/^[\w\s\-]+\n=+(.*\n)+v[0-9\.]+(\ \(.+\))?\n\-+/)
13
- end
14
-
15
- validate(:editor) do
16
- !ENV['EDITOR'].nil?
17
- end
18
-
19
- def run
20
- log.info('Generating new Changelog')
21
- log.debug("Generated changeset:\n#{default_changeset}")
22
-
23
- # Open a file prompt for changes
24
- prompt_for_changeset
25
-
26
- log.debug("New changeset:\n#{cookbook.changeset}")
27
-
28
- # Write the new changelog to disk
29
- path = File.join(cookbook.path, 'CHANGELOG.md')
30
- contents = File.readlines(path)
31
- index = contents.find_index { |line| line =~ /^(--)+/ }
32
-
33
- log.debug("Writing changelog at `#{path}', index #{index}")
34
-
35
- contents.insert(index - 2, "\n" + cookbook.changeset + "\n\n")
36
-
37
- File.open(path, 'w') { |file| file.write(contents.join('')) }
38
- end
39
-
40
- def prompt_for_changeset
41
- tempfile = Tempfile.new(["#{cookbook.name}-changeset-#{Time.now}", '.md'])
42
- tempfile.write(default_changeset)
43
- tempfile.rewind
44
-
45
- # Shell out to the default editor
46
- system %Q|$EDITOR "#{tempfile.path}"|
47
-
48
- # Save the resulting changes back to the cookbook object
49
- cookbook.changeset = File.read(tempfile.path).strip
50
-
51
- # Cleanup
52
- tempfile.close
53
- tempfile.unlink
54
- end
55
-
56
- def default_changeset
57
- return @default_changeset if @default_changeset
58
-
59
- header = "v#{cookbook.version} (#{Time.now.to_date})"
60
-
61
- contents = []
62
- contents << header
63
- contents << '-'*header.length
64
- contents << cookbook.changeset || 'Enter CHANGELOG entries here'
65
- contents << ''
66
-
67
- @default_changeset = contents.join("\n")
68
- @default_changeset
69
- end
70
- end
71
- end
@@ -1,22 +0,0 @@
1
- module Stove
2
- class Action::Dev < Action::Base
3
- id 'dev'
4
- description 'Bump a minor version release for development purposes'
5
-
6
- def run
7
- log.info('Bumping for development release')
8
- log.debug("Version is currently #{cookbook.version}")
9
- log.debug("Bumped version is #{dev_version}")
10
-
11
- cookbook.bump(dev_version)
12
-
13
- log.debug("Version is now #{cookbook.version}")
14
- end
15
-
16
- def dev_version
17
- split = cookbook.version.split('.').map(&:to_i)
18
- split[2] += 1
19
- split.join('.')
20
- end
21
- end
22
- end
@@ -1,8 +0,0 @@
1
- module Stove
2
- class Action::Finish < Action::Base
3
- def run
4
- log.debug('Running cleanup hooks...')
5
- log.info('Done!')
6
- end
7
- end
8
- end
@@ -1,7 +0,0 @@
1
- module Stove
2
- class Action::Start < Action::Base
3
- def run
4
- log.info("Running Stove #{Stove::VERSION} on `#{cookbook.name}'")
5
- end
6
- end
7
- end
@@ -1,11 +0,0 @@
1
- module Stove
2
- class Action::Upload < Action::Base
3
- id 'upload'
4
- description 'Publish the release to enabled plugin destinations'
5
-
6
- def run
7
- log.debug('Running upload hooks...')
8
- log.info('Done!')
9
- end
10
- end
11
- end