gridium 1.1.9 → 1.1.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/driver.rb +17 -4
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ceb4f25690f0bd704447252e220abdaed75b3d3
4
- data.tar.gz: ed3a464f67aa9894339f00ea78297a065fc6c395
3
+ metadata.gz: bf5a9c8f3df0f9978e83575bad02a71c85ec17d7
4
+ data.tar.gz: 2fb3b033b7f5f295d6d3921c438c5a36c10146c0
5
5
  SHA512:
6
- metadata.gz: 99bbb81911c740f7afd7ebee89c30e4bb174202ba0bc0a8730032d5fa39a11dbf65e3644e4a1acdcdb776930162a3f12c5bfe0fd3f31571e01ff778c4c0051de
7
- data.tar.gz: 9a290745962938907445b8331f4ac699a097809701164c1cab7fba79c7dde29e6b3b95905b9e5a51f7ee8089daa8429c1e1198623799677d2f20aff6984ca120
6
+ metadata.gz: ec1ce374dbf1796c28af13fdd05c37ad86ee525589f78ac1f7be8b44590d035723b0c8f5a3d75ba8d443d403e02c4262d231a5ce394eac5e9e125a4b834a60fe
7
+ data.tar.gz: c8da2b2a07d475805b867052a7bea04150da3f850258df9f1fef1f48856d8bfd68858e35eb04875f841663b328c33b5933dd8ec227944e6da71f77d1c59e3429
data/README.md CHANGED
@@ -220,8 +220,8 @@ To open the firehose to selenium's logging (https://github.com/SeleniumHQ/seleni
220
220
 
221
221
  ## Testing with docker
222
222
  Gridium's unit tests are run in docker using selenium grid and some helper images:
223
- * gprestes/the-internet
224
- * yetanotherlucas/mustadio
223
+ * [gprestes/the-internet](https://hub.docker.com/r/gprestes/the-internet/)
224
+ * [yetanotherlucas/mustadio](https://hub.docker.com/r/yetanotherlucas/mustadio/)
225
225
 
226
226
  The bin folder contains helper scripts to setup and teardown the docker containers:
227
227
  * `bin/pull`: Use this to pull the latest docker images prior to starting.
data/lib/driver.rb CHANGED
@@ -34,6 +34,7 @@ class Driver
34
34
  if Gridium.config.browser_source == :remote
35
35
  @@driver = Selenium::WebDriver.for(:remote, url: Gridium.config.target_environment, desired_capabilities: _set_capabilities())
36
36
  Log.debug("[Gridium::Driver] Remote Browser Requested: #{@@driver}")
37
+
37
38
  #this file detector is only used for remote drivers and is needed to upload files from test_host through Grid to browser
38
39
  @@driver.file_detector = lambda do |args|
39
40
  str = args.first.to_s
@@ -129,10 +130,16 @@ class Driver
129
130
 
130
131
  def self.quit
131
132
  if @@driver
132
- _log_shart #push out the last logs
133
- Log.debug('[Gridium::Driver] Shutting down web driver...')
134
- @@driver.quit
135
- @@driver = nil
133
+ begin
134
+ _log_shart #push out the last logs
135
+ Log.debug('[Gridium::Driver] Shutting down web driver...')
136
+ @@driver.quit
137
+ rescue Selenium::WebDriver::Error::NoSuchDriverError => e
138
+ Log.debug("[Gridium::Driver] #{e.backtrace.inspect}")
139
+ Log.error("[Gridium::Driver] Failed to shutdown webdriver: #{e.message}")
140
+ ensure
141
+ @@driver = nil
142
+ end
136
143
  end
137
144
  end
138
145
 
@@ -324,4 +331,10 @@ class Driver
324
331
  Driver.driver.manage.delete_all_cookies
325
332
  end
326
333
 
334
+ private
335
+
336
+ def self.raw_driver
337
+ @@driver
338
+ end
339
+
327
340
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gridium
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.9
4
+ version: 1.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Urban
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-25 00:00:00.000000000 Z
11
+ date: 2017-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler