runger_release_assistant 0.11.0 → 0.12.0

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: 64a1650c650f99a77f5b9c36b0656420ec0943a31ce803b6501a83ed3018ed13
4
- data.tar.gz: 32780af66bf5a617d190f01044f9e73440b42e5c653ff1e9d9daea94b5c626b2
3
+ metadata.gz: 1a867825a53270a27fb95f855c131713fba626a52806b533be6ccca145e5b3ab
4
+ data.tar.gz: 29c146f08cad1bfe765f1110c832a56998629a8f657d34c21f7b82c594d7a17a
5
5
  SHA512:
6
- metadata.gz: a59b28167492a89d8d2f42fb89a7a41bbf6b509c41610189a0cfc997814cef46437d3d18723544ab850571be627dd3dc9a7ae98f322e54b44fcd2b253b97b4d6
7
- data.tar.gz: 41c32e223762cdfa3caa319d75dec549843b6a19bf7b8dcaa9e8a901b63e0497bfc0d1b76b0a9e5c5144f5e4b353399aaf613b24d91f1a535e34d71b1c1147a1
6
+ metadata.gz: 97bf886cdc4c42fdb09374205580f6b18a8ab332d0c7463e2847ec4a78440867881690b0cfff192f01edb97bdb95cd0256df7d86da764d3be72a8ec4715a3dd3
7
+ data.tar.gz: 91187271f5c949ba680a42cae88dc4f7dd4c049bfb1117d4ba99d89b577b4a5d233957570975485e8e7dbee8a2ce6832e92d0be00b3652967992d0cc836b0344
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## v0.12.0 (2024-07-28)
2
+ - Execute `safe` command outside of Gemfile context
3
+
1
4
  ## v0.11.0 (2024-07-23)
2
5
  - Run 'safe' command (if one exists) after releasing
3
6
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- runger_release_assistant (0.11.0)
4
+ runger_release_assistant (0.12.0)
5
5
  activesupport (>= 6, < 8)
6
6
  memo_wise (>= 1.7, < 2)
7
7
  rainbow (>= 3.0, < 4)
@@ -86,7 +86,7 @@ GEM
86
86
  rubocop-rspec (3.0.3)
87
87
  rubocop (~> 1.61)
88
88
  ruby-progressbar (1.13.0)
89
- runger_style (2.12.0)
89
+ runger_style (2.13.0)
90
90
  prism (>= 0.24.0)
91
91
  rubocop (>= 1.38.0, < 2)
92
92
  slop (4.10.1)
@@ -2,6 +2,6 @@
2
2
 
3
3
  # rubocop:disable Style/StaticClass
4
4
  class RungerReleaseAssistant
5
- VERSION = '0.11.0'
5
+ VERSION = '0.12.0'
6
6
  end
7
7
  # rubocop:enable Style/StaticClass
@@ -223,7 +223,7 @@ class RungerReleaseAssistant
223
223
 
224
224
  def run_safe_command
225
225
  if system('which safe')
226
- execute_command('safe')
226
+ execute_command('safe', clear_bundler_context: true)
227
227
  end
228
228
  end
229
229
 
@@ -235,13 +235,29 @@ class RungerReleaseAssistant
235
235
  `#{command}`.rstrip
236
236
  end
237
237
 
238
- def execute_command(command, raise_error: true, show_system_output: false)
238
+ def execute_command(
239
+ command,
240
+ raise_error: true,
241
+ show_system_output: false,
242
+ clear_bundler_context: false
243
+ )
239
244
  logger.debug("Running system command `#{command}`")
240
- if @options[:show_system_output] || show_system_output
241
- system(command, exception: raise_error)
242
- else
243
- system(command, exception: raise_error, out: File::NULL, err: File::NULL)
244
- end
245
+
246
+ env =
247
+ if clear_bundler_context
248
+ ENV.keys.grep(/\A(BUNDLE|RUBY)/).to_h { [_1, nil] }
249
+ else
250
+ {}
251
+ end
252
+
253
+ kwargs =
254
+ if @options[:show_system_output] || show_system_output
255
+ {}
256
+ else
257
+ { out: File::NULL, err: File::NULL }
258
+ end
259
+
260
+ system(env, command, exception: raise_error, **kwargs)
245
261
  end
246
262
 
247
263
  def restore_and_abort(exit_code:)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runger_release_assistant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Runger
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-23 00:00:00.000000000 Z
11
+ date: 2024-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
145
  requirements: []
146
- rubygems_version: 3.5.15
146
+ rubygems_version: 3.5.16
147
147
  signing_key:
148
148
  specification_version: 4
149
149
  summary: A gem / CLI tool to automate the release process of other gems