gem-release 2.0.2 → 2.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f4cb6bbd05b81d7fe48d8b68ae917e31e77f8516992c04f43e28895b0d0f85fe
4
- data.tar.gz: df3dad2633a3d8eb13b4df343883b9c22e996b567d735f51baa0c7742960998e
3
+ metadata.gz: '0593ca80b14173c835988c30981e6895fe97875f195a27628017cdeb7080e58b'
4
+ data.tar.gz: 12ba75b8b8aa43dce56a9d86308cee50dcbaf19f9391f8cf09e786097b384919
5
5
  SHA512:
6
- metadata.gz: a287a028d04969631577eb055b389ec731bbf73bd711211485c0bcfba8991bbf4067b887fca8a94c9ecfe267f3140988c91b21e51eebe6d0400f0a05a2796d0d
7
- data.tar.gz: '093f1658507e1c88aae8d163fc1c167272c32c09ef7fdb739cfe0ee3384d35ea88406927ce48ee235184dd265bd4f4cf55f76df325ee71a2edf491ab0f43d953'
6
+ metadata.gz: d1c6b398458c3fbedf4f868d952985b3635221ae3ccf57b6cebf1488e158b26d167c136d217e1c0850ab28e56668fd3d9fefa55c7cd915b090a70965b31b553c
7
+ data.tar.gz: c8b0984e4a39a662a3f08a11b6699a2041236e82d6505529373d6173f8eb5c6b7ea7577a0a116906eeed2b9b6a033b719129ec83a76a4878ce55a3b7426a22bc
@@ -1,6 +1,15 @@
1
1
  # Changelog
2
2
 
3
- ## v2.0.2 - 2019-06-17
3
+ ## v2.0.3 - 2019-07-04
4
+
5
+ ### Fixed
6
+
7
+ - Fix `gem-release` Heredoc for Ruby 2.2
8
+ (PR: https://github.com/svenfuchs/gem-release/pull/82)
9
+ - Partially Fix "gem bump tags the wrong version"
10
+ (PR: https://github.com/svenfuchs/gem-release/pull/83)
11
+
12
+ ## v2.0.2 - 2019-06-27
4
13
 
5
14
  ### Fixed
6
15
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gem-release (2.0.1)
4
+ gem-release (2.0.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -37,7 +37,7 @@ GEM
37
37
  rspec-core (~> 3.8.0)
38
38
  rspec-expectations (~> 3.8.0)
39
39
  rspec-mocks (~> 3.8.0)
40
- rspec-core (3.8.1)
40
+ rspec-core (3.8.2)
41
41
  rspec-support (~> 3.8.0)
42
42
  rspec-expectations (3.8.4)
43
43
  diff-lcs (>= 1.2.0, < 2.0)
@@ -8,7 +8,7 @@ module Gem
8
8
  class Bootstrap < Base
9
9
  summary 'Scaffolds a new gem from template files.'
10
10
 
11
- description <<~str
11
+ description <<-str.split("\n").map(&:lstrip).join("\n")
12
12
  #{summary} Optionally initialize a git repository, set a git remote, and push
13
13
  to the remote repository.
14
14
 
@@ -7,7 +7,7 @@ module Gem
7
7
  class Bump < Base
8
8
  summary 'Bumps one, several, or all gems in this directory.'
9
9
 
10
- description <<~str
10
+ description <<-str.split("\n").map(&:lstrip).join("\n")
11
11
  Bumps the version number defined in lib/[gem_name]/version.rb to to a given,
12
12
  specific version number, or to the next major, minor, patch, or pre-release
13
13
  level.
@@ -136,16 +136,18 @@ module Gem
136
136
  }.freeze
137
137
 
138
138
  def run
139
+ new_version = nil
139
140
  in_gem_dirs do
140
141
  validate
141
142
  checkout if opts[:branch]
142
143
  bump
144
+ new_version = version.to
143
145
  commit if opts[:commit]
144
146
  push if opts[:commit] && opts[:push]
145
147
  reset
146
148
  end
147
- tag if opts[:tag]
148
- release if opts[:release]
149
+ tag(new_version) if opts[:tag]
150
+ release(new_version) if opts[:release]
149
151
  end
150
152
 
151
153
  private
@@ -176,12 +178,12 @@ module Gem
176
178
  cmd :git_push, remote
177
179
  end
178
180
 
179
- def tag
180
- Tag.new(context, args, opts).run
181
+ def tag(new_version)
182
+ Tag.new(context, args, opts.merge(version: new_version)).run
181
183
  end
182
184
 
183
- def release
184
- Release.new(context, args, except(opts, :tag)).run
185
+ def release(new_version)
186
+ Release.new(context, args, except(opts, :tag).merge(version: new_version)).run
185
187
  end
186
188
 
187
189
  def branch
@@ -8,7 +8,7 @@ module Gem
8
8
  class Gemspec < Base
9
9
  summary 'Generates a gemspec.'
10
10
 
11
- description <<~str
11
+ description <<-str.split("\n").map(&:lstrip).join("\n")
12
12
  #{summary}
13
13
 
14
14
  If no argument is given the current directory name is used as the gem name. If
@@ -8,7 +8,7 @@ module Gem
8
8
  class Release < Base
9
9
  summary 'Releases one or all gems in this directory.'
10
10
 
11
- description <<~str
11
+ description <<-str.split("\n").map(&:lstrip).join("\n")
12
12
  Builds one or many gems from the given gemspec(s), pushes them to rubygems.org
13
13
  (or another, compatible host), and removes the left over gem file.
14
14
 
@@ -83,7 +83,7 @@ module Gem
83
83
  end
84
84
 
85
85
  def release
86
- announce :release, gem.name, gem.version
86
+ announce :release, gem.name, target_version
87
87
  build
88
88
  push
89
89
  ensure
@@ -111,6 +111,10 @@ module Gem
111
111
  def cleanup
112
112
  cmd :cleanup, gem.filename
113
113
  end
114
+
115
+ def target_version
116
+ opts[:version] || gem.version
117
+ end
114
118
  end
115
119
  end
116
120
  end
@@ -6,7 +6,7 @@ module Gem
6
6
  class Tag < Base
7
7
  summary "Tags the HEAD commit with the gem's current version."
8
8
 
9
- description <<~str
9
+ description <<-str.split("\n").map(&:lstrip).join("\n")
10
10
  Creates an annotated tag for the current HEAD commit, using the gem's
11
11
  current version.
12
12
 
@@ -63,7 +63,7 @@ module Gem
63
63
 
64
64
  def run
65
65
  in_gem_dirs do
66
- announce :tag, gem.name, gem.version
66
+ announce :tag, gem.name, target_version
67
67
  validate
68
68
  tag_and_push
69
69
  end
@@ -95,7 +95,7 @@ module Gem
95
95
  end
96
96
 
97
97
  def tag_name
98
- "v#{gem.version}"
98
+ "v#{target_version}"
99
99
  end
100
100
 
101
101
  def push?
@@ -105,6 +105,10 @@ module Gem
105
105
  def remote
106
106
  opts[:remote]
107
107
  end
108
+
109
+ def target_version
110
+ opts[:version] || gem.version
111
+ end
108
112
  end
109
113
  end
110
114
  end
@@ -1,5 +1,5 @@
1
1
  module Gem
2
2
  module Release
3
- VERSION = '2.0.2'
3
+ VERSION = '2.0.3'
4
4
  end
5
5
  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: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Fuchs
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-06-27 00:00:00.000000000 Z
12
+ date: 2019-07-04 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Release your ruby gems with ease. (What a bold statement for such a tiny
15
15
  plugin ...)