stove 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/stove/cookbook.rb +24 -12
- data/lib/stove/error.rb +4 -0
- data/lib/stove/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb680ed6abba285ad793a197007f945ff29c3325
|
4
|
+
data.tar.gz: 3eb82731cdbdd0f27ad30f5cc1eb0afe05480a41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d9ca773a3064120898b78d89c96c195bdaee6a687261238d3f813dafba37507c704199e0d15ff146403ab4f750db8c33971c6e844987bfba16d0ca91e74e343
|
7
|
+
data.tar.gz: f410e99c3a7de4ed4684840fc42889b708d997c9d3cf7ea4649042c201fe13544ef475adf3488b2a137821ed767dad76c64ffc1794f63e944b3216473681d38c
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,18 @@ Stove CHANGELOG
|
|
2
2
|
===============
|
3
3
|
This is the Changelog for the Stove gem.
|
4
4
|
|
5
|
+
|
6
|
+
v1.1.0
|
7
|
+
------
|
8
|
+
- Check if the git remote is in sync with local branch before pushing
|
9
|
+
- Add support for bumping devodd releases
|
10
|
+
- Add a custom rake task
|
11
|
+
- Add ability to publish GitHub releases
|
12
|
+
- Fix CLI bug that didn't allow options to parse
|
13
|
+
- Add logging during release process
|
14
|
+
- Fix error where the community site does not give an adequate response
|
15
|
+
- Retry uploads 3 times in case the community site is being lame
|
16
|
+
|
5
17
|
v1.0.1
|
6
18
|
------
|
7
19
|
- Fix a bug where `--log-level` was being ignored
|
data/lib/stove/cookbook.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'fileutils'
|
2
2
|
require 'retryable'
|
3
|
+
require 'tempfile'
|
3
4
|
require 'time'
|
4
5
|
|
5
6
|
module Stove
|
@@ -249,24 +250,35 @@ module Stove
|
|
249
250
|
def update_changelog
|
250
251
|
changelog = File.join(path, 'CHANGELOG.md')
|
251
252
|
contents = File.readlines(changelog)
|
253
|
+
index = contents.find_index { |line| line =~ /(--)+/ }
|
252
254
|
|
253
|
-
index
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
tmpfile = File.join(dir, 'CHANGELOG.md')
|
258
|
-
File.open(tmpfile, 'w') { |f| f.write(contents.join('')) }
|
259
|
-
response = shellout("$EDITOR #{tmpfile}")
|
255
|
+
if index.nil?
|
256
|
+
raise Stove::InvalidChangelogError, "Your CHANGELOG does not exist" \
|
257
|
+
" or is not in a valid format!"
|
258
|
+
end
|
260
259
|
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
260
|
+
tmpfile = Tempfile.new(['changes', '.md'])
|
261
|
+
tmpfile.write(changeset)
|
262
|
+
tmpfile.rewind
|
263
|
+
response = shellout("$EDITOR #{tmpfile.path}")
|
265
264
|
|
266
|
-
|
265
|
+
unless response.success?
|
266
|
+
Stove::Logger.debug response.stdout
|
267
|
+
Stove::Logger.debug response.stderr
|
268
|
+
raise Stove::Error, response.stderr
|
267
269
|
end
|
270
|
+
|
271
|
+
@changeset = File.read(tmpfile.path).strip
|
272
|
+
|
273
|
+
contents.insert(index - 2, "\n" + @changeset + "\n\n")
|
274
|
+
File.open(changelog, 'w') { |f| f.write(contents.join('')) }
|
268
275
|
rescue SystemExit, Interrupt
|
269
276
|
raise Stove::UserCanceledError
|
277
|
+
ensure
|
278
|
+
if defined?(tmpfile)
|
279
|
+
tmpfile.close
|
280
|
+
tmpfile.unlink
|
281
|
+
end
|
270
282
|
end
|
271
283
|
|
272
284
|
# Bump the version in the metdata.rb to the specified
|
data/lib/stove/error.rb
CHANGED
data/lib/stove/version.rb
CHANGED
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: 1.1.
|
4
|
+
version: 1.1.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: 2013-10-
|
11
|
+
date: 2013-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|