release-gem 0.1.19 → 0.1.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -3
- data/README.md +1 -3
- data/lib/release/gem/gem_action.rb +35 -3
- data/lib/release/gem/gem_cli_action.rb +23 -1
- data/lib/release/gem/version.rb +1 -1
- data/templates/standard_cli_flow.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e99a850660fbeceb687202dde98b387761d0d686654c8f8626edfc874d86612
|
4
|
+
data.tar.gz: '09f7162e2573e3db54862fa56cc4710e17534f488468c5b0871cc2f9d8536128'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26407d95ef36b6cdd0789668cdc8ea6af6f6423d6bc4bc43a51938428b41a60fa1449e7a54d8f3a6b9fb7c97c941cc584ac10fcbde1488837097cf816f1d14a1
|
7
|
+
data.tar.gz: c18e9471f316b30e67e99f76ca934e3605ddb815322baca311a87c0c4ec2874a4abf13e0d61eab535f8313c34d1b194f1a954b987bbf224a315261961fdf858d
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
release-gem (0.1.
|
4
|
+
release-gem (0.1.20)
|
5
5
|
colorize
|
6
6
|
git_cli
|
7
7
|
gvcs
|
@@ -15,8 +15,7 @@ GEM
|
|
15
15
|
specs:
|
16
16
|
colorize (0.8.1)
|
17
17
|
diff-lcs (1.5.0)
|
18
|
-
git_cli (0.
|
19
|
-
gvcs
|
18
|
+
git_cli (0.12.0)
|
20
19
|
ptools (~> 1.4.0)
|
21
20
|
teLogger
|
22
21
|
toolrack
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# Release::Gem
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/release/gem`. To experiment with that code, run `bin/console` for an interactive prompt.
|
3
|
+
Release-gem is the release assistance toolkit for Rubygems.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -219,10 +219,42 @@ module Release
|
|
219
219
|
end
|
220
220
|
|
221
221
|
cp "Given gem version '#{gemVer}' to install"
|
222
|
-
|
223
|
-
|
224
|
-
|
222
|
+
target = Dir.glob(File.join(Dir.getwd,"**/*.gem")).select { |sf|
|
223
|
+
sf =~ /\w*-#{gemVer}\w*/
|
224
|
+
}.first
|
225
|
+
|
226
|
+
if not_empty?(target)
|
227
|
+
|
228
|
+
if target.length > 1
|
229
|
+
if block
|
230
|
+
st = {}
|
231
|
+
target.each do |t|
|
232
|
+
st[Pathname.new(t).relative_path_from(@root)] = t
|
233
|
+
end
|
234
|
+
selGemFile = block.call(:multiple_target_gems_found, st)
|
235
|
+
#res = TTY::Command.new.run!("gem install pkg/#{gemspec.name}-#{gemVer}.gem") do |out, err|
|
236
|
+
res = TTY::Command.new.run!("gem install #{selGemFile}") do |out, err|
|
237
|
+
cp out if not_empty?(out)
|
238
|
+
ce err if not_empty?(err)
|
239
|
+
end
|
240
|
+
block.call(:gem_file_installed, Pathname.new(selGemFile).relative_path_from(@root))
|
241
|
+
else
|
242
|
+
raise GemActionError, "Multiple target gem found. Please provide a block for gem selection"
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
else
|
247
|
+
if block
|
248
|
+
block.call(:target_gem_not_found, gemVer)
|
249
|
+
else
|
250
|
+
raise GemActionError, "Target gem carry the version '#{gemVer}' not found"
|
251
|
+
end
|
225
252
|
end
|
253
|
+
|
254
|
+
#res = TTY::Command.new.run!("gem install pkg/#{gemspec.name}-#{gemVer}.gem") do |out, err|
|
255
|
+
# cp out if not_empty?(out)
|
256
|
+
# ce err if not_empty?(err)
|
257
|
+
#end
|
226
258
|
|
227
259
|
end # install
|
228
260
|
|
@@ -240,7 +240,29 @@ module Release
|
|
240
240
|
|
241
241
|
sysInst = @pmt.yes?(pmsg("\n Install release into system? "))
|
242
242
|
if sysInst
|
243
|
-
@inst.install(*args)
|
243
|
+
@inst.install(*args) do |ops, *args|
|
244
|
+
case ops
|
245
|
+
when :multiple_target_gems_found
|
246
|
+
files = args.first
|
247
|
+
res = @pmt.select("\n It seems there are more than 1 gem files with the same version name : ".yellow) do |m|
|
248
|
+
files.each do |k,v|
|
249
|
+
m.choice k,v
|
250
|
+
end
|
251
|
+
m.choice "Abort", :abort
|
252
|
+
end
|
253
|
+
|
254
|
+
raise Gem::Release::Abort, "Abort by user" if res == :abort
|
255
|
+
|
256
|
+
res
|
257
|
+
|
258
|
+
when :gem_file_installed
|
259
|
+
@pmt.puts "\n Gem file #{args.first} installed successfully ".green
|
260
|
+
|
261
|
+
when :target_gem_not_found
|
262
|
+
@pmt.puts "\n There is no gem file fould that has the version '#{args.first}' in its name. Please try again\n".red
|
263
|
+
|
264
|
+
end
|
265
|
+
end
|
244
266
|
end
|
245
267
|
|
246
268
|
end # install
|
data/lib/release/gem/version.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
require 'release/gem'
|
4
4
|
|
5
5
|
puts "\n Standard GEM CLI release flow version #{Release::Gem::VERSION}".yellow
|
6
|
-
puts "
|
6
|
+
puts " Current location : #{Dir.getwd}\n".yellow
|
7
7
|
|
8
8
|
Release::Gem.engine(:gem, root: Dir.getwd) do
|
9
9
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: release-gem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: toolrack
|