releasetool 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/releasetool.rb +1 -1
- data/lib/tasks/release_thor.rb +2 -1
- data/release_notes/v0.5.3.md +5 -0
- data/spec/releasetool_spec.rb +13 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6b0bf2084778fb39bcc2e7e1997069473c7fc3d72db0fbd0357e775c6226f29
|
4
|
+
data.tar.gz: 50c233e3f1efa69f4b027bd214eeebbc4504854706e81b8b3e222e77699ac370
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b324b29b9b5ac6f141a0853a8e8887afa788329a9a15dd5dc0030c2d3abab4751f8d67f0fccf5029a2aee56a73aa20c1882ba38fe9cae0fed6d8e0f6399a2fd7
|
7
|
+
data.tar.gz: 8c6465c57837b267999cd74b71155b7feec58fb6f2508dc7d65a44bd12aeee7d646d723c7d400e068c1a93abee7c9ff1613ac5ee0b871062f7033dcfce713d39
|
data/lib/releasetool.rb
CHANGED
data/lib/tasks/release_thor.rb
CHANGED
@@ -5,6 +5,7 @@ require "releasetool"
|
|
5
5
|
require "releasetool/release"
|
6
6
|
require "releasetool/util"
|
7
7
|
require "releasetool/version"
|
8
|
+
require "shellwords"
|
8
9
|
|
9
10
|
class Release < Thor
|
10
11
|
include Releasetool::Util
|
@@ -93,7 +94,7 @@ class Release < Thor
|
|
93
94
|
def tag(version = nil)
|
94
95
|
version ||= stored_version
|
95
96
|
last_useful_commit = guarded_capture("git log head^^..head^ --pretty=format:%s").strip.split("\n").first.strip
|
96
|
-
guarded_system("git tag -a #{version} -e -m
|
97
|
+
guarded_system("git tag -a #{version} -e -m #{last_useful_commit.shellescape}")
|
97
98
|
end
|
98
99
|
|
99
100
|
desc "push (NEW_VERSION)", <<-END
|
data/spec/releasetool_spec.rb
CHANGED
@@ -223,6 +223,19 @@ RSpec.describe Release, quietly: true do
|
|
223
223
|
end
|
224
224
|
end
|
225
225
|
|
226
|
+
describe "tag" do
|
227
|
+
let(:last_message) { "some message" }
|
228
|
+
it "calls out" do
|
229
|
+
allow(subject).to receive(:guarded_capture).with("git log head^^..head^ --pretty=format:%s").and_return "some-message"
|
230
|
+
expect(subject).to receive(:guarded_system).with("git tag -a v1.2.3 -e -m some-message")
|
231
|
+
expect(subject.tag("v1.2.3"))
|
232
|
+
end
|
233
|
+
it "escapes" do
|
234
|
+
allow(subject).to receive(:guarded_capture).with("git log head^^..head^ --pretty=format:%s").and_return 'Something new in sandwiches "aha" (#123)'
|
235
|
+
expect(subject).to receive(:guarded_system).with('git tag -a v1.2.3 -e -m Something\ new\ in\ sandwiches\ \"aha\"\ \(\#123\)')
|
236
|
+
expect(subject.tag("v1.2.3"))
|
237
|
+
end
|
238
|
+
end
|
226
239
|
# describe 'CLI' do
|
227
240
|
# it "should work with source and no target" do
|
228
241
|
# puts "CLI"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: releasetool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Diggins
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -130,6 +130,7 @@ files:
|
|
130
130
|
- release_notes/v0.5.0.md
|
131
131
|
- release_notes/v0.5.1.md
|
132
132
|
- release_notes/v0.5.2.md
|
133
|
+
- release_notes/v0.5.3.md
|
133
134
|
- releasetool.gemspec
|
134
135
|
- spec/fixtures/empty_file.rb
|
135
136
|
- spec/fixtures/example_with_releases.tar
|
@@ -157,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
158
|
- !ruby/object:Gem::Version
|
158
159
|
version: '0'
|
159
160
|
requirements: []
|
160
|
-
rubygems_version: 3.
|
161
|
+
rubygems_version: 3.5.13
|
161
162
|
signing_key:
|
162
163
|
specification_version: 4
|
163
164
|
summary: Release management tools
|