gridium 1.1.8 → 1.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/driver.rb +20 -9
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 517b56ed62e9a8809095ef2600590faef16108e4
4
- data.tar.gz: 1481c1312e62987c16c31e115e630b0f14b65a85
3
+ metadata.gz: 2ceb4f25690f0bd704447252e220abdaed75b3d3
4
+ data.tar.gz: ed3a464f67aa9894339f00ea78297a065fc6c395
5
5
  SHA512:
6
- metadata.gz: 0aad78a322e0c34fbbac4a6d473fdc7b59103ae42536bbcc8b61c1a422ef7568c28ff211f42df0b32c934b59b10a753ab2ff0fac21200934d7b6d6cb96ab2dfb
7
- data.tar.gz: 51057c690edc33798940e7df7ebdfe4e4d348790745fe35e251a6ec83935564eaab33e05df74593bfcfbe628a71e21037eb8bfb0537993b54af031dd69381360
6
+ metadata.gz: 99bbb81911c740f7afd7ebee89c30e4bb174202ba0bc0a8730032d5fa39a11dbf65e3644e4a1acdcdb776930162a3f12c5bfe0fd3f31571e01ff778c4c0051de
7
+ data.tar.gz: 9a290745962938907445b8331f4ac699a097809701164c1cab7fba79c7dde29e6b3b95905b9e5a51f7ee8089daa8429c1e1198623799677d2f20aff6984ca120
data/lib/driver.rb CHANGED
@@ -3,6 +3,7 @@ require 'uri'
3
3
  require 'spec_data'
4
4
 
5
5
  class Driver
6
+
6
7
  @@driver = nil
7
8
 
8
9
  def self.reset
@@ -298,19 +299,29 @@ class Driver
298
299
  Log.debug("[Gridium::Driver] Now back to Parent Frame")
299
300
  end
300
301
 
301
- def self.delete_cookie(cookie)
302
- Driver.driver.manage.delete_cookie(cookie)
302
+ def self.add_cookie(cookie)
303
+ Log.debug("[Gridium::Driver] Adding cookie named #{cookie[:name]}")
304
+ Driver.driver.manage.add_cookie(cookie)
305
+ end
306
+
307
+ def self.delete_cookie(cookie_name)
308
+ Log.debug("[Gridium::Driver] Deleting cookie named #{cookie_name}")
309
+ Driver.driver.manage.delete_cookie(cookie_name)
303
310
  end
304
311
 
305
312
  def self.get_cookie(cookie_name)
306
- Driver.driver.manage.all_cookies().each do |cookie|
307
- # match cookie
308
- if cookie[:name] == cookie_name
309
- return cookie
310
- end
311
- end
313
+ Log.debug("[Gridium::Driver] Getting cookie named #{cookie_name}")
314
+ Driver.driver.manage.cookie_named(cookie_name)
315
+ end
316
+
317
+ def self.all_cookies
318
+ Log.debug("[Gridium::Driver] Getting all cookies")
319
+ Driver.driver.manage.all_cookies
320
+ end
312
321
 
313
- return nil
322
+ def self.delete_all_cookies
323
+ Log.debug("[Gridium::Driver] Deleting all cookies")
324
+ Driver.driver.manage.delete_all_cookies
314
325
  end
315
326
 
316
327
  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.8
4
+ version: 1.1.9
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-24 00:00:00.000000000 Z
11
+ date: 2017-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler