phantomjs.rb 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # phantomjs.rb
2
2
 
3
- A ruby wrapper for phantomjs
3
+ A ruby wrapper for phantomjs. The binaries are in `vendor` and it will
4
+ automatically detect what OS you are using and will try to use the
5
+ appropriate binaries.
4
6
 
5
7
  ## Install
6
8
 
@@ -11,6 +13,13 @@ gem install phantomjs.rb
11
13
  ## Usage
12
14
 
13
15
  ```rb
14
- output = Phantomjs.run(script_name, arg1, arg2)
16
+ script = File.expand_path('./my_runner.js')
17
+ output = Phantomjs.run(script, 'myarg1', 'myarg2')
15
18
  p output # Whatever it outputs from stdout
16
19
  ```
20
+
21
+ The equivalent code above will generate:
22
+
23
+ ```sh
24
+ /absolute/path/to/phantomjs /absolute/my_runner.js myarg1 myarg2
25
+ ```
data/lib/phantomjs.rb CHANGED
@@ -20,9 +20,9 @@ module Phantomjs
20
20
 
21
21
  def get_executable
22
22
  if Os.is_mac?
23
- File.expand_path("./vendor/phantomjs-1.4.1_OSX/bin/phantomjs")
23
+ File.expand_path(File.dirname(__FILE__) + "/../vendor/phantomjs-1.4.1_OSX/bin/phantomjs")
24
24
  elsif Os.is_linux?
25
- File.expand_path("./vendor/phantomjs-1.5.0-liunx-x86-dynamic/bin/phantomjs")
25
+ File.expand_path(File.dirname(__FILE__) + "/../vendor/phantomjs-1.5.0-liunx-x86-dynamic/bin/phantomjs")
26
26
  else
27
27
  # Sorry windows guy
28
28
  # Nothing here
@@ -1,3 +1,3 @@
1
1
  module Phantomjs
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/phantomjs.rb.gemspec CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.version = Phantomjs::VERSION
8
8
  s.authors = ["William Estoque"]
9
9
  s.email = ["william.estoque@gmail.com"]
10
- s.homepage = ""
10
+ s.homepage = "http://westoque.com"
11
11
  s.summary = %q{Ruby wrapper for phantomjs}
12
12
  s.description = %q{Ruby wrapper for phantomjs}
13
13
 
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.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-04-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ZenTest
16
- requirement: &70175702175520 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,12 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70175702175520
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
25
30
  description: Ruby wrapper for phantomjs
26
31
  email:
27
32
  - william.estoque@gmail.com
@@ -223,7 +228,7 @@ files:
223
228
  - vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtWebKit.so.4
224
229
  - vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtWebKit.so.4.9
225
230
  - vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtWebKit.so.4.9.0
226
- homepage: ''
231
+ homepage: http://westoque.com
227
232
  licenses: []
228
233
  post_install_message:
229
234
  rdoc_options: []
@@ -243,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
248
  version: '0'
244
249
  requirements: []
245
250
  rubyforge_project: phantomjs.rb
246
- rubygems_version: 1.8.17
251
+ rubygems_version: 1.8.22
247
252
  signing_key:
248
253
  specification_version: 3
249
254
  summary: Ruby wrapper for phantomjs