hammer_cli 3.19.1 → 5.0.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: cbca24c23af00680caa13b39ae16d0847f275329f10d6a3b9a1d28c394b0fe3c
4
- data.tar.gz: cdffc9661309b9c0649ea029c9f53f7e38ed8a2b1e7680fe0b14a8dadc423ec4
3
+ metadata.gz: 27faa46ea907e19dfe6c29420a5d355909a84c59a817e4bcde0f197a17d5c368
4
+ data.tar.gz: 8f5982c563ce5b2b4d3028d882f85fb627d5d840246a9e35f172a3fbb1a2ff48
5
5
  SHA512:
6
- metadata.gz: 2ab64958771030d846ecfca6752be9f573940ac9356bce4a547d00462b94ba6a560bb44a9b4ef930ebc22f4d908538687e5ea7b42ddad57d0eb368d6644afd62
7
- data.tar.gz: 6314f12c4921b3b5b07b6c91fb440d6f29e7bf0cd87d7ea79dce2f59f8ef1820b4ed9410afe2e9d64b8a6bbfdf979e1b8891a1320f303eafb9a2e407ddf5c053
6
+ metadata.gz: ad512c4ee9d15c567efde990f5c904f084c577239a1eb4b74c2440ef6000bc87982f1df6fe423a554137114e60078224faa157768cb794e5a6901f0e41de491c
7
+ data.tar.gz: c92b48e9eecc4b3ece82e782720766535c48d671b194d12e8e46be6f03df89fb58a2d20a79ada4a7b1519f77938f9b3596cc88ca833ae1c7286a351d0896ecf0
data/doc/release_notes.md CHANGED
@@ -1,5 +1,10 @@
1
1
  Release notes
2
2
  =============
3
+ ### 5.0.0 (2026-08-11)
4
+ * Fix release tag pattern and drop redundant manual gem push
5
+ * Bump to 5.0.0-develop
6
+ * Bump to 3.20.0-develop
7
+
3
8
  ### 3.19.0 (2026-05-11)
4
9
  * Bump to 3.19.0-develop
5
10
 
@@ -1,5 +1,4 @@
1
1
  require 'highline'
2
- require 'shellwords'
3
2
  require 'tempfile'
4
3
 
5
4
  class String
@@ -92,8 +91,7 @@ module HammerCLI
92
91
  Tempfile.open([content_type, suffix], tempdir) do |f|
93
92
  f.write(content)
94
93
  f.rewind
95
- editor = Shellwords.split(ENV['EDITOR'] || 'vi')
96
- system(*editor, f.path)
94
+ system("#{ENV['EDITOR'] || 'vi'} #{f.path}")
97
95
  result = f.read
98
96
  end
99
97
  result
@@ -1,5 +1,5 @@
1
1
  module HammerCLI
2
2
  def self.version
3
- @version ||= Gem::Version.new "3.19.1"
3
+ @version ||= Gem::Version.new "5.0.0"
4
4
  end
5
5
  end
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/man/hammer.1.gz CHANGED
Binary file
@@ -195,39 +195,4 @@ describe HammerCLI do
195
195
  assert_equal(arr, [:a, 1, 2, 3, :b, :c])
196
196
  end
197
197
  end
198
-
199
- describe 'open_in_editor' do
200
- it 'uses array-based system call to prevent shell injection' do
201
- ENV.stubs(:[]).with('EDITOR').returns('vi')
202
- HammerCLI.expects(:system).with('vi', anything).once.returns(true)
203
- HammerCLI.open_in_editor('test content')
204
- end
205
-
206
- it 'splits EDITOR with arguments into array form' do
207
- ENV.stubs(:[]).with('EDITOR').returns('code --wait')
208
- HammerCLI.expects(:system).with('code', '--wait', anything).once.returns(true)
209
- HammerCLI.open_in_editor('test content')
210
- end
211
-
212
- it 'falls back to vi when EDITOR is not set' do
213
- ENV.stubs(:[]).with('EDITOR').returns(nil)
214
- HammerCLI.expects(:system).with('vi', anything).once.returns(true)
215
- HammerCLI.open_in_editor('test content')
216
- end
217
-
218
- it 'does not pass shell metacharacters to a shell interpreter' do
219
- ENV.stubs(:[]).with('EDITOR').returns('vi; echo INJECTED')
220
- # Shellwords.split treats the semicolon as a literal character,
221
- # producing ["vi;", "echo", "INJECTED"] - no shell is invoked
222
- HammerCLI.expects(:system).with('vi;', 'echo', 'INJECTED', anything).once.returns(true)
223
- HammerCLI.open_in_editor('test content')
224
- end
225
-
226
- it 'returns original content when editor does not modify the file' do
227
- ENV.stubs(:[]).with('EDITOR').returns('true')
228
- HammerCLI.stubs(:system).returns(true)
229
- result = HammerCLI.open_in_editor('original content')
230
- assert_equal 'original content', result
231
- end
232
- end
233
198
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hammer_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.19.1
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Bačovský
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2026-10-02 00:00:00.000000000 Z
12
+ date: 2026-08-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: amazing_print