release-gem 0.1.29 → 0.1.30

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
  SHA256:
3
- metadata.gz: 84f42d97fbc8fff6f263e782576d772d581b3b2ce2d3bed06e73a6b8c3ab328d
4
- data.tar.gz: 25ac79dd9038c5ac19975bd22fe651add1f8304464cab77370493374cb93601c
3
+ metadata.gz: b8cc16c62b759b319b58033ee7678d1767aa098f9190c50f38aeaa429694da3d
4
+ data.tar.gz: 76da97ad501ca7828a7c0b2bd84de02d50bd9d9933b2c1ea47830cb5f3a54b15
5
5
  SHA512:
6
- metadata.gz: 8c6b3f34b02a1f89275215a3f518966f67eaf03083fd0f83c67d8118551f2cc8af2a9520f258adb8d736d96c954f1d05bb23ad6dd81289641f6a3650fa08fabf
7
- data.tar.gz: 7c0895ab232d4f6f316f242c80de190ced0f00ae9400f5c44150963e39ae99021c8724341cbeea89e81ca1632aaaa998b715d13d0ed490a95df2abc491da4a84
6
+ metadata.gz: 8585884b1b10d700ed6f913a40776ba50b98f58905ba83611e9cef0dece134f2aba5c9c831e1515902f98a0b9f40b6104dbbcf35f5f472270702bc9c421177e1
7
+ data.tar.gz: 2a4ed2747d026f60da0e6e45c0f969d5baac20492659030cb78b6839074f74df4ca8e631c2772a72bdc3593246c1ad70b2c5dea3a8679a10aa8371e784c6c040
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- release-gem (0.1.29)
4
+ release-gem (0.1.30)
5
5
  colorize
6
6
  git_cli
7
7
  teLogger
@@ -14,10 +14,10 @@ GEM
14
14
  specs:
15
15
  colorize (1.1.0)
16
16
  diff-lcs (1.5.0)
17
- git_cli (0.13.2)
17
+ git_cli (0.13.6)
18
18
  ptools (~> 1.4.0)
19
- teLogger
20
- toolrack
19
+ teLogger (> 0.2)
20
+ toolrack (> 0.23)
21
21
  pastel (0.8.0)
22
22
  tty-color (~> 0.5)
23
23
  ptools (1.4.3)
@@ -42,6 +42,10 @@ module Release
42
42
  when :gemspec_updated
43
43
  v = args.first
44
44
  @pmt.say pmsg("\n Gemspec file of GEM '#{v[:name]}' updated with release-gem gem")
45
+
46
+ when :gemspec_already_has_gem
47
+ v = args.first
48
+ @pmt.say pmsg("\n Gemspec file of GEM '#{v[:name]}' already has release-gem gem included. Skipped")
45
49
 
46
50
  when :adding_to_rackfile
47
51
  v = args.first
@@ -111,18 +111,24 @@ module Release
111
111
  end
112
112
 
113
113
  cont = File.read(gs)
114
- lastEnd = cont.rindex("end")
115
114
 
116
- FileUtils.mv(gs, "#{gs}.bak")
117
- @backupFiles[gs] = "#{gs}.bak"
115
+ if (cont =~ /spec.add_development_dependency 'release-gem'/) == nil
116
+ lastEnd = cont.rindex("end")
118
117
 
119
- File.open(gs, "w") do |f|
120
- f.write cont[0...lastEnd]
121
- f.puts " spec.add_development_dependency 'release-gem'"
122
- f.puts "end"
123
- end
124
- block.call(:gemspec_updated, name: @name, gemspec: gs ) if block
118
+ FileUtils.mv(gs, "#{gs}.bak")
119
+ @backupFiles[gs] = "#{gs}.bak"
120
+
121
+ File.open(gs, "w") do |f|
122
+ f.write cont[0...lastEnd]
123
+ f.puts " spec.add_development_dependency 'release-gem'"
124
+ f.puts "end"
125
+ end
126
+ block.call(:gemspec_updated, name: @name, gemspec: gs ) if block
125
127
 
128
+ else
129
+ block.call(:gemspec_already_has_gem, name: @name, gemspec: gs) if block
130
+ end
131
+
126
132
  end # add_to_gemspec
127
133
 
128
134
  def activate_rakefile(&block)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Release
4
4
  module Gem
5
- VERSION = "0.1.29"
5
+ VERSION = "0.1.30"
6
6
  end
7
7
  end
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.29
4
+ version: 0.1.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-18 00:00:00.000000000 Z
11
+ date: 2023-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: toolrack
@@ -125,7 +125,7 @@ files:
125
125
  homepage: ''
126
126
  licenses: []
127
127
  metadata: {}
128
- post_install_message:
128
+ post_install_message:
129
129
  rdoc_options: []
130
130
  require_paths:
131
131
  - lib
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  version: '0'
142
142
  requirements: []
143
143
  rubygems_version: 3.4.6
144
- signing_key:
144
+ signing_key:
145
145
  specification_version: 4
146
146
  summary: ''
147
147
  test_files: []