release-gem 0.1.19 → 0.1.21
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 +4 -4
- data/Gemfile.lock +2 -3
- data/README.md +1 -3
- data/lib/release/gem/gem_action.rb +38 -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: d92b9dff4d2193d6bb7c00e810b43c6f38dc9b2135d60ec7c98ca9039fd64405
|
4
|
+
data.tar.gz: '0269c51a4989f97e43e489708025ade1d0f80946673456ff251c2ac664c5d759'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddadf324f2ef3f45558151f35c2f39f5baf4b7bbfb115ff116abdcb0048e66fa084c236a0305285a20cd22ab272d53f319bb28e4d0f5e0a43b6b9503bf1f0684
|
7
|
+
data.tar.gz: 849ac02c3469381d86ac8d8f8abc1c512e5764bb6808ba73d3ce54c715600930f3e983a456a83265b48813d42c596ea44c2dcd335e16379a7c6e850cca8bceb3
|
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.21)
|
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,45 @@ 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
|
+
else
|
236
|
+
raise GemActionError, "Multiple target gem found. Please provide a block for gem selection"
|
237
|
+
end
|
238
|
+
else
|
239
|
+
selGemFile = target.first
|
240
|
+
end
|
241
|
+
|
242
|
+
#res = TTY::Command.new.run!("gem install pkg/#{gemspec.name}-#{gemVer}.gem") do |out, err|
|
243
|
+
res = TTY::Command.new.run!("gem install #{selGemFile}") do |out, err|
|
244
|
+
cp out if not_empty?(out)
|
245
|
+
ce err if not_empty?(err)
|
246
|
+
end
|
247
|
+
block.call(:gem_file_installed, Pathname.new(selGemFile).relative_path_from(@root))
|
248
|
+
|
249
|
+
else
|
250
|
+
if block
|
251
|
+
block.call(:target_gem_not_found, gemVer)
|
252
|
+
else
|
253
|
+
raise GemActionError, "Target gem carry the version '#{gemVer}' not found"
|
254
|
+
end
|
225
255
|
end
|
256
|
+
|
257
|
+
#res = TTY::Command.new.run!("gem install pkg/#{gemspec.name}-#{gemVer}.gem") do |out, err|
|
258
|
+
# cp out if not_empty?(out)
|
259
|
+
# ce err if not_empty?(err)
|
260
|
+
#end
|
226
261
|
|
227
262
|
end # install
|
228
263
|
|
@@ -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.21
|
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
|