gem-release 0.7.0 → 0.7.1

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: 700504ce4d984b97cf06d4a76ac451ffb51327d9
4
- data.tar.gz: f900d484aaa5452a0f52d6a98b29b9968b6c8f00
3
+ metadata.gz: 7d9466f0a6360107630002e0eec22301f05e7b66
4
+ data.tar.gz: eef4cc82d90ee716db8f6067b7bb38b9d276fedc
5
5
  SHA512:
6
- metadata.gz: ba249b0339d5dc41df91ef3a6f1733213ab70762653dd7a743117eb7af6c049b45e0313bae5dfd0a3686a4ca6921eff66f26428fdadc3438f13c61631c176eec
7
- data.tar.gz: b780abe7c07dbd226e8be304a7e266b3c9b79060649dbccec3a917479e516adcefb229faca384e7cd408f033b77b1dc4932c39526d572450afb3cd284058ef75
6
+ metadata.gz: 74213f2756bbb185d537894b6a06f1a278808432108d595a447823e461f4b7d064f3545ddc4fe255d9c69c51daccc2e1b506f9d9259d811f914edd9061cb575a
7
+ data.tar.gz: 67dcbf4cd8a86d4a388191d38cddc0dfb90927a4cf2e2fd9557727ae367ce3aa8d5bb5331f4d1f73bb3e1f1806908d5bec5f897f201dbdbaa3d7d5fe3a624328
@@ -35,7 +35,7 @@ module GemRelease
35
35
  end
36
36
 
37
37
  def gem_version
38
- options[:version_number] || gemspec.version.to_s
38
+ gemspec.version.to_s
39
39
  end
40
40
 
41
41
  def gemspec
@@ -70,7 +70,21 @@ module GemRelease
70
70
  end
71
71
  end
72
72
 
73
+ def reset_gemspec_cache
74
+ # Gemspecs are cached in rubygems >= 2.1, so we need to clear the cache
75
+ # in case gem versions have changed.
76
+ #
77
+ # Note: This is not needed or supported with older rubygems, which is
78
+ # why exceptions are swallowed.
79
+ begin
80
+ Gem::Specification.reset
81
+ rescue
82
+ end
83
+ end
84
+
73
85
  def run_cmd(command)
86
+ reset_gemspec_cache
87
+
74
88
  unless send(command)
75
89
  say "The task `#{command}` could not be completed. Subsequent tasks will not be attempted."
76
90
  abort
@@ -1,3 +1,3 @@
1
1
  module GemRelease
2
- VERSION = '0.7.0'
2
+ VERSION = '0.7.1'
3
3
  end
@@ -89,7 +89,6 @@ class Gem::Commands::BumpCommand < Gem::Command
89
89
  end
90
90
  cmd.options[:quiet] = options[:quiet]
91
91
  cmd.options[:quiet_success] = true
92
- cmd.options[:version_number] = @new_version_number
93
92
  cmd.execute
94
93
  true
95
94
  end
@@ -99,7 +98,6 @@ class Gem::Commands::BumpCommand < Gem::Command
99
98
  cmd.options[:quiet] = options[:quiet]
100
99
  cmd.options[:quiet_success] = true
101
100
  cmd.options[:push_tags_only] = true
102
- cmd.options[:version_number] = @new_version_number
103
101
  cmd.execute
104
102
  true
105
103
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-release
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Fuchs