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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 787f43e019da02fd56f06a8ee79aa42321aae4ff
4
- data.tar.gz: 6e880268a11e41e4fff138705b8e8194b41221d5
3
+ metadata.gz: 58347ce499775708f8253eb892679c2cfb24611c
4
+ data.tar.gz: 144e65c2e7112c589b9189a5cecfbf15f4784b0c
5
5
  SHA512:
6
- metadata.gz: 5d3b6303bfa2ad4d11ca1bb14d736f2cba88ff0cd99dc5470b0a472dd0a4166b9f71d332b04dae41c9b4e065771390d60f9a20efd0bf9284fe7e982046d121ee
7
- data.tar.gz: 31a40dfef8ce92f6c3d6c9aaeb30bb6ab749015101abb1b141d4561d92509d49a583de87f29eba798191bd9b0bab74bf8f1d3eb583ef755b32351b373e148973
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 #{tmpfile.path}"
255
+ cmd << ["cat", tmpfile.path]
254
256
 
255
- cmd << "xargs #{first_command} #{arguments[0]}"
257
+ cmd << ["xargs", Shellwords.split(first_command), arguments[0]].flatten
256
258
 
257
259
  (1...arguments.size).each do |index|
258
- cmd << "#{second_command} #{arguments[index]}"
260
+ cmd << [Shellwords.split(second_command), arguments[index]].flatten
259
261
  end
260
262
 
261
- system(cmd.join(" | "))
263
+ Open3.pipeline(*cmd)
262
264
 
263
265
  tmpfile.close(true)
264
266
  end
@@ -1,3 +1,3 @@
1
1
  module Milkode
2
- VERSION = "1.8.4"
2
+ VERSION = "1.8.5"
3
3
  end
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
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-13 00:00:00.000000000 Z
11
+ date: 2014-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler