stove 1.1.0 → 1.1.2

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
  SHA1:
3
- metadata.gz: e6543792d8f0805391fd56ad612836f4413ebdd0
4
- data.tar.gz: b67ea0a0cd771ef510e11bc2cbe2ea46e6caacdb
3
+ metadata.gz: fb680ed6abba285ad793a197007f945ff29c3325
4
+ data.tar.gz: 3eb82731cdbdd0f27ad30f5cc1eb0afe05480a41
5
5
  SHA512:
6
- metadata.gz: abfe99a45ed6757bff3e795689ab838cb1672d8c55013219d78ba890804e6aae0456d1c79891d41430dbc60d95614e235431b23e7872761d4bc4e8c42149852b
7
- data.tar.gz: 789afa789f2f99fd3573b6206374df791347223c556301e6fba5f60157724ea13612b09faea91ac4674cdb58f803335434d082cd761a7e98af88299bd71e5dca
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
@@ -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 = contents.find_index { |line| line =~ /(--)+/ } - 2
254
- contents.insert(index, "\n" + changeset)
255
-
256
- Dir.mktmpdir do |dir|
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
- unless response.success?
262
- Stove::Logger.debug response.stderr
263
- raise Stove::Error, response.stderr
264
- end
260
+ tmpfile = Tempfile.new(['changes', '.md'])
261
+ tmpfile.write(changeset)
262
+ tmpfile.rewind
263
+ response = shellout("$EDITOR #{tmpfile.path}")
265
264
 
266
- FileUtils.mv(tmpfile, File.join(path, 'CHANGELOG.md'))
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
@@ -111,4 +111,8 @@ module Stove
111
111
  class AbstractFunction < Error
112
112
  set_exit_code 160
113
113
  end
114
+
115
+ class InvalidChangelogFormat < Error
116
+ set_exit_code 170
117
+ end
114
118
  end
data/lib/stove/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Stove
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.2'
3
3
  end
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.0
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-01 00:00:00.000000000 Z
11
+ date: 2013-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty