phantomjs.rb 0.0.3 → 0.0.4
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.
- data/.travis.yml +8 -0
- data/CHANGELOG +5 -1
- data/README.md +2 -0
- data/Rakefile +8 -0
- data/lib/phantomjs.rb +4 -1
- data/lib/phantomjs/version.rb +1 -1
- data/phantomjs.rb.gemspec +3 -0
- data/spec/phantomjs_spec.rb +1 -3
- metadata +36 -3
data/.travis.yml
ADDED
data/CHANGELOG
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
+
2012.06.06, Version 0.0.4
|
2
|
+
|
3
|
+
* Added specs to travis-ci.
|
4
|
+
|
1
5
|
2012.05.22, Version 0.0.3
|
2
6
|
|
3
|
-
* Decoupled binaries from the main gem into separate gems. (Maxwell Salzberg)
|
7
|
+
* Decoupled binaries from the main gem into separate gems. (#2) (Maxwell Salzberg)
|
4
8
|
|
5
9
|
0.0.2
|
6
10
|
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# phantomjs.rb
|
2
2
|
|
3
|
+
[](http://travis-ci.org/westoque/phantomjs.rb)
|
4
|
+
|
3
5
|
A ruby wrapper for phantomjs. The binaries are in `vendor` and it will
|
4
6
|
automatically detect what OS you are using and will try to use the
|
5
7
|
appropriate binaries.
|
data/Rakefile
CHANGED
data/lib/phantomjs.rb
CHANGED
@@ -13,7 +13,10 @@ module Phantomjs
|
|
13
13
|
def run(script, *args)
|
14
14
|
string_args = args.join(" ")
|
15
15
|
@executable ||= get_executable
|
16
|
-
|
16
|
+
body = ""
|
17
|
+
IO.popen "#{@executable} #{script} #{string_args}" do |stream|
|
18
|
+
body << stream.read
|
19
|
+
end
|
17
20
|
end
|
18
21
|
|
19
22
|
private
|
data/lib/phantomjs/version.rb
CHANGED
data/phantomjs.rb.gemspec
CHANGED
@@ -20,6 +20,9 @@ Gem::Specification.new do |s|
|
|
20
20
|
|
21
21
|
# specify any dependencies here; for example:
|
22
22
|
s.add_development_dependency "ZenTest"
|
23
|
+
s.add_development_dependency "rspec"
|
24
|
+
s.add_development_dependency "rake"
|
25
|
+
|
23
26
|
if RUBY_PLATFORM =~ /linux/
|
24
27
|
s.add_runtime_dependency 'phantomjs-linux'
|
25
28
|
elsif RUBY_PLATFORM =~ /darwin/
|
data/spec/phantomjs_spec.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'minitest/spec'
|
2
|
-
require 'minitest/autorun'
|
3
1
|
require 'phantomjs'
|
4
2
|
|
5
3
|
describe Phantomjs do
|
@@ -7,7 +5,7 @@ describe Phantomjs do
|
|
7
5
|
it "runs phantomjs binary with the correct arguments" do
|
8
6
|
script = File.expand_path('./spec/runner.js')
|
9
7
|
result = Phantomjs.run(script, 'foo1', 'foo2')
|
10
|
-
result.
|
8
|
+
result.should eq("bar foo1 foo2\n")
|
11
9
|
end
|
12
10
|
end
|
13
11
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phantomjs.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ZenTest
|
@@ -27,6 +27,38 @@ dependencies:
|
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rspec
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rake
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
30
62
|
- !ruby/object:Gem::Dependency
|
31
63
|
name: phantomjs-mac
|
32
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +84,7 @@ extra_rdoc_files: []
|
|
52
84
|
files:
|
53
85
|
- .autotest
|
54
86
|
- .gitignore
|
87
|
+
- .travis.yml
|
55
88
|
- CHANGELOG
|
56
89
|
- Gemfile
|
57
90
|
- MIT-LICENSE
|
@@ -82,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
115
|
version: '0'
|
83
116
|
requirements: []
|
84
117
|
rubyforge_project: phantomjs.rb
|
85
|
-
rubygems_version: 1.8.
|
118
|
+
rubygems_version: 1.8.24
|
86
119
|
signing_key:
|
87
120
|
specification_version: 3
|
88
121
|
summary: Ruby wrapper for phantomjs
|