maccman-phantomrb 1.0.3 → 1.0.4

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: ba4a645ba167ac0b13caa40be84515e2c75ebfdd
4
- data.tar.gz: 06c69261145d03fa12daa0b18b2fae53749cd1c9
3
+ metadata.gz: 7735d65d6804756aee9e270ee3c95617d0409016
4
+ data.tar.gz: 4f396b1b70c475e8659b027e27d2b826bb9ca7a8
5
5
  SHA512:
6
- metadata.gz: 324ebcc168f092e9ffc73a2643bbd2160d5bd1c3ce74dfce75953a5d666c6ec487ce69acf1c1331ecedf178a2c26bad9cff41c415c38762f13ef5063b08f2397
7
- data.tar.gz: 9abff919f292cbc93c3c6fa54bb7a537d8600deaf35d4f57aafe9789f90c9169e4723964bc2baea2bfbaa8927235963b26e3e227e01a006e95d6c5a026ed3ea5
6
+ metadata.gz: 394e6d08b9b247f913f3263c67ed7a6c0cf1752da4776841f64e104b4b51f4fe46a1bd534abce5bb4f9c4b22eb970f2d3441b5fa4d9c60df3163ff09622fe812
7
+ data.tar.gz: 9ce0b00e54876577313482339c39773cea2e99d2f43448c5dbe9e77e27ea22fd556f8d16c8caeb4536b62ca3ac15050b13ca35cf9390ec1d95d743ba5409b081
@@ -1,4 +1,5 @@
1
1
  require 'ostruct'
2
+ require 'shellwords'
2
3
 
3
4
  module Phantomrb
4
5
  class Runner
@@ -7,10 +8,17 @@ module Phantomrb
7
8
  end
8
9
 
9
10
  def run(script, *args, &block)
10
- options = args.last.is_a?(Hash) ? args.pop : {}
11
- command = @config.merge(options)
11
+ options = args.last.is_a?(Hash) ? args.pop : {}
12
+ command = @config.merge(options)
13
+ sargs = args.map {|a| Shellwords.escape(a) }
12
14
 
13
- command_line = "#{command} #{full_script_path(script)} #{args.join(' ')}"
15
+ command_line = [
16
+ command,
17
+ full_script_path(script),
18
+ *sargs
19
+ ].join(' ')
20
+
21
+ p command_line
14
22
 
15
23
  begin
16
24
  process = IO.popen(command_line)
@@ -1,3 +1,3 @@
1
1
  module Phantomrb
2
- VERSION = '1.0.3'
2
+ VERSION = '1.0.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maccman-phantomrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Gladkyi
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-15 00:00:00.000000000 Z
12
+ date: 2014-09-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler