milkode 1.8.4 → 1.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/milkode/grep/cli_grep.rb +6 -4
- data/lib/milkode/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58347ce499775708f8253eb892679c2cfb24611c
|
4
|
+
data.tar.gz: 144e65c2e7112c589b9189a5cecfbf15f4784b0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cee898aab23abc3e0a2e03249cf7ba6af2aadaf80cf82e82fdc36e9fa947af9ad4d5aec94c6e1a312b78fedec8f2b0f0c6f491cc277975703dbf2e21baee25d
|
7
|
+
data.tar.gz: b6b047465b58d0266165aded570bd4adc512b579bffc5e043eec4b5c98cf51c2bf48c5609a3cdb5adf2de9c0bbf93a127b879e35f57d5dfcc5a0fd89bb3c17e7
|
@@ -8,6 +8,8 @@ require 'milkode/common/util'
|
|
8
8
|
require 'milkode/grep/findgrep_option'
|
9
9
|
require 'optparse'
|
10
10
|
require 'tempfile'
|
11
|
+
require 'open3'
|
12
|
+
require 'shellwords'
|
11
13
|
|
12
14
|
module Milkode
|
13
15
|
class CLI_Grep
|
@@ -250,15 +252,15 @@ EOF
|
|
250
252
|
tmpfile.write(files.join("\n"))
|
251
253
|
tmpfile.close
|
252
254
|
tmpfile.open
|
253
|
-
cmd << "cat
|
255
|
+
cmd << ["cat", tmpfile.path]
|
254
256
|
|
255
|
-
cmd << "xargs
|
257
|
+
cmd << ["xargs", Shellwords.split(first_command), arguments[0]].flatten
|
256
258
|
|
257
259
|
(1...arguments.size).each do |index|
|
258
|
-
cmd <<
|
260
|
+
cmd << [Shellwords.split(second_command), arguments[index]].flatten
|
259
261
|
end
|
260
262
|
|
261
|
-
|
263
|
+
Open3.pipeline(*cmd)
|
262
264
|
|
263
265
|
tmpfile.close(true)
|
264
266
|
end
|
data/lib/milkode/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: milkode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ongaeshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|