webkit_remote 0.5.4 → 0.5.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2c7efaac54ca9f1f022c45be4f54666443e45595
4
- data.tar.gz: 83ef9a7212ab08c395bf4a8f3d4feb498557f7e4
3
+ metadata.gz: 3cabab3d3bcf6ae1ce28f16c36d9ed30380702ea
4
+ data.tar.gz: b348748fbef56b36f1e29bae10cad76dd267d127
5
5
  SHA512:
6
- metadata.gz: 0d557b4e62206aa1eef4a668b0bb859831857c38f1ef601fbd8b9555ace7e17e4d720d75cedd6c1ed67d1a19e72da65e24aced159d05921a1e1e78f77dc411f0
7
- data.tar.gz: 710126dd348769ff3d7eebcac1cbc800a3e70b69515e5124930cec12bf29546ad7451b1e4be777ac0f9a748e49d5f0ee14a50732c94d5adf68ad416aa40fa6fe
6
+ metadata.gz: 0a1c6f937194109f5d8c8de7e701b9b0806ced203cd6d6f3611f49ea198fd4ebf2f783cc4adae6578a2cee5d62747510a8e02ae9c4bf1dc24d19ef9176b2090c
7
+ data.tar.gz: 1ccb8933bd32fd43cdeb961e2b54b88032f47d813bdee7716cc2bc7494fbb8fb76e32a65083dc37e2955fed3f13ab91180de2f2f74b65a0ca0f6b9371b5311bb
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.4
1
+ 0.5.5
@@ -24,6 +24,8 @@ class Process
24
24
  # @option opts [Boolean] allow_popups when true, the popup blocker is
25
25
  # disabled; this is sometimes necessary when driving a Web UI via
26
26
  # JavaScript
27
+ # @option opts [String] chrome_binary path to the Chrome binary to be used;
28
+ # by default, the path is automatically detected
27
29
  def initialize(opts = {})
28
30
  @port = opts[:port] || 9292
29
31
  @timeout = opts[:timeout] || 10
@@ -150,7 +152,7 @@ class Process
150
152
  # http://peter.sh/experiments/chromium-command-line-switches/
151
153
  [
152
154
  chrome_env(opts),
153
- self.class.chrome_binary,
155
+ opts[:chrome_binary] || self.class.chrome_binary,
154
156
  ] + chrome_cli_flags(opts) + [
155
157
  "--remote-debugging-port=#{@port}", # Webkit remote debugging
156
158
  "--user-data-dir=#{@data_dir}", # really ensure a clean slate
@@ -105,4 +105,23 @@ describe WebkitRemote::Process do
105
105
  end
106
106
  end
107
107
  end
108
+
109
+ describe 'with invalid chrome_binary path' do
110
+ before :each do
111
+ @process = WebkitRemote::Process.new port: 9669,
112
+ chrome_binary: '/bin/non_existing_binary'
113
+ end
114
+ after :each do
115
+ @process.stop if @process
116
+ end
117
+
118
+ it 'raises an exception' do
119
+ begin
120
+ @process.start
121
+ fail 'no exception raised'
122
+ rescue SystemCallError => e
123
+ e.message.must_match(/non_existing_binary/)
124
+ end
125
+ end
126
+ end
108
127
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "webkit_remote"
8
- s.version = "0.5.4"
8
+ s.version = "0.5.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Victor Costan"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webkit_remote
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Costan