capybara-user_agent 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: afe07e8859dda5ea336c38e1233577b48da89eb4
4
- data.tar.gz: 7956d209441e4c570b65a294420121b05ab00422
3
+ metadata.gz: 28f5d7b4a00281fba5ee96b64f8aee9ec22f8b03
4
+ data.tar.gz: 76e8a292deb4d2af7339b137542cd536b0a9ce39
5
5
  SHA512:
6
- metadata.gz: 53dcfcfd4b068aa5ab798c5657e52c4ae6e05b059660979f99ca13a4ce147ae75feaa5e6b118cbeb8b7c93bc9a44e992106447beac25ee86c75da4f7a65a57c4
7
- data.tar.gz: abe9f3bd910c8132b7f19347092fd90ba2df5ab46bc8e836e56e8ddde60981e6b7c1fe9e3666ed8b0a8742b9ea64b7f35936ce1bd54b9655cd9e2dcd997a42cb
6
+ metadata.gz: cfa31efe6ca6056d6f40c1f97f8f56a07418213cdad7a4af21cf5476b217bb1afc5b217ad53ade8c5d2144e3350ce4a4884321f70e2a0ef942e88f6d51ac7d43
7
+ data.tar.gz: 29ee91c839797c7d39c7dbdb288186e6adb2c5edabd363d7059ba0c585e6bf102bc91c1081152a72d8af5f6ddb243f1695fa4e78f65d9a08c6c6c6ae3c4676ee
@@ -6,7 +6,13 @@ module Capybara
6
6
  end
7
7
 
8
8
  def set_custom_user_agent(user_agent)
9
- Capybara.current_session.driver.header('User-Agent', user_agent)
9
+ driver = Capybara.current_session.driver
10
+
11
+ if driver.respond_to?(:add_headers)
12
+ driver.add_headers('User-Agent' => user_agent)
13
+ else
14
+ driver.header('User-Agent', user_agent)
15
+ end
10
16
  end
11
17
  end
12
18
  end
@@ -1,5 +1,5 @@
1
1
  module Capybara
2
2
  module UserAgent
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-user_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuki Ito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-09 00:00:00.000000000 Z
11
+ date: 2014-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -66,9 +66,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  version: '0'
67
67
  requirements: []
68
68
  rubyforge_project:
69
- rubygems_version: 2.0.0
69
+ rubygems_version: 2.0.3
70
70
  signing_key:
71
71
  specification_version: 4
72
72
  summary: UserAgent DSL on Capybara
73
73
  test_files: []
74
- has_rdoc: