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 +4 -4
- data/lib/phantomrb/runner.rb +11 -3
- data/lib/phantomrb/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: 7735d65d6804756aee9e270ee3c95617d0409016
|
4
|
+
data.tar.gz: 4f396b1b70c475e8659b027e27d2b826bb9ca7a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 394e6d08b9b247f913f3263c67ed7a6c0cf1752da4776841f64e104b4b51f4fe46a1bd534abce5bb4f9c4b22eb970f2d3441b5fa4d9c60df3163ff09622fe812
|
7
|
+
data.tar.gz: 9ce0b00e54876577313482339c39773cea2e99d2f43448c5dbe9e77e27ea22fd556f8d16c8caeb4536b62ca3ac15050b13ca35cf9390ec1d95d743ba5409b081
|
data/lib/phantomrb/runner.rb
CHANGED
@@ -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
|
11
|
-
command
|
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 =
|
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)
|
data/lib/phantomrb/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2014-09-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|