Commit 59bbf5de 59bbf5deb275e89ace7b5d85a8c195d583222c27 by Nicolas Perriault

Merge pull request #170 from hannyu/rubygem

Request for add a new branch rubygem again
2 parents 583868d9 7f4225a5
1 # by hannyu
2
3 CASPERJS_VERSION = File.read("package.json")[/version.*:.*"(.*?)"/,1].gsub(/[\-_\+]/,".")
4
5 Gem::Specification.new do |s|
6 s.name = "casperjs"
7 s.version = CASPERJS_VERSION
8 s.homepage = "http://casperjs.org/"
9 s.authors = ["Nicolas Perriault", ]
10 s.email = ["nperriault@gmail.com",]
11 s.description = "CasperJS is a navigation scripting & testing utility for [PhantomJS](http://www.phantomjs.org/).
12 It eases the process of defining a full navigation scenario and provides useful
13 high-level functions, methods & syntaxic sugar for doing common tasks."
14 s.summary = "Navigation scripting & testing utility for PhantomJS"
15 s.extra_rdoc_files = ["LICENSE.md", "README.md"]
16 s.files = Dir["LICENSE.md", "README.md", "CHANGELOG.md", "package.json", "casperjs.gemspec",
17 "bin/bootstrap.js", "bin/usage.txt", "bin/casperjs_python",
18 "docs/**/*", "modules/**/*", "samples/**/*", "tests/**/*"]
19 s.bindir = "rubybin"
20 s.executables = [ "casperjs" ]
21 s.license = "MIT"
22 s.requirements = [ "PhantomJS v1.5" ]
23 end
1 #!/usr/bin/env ruby 1 #!/usr/bin/env ruby
2
3 # Ruby Wrapper for CasperJs 2 # Ruby Wrapper for CasperJs
4 # Version: 1.0.0
5 # by hannyu 3 # by hannyu
6 4
7 5
...@@ -10,18 +8,21 @@ CASPER_PATH = File.dirname(File.dirname(File.expand_path(__FILE__))) ...@@ -10,18 +8,21 @@ CASPER_PATH = File.dirname(File.dirname(File.expand_path(__FILE__)))
10 PHANTOMJS_NATIVE_ARGS = [ 8 PHANTOMJS_NATIVE_ARGS = [
11 '--cookies-file', 9 '--cookies-file',
12 '--config', 10 '--config',
11 '--debug',
13 '--disk-cache', 12 '--disk-cache',
14 '--ignore-ssl-errors', 13 '--ignore-ssl-errors',
15 '--load-images', 14 '--load-images',
16 '--load-plugins', 15 '--load-plugins',
16 '--local-storage-path',
17 '--local-storage-quota',
17 '--local-to-remote-url-access', 18 '--local-to-remote-url-access',
18 '--max-disk-cache-size', 19 '--max-disk-cache-size',
19 '--output-encoding', 20 '--output-encoding',
20 '--remote-debugger-port',
21 '--remote-debugger-autorun',
22 '--proxy', 21 '--proxy',
23 '--proxy-auth', 22 '--proxy-auth',
24 '--proxy-type', 23 '--proxy-type',
24 '--remote-debugger-port',
25 '--remote-debugger-autorun',
25 '--script-encoding', 26 '--script-encoding',
26 '--web-security', 27 '--web-security',
27 ] 28 ]
......