capybara-mechanize 1.10.0 → 1.10.1

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: 91311ec7ef5ab26f9d2ba0034417b65db6421f5a
4
- data.tar.gz: 9e28f01f78b708523ed166734248d2fcadb7dc8c
3
+ metadata.gz: fac6d6b89beecdd33ed71713054e9cbd050628d4
4
+ data.tar.gz: 8ae6b1fc58d4297a814ae3c48af443b93ac6fd71
5
5
  SHA512:
6
- metadata.gz: 7fa75aa260c0d2908bc6919c65c38beabce4da86ef06a7679d2ac5992c5b8d0c6e994046a9a190fec6361960ca10b6a9ff91a912aece1178a469068479009662
7
- data.tar.gz: b942267ca1af811b1883c1b3559d8af06dab78965eeebbf7fb486b04bb7f281c6cfb96b7440b265a855dfcdad1013f4e2a909d022faa01649de863c6d2a70e5c
6
+ metadata.gz: 0621533dcd84882381f6bb8628cb1b9831b4ddd737b825641b10b1dc04588cd73d04b13105e14147b123d030dd07fc386bd21160497a5569bf17de0ce5f77fbb
7
+ data.tar.gz: 52c00e76830baf8c5c76cb8c978bd39baea65a58fef18f82d005944c53b0c8cb64726c7984f08832d09f026804c1398996cf49da0cf98b4820a91770fcfe1932
@@ -1,8 +1,8 @@
1
1
  require 'capybara/mechanize/browser'
2
2
 
3
3
  class Capybara::Mechanize::Driver < Capybara::RackTest::Driver
4
-
5
- def initialize(app, options = {})
4
+
5
+ def initialize(app, **options)
6
6
  raise ArgumentError, "mechanize requires a rack application, but none was given" unless app
7
7
 
8
8
  super
@@ -2,6 +2,10 @@ class Capybara::Mechanize::Node < Capybara::RackTest::Node
2
2
  def click(keys = [], offset = {})
3
3
  raise ArgumentError, "The mechanize driver does not support click options" unless keys.empty? && offset.empty?
4
4
 
5
+ submits = respond_to?(:submits?) ? submits? :
6
+ ((tag_name == 'input' and %w(submit image).include?(type)) or
7
+ ((tag_name == 'button') and type.nil? or type == "submit"))
8
+
5
9
  if tag_name == 'a' or tag_name == 'label' or
6
10
  (tag_name == 'input' and %w(checkbox radio).include?(type))
7
11
  if Capybara::VERSION > '3.0.0'
@@ -9,10 +13,11 @@ class Capybara::Mechanize::Node < Capybara::RackTest::Node
9
13
  else
10
14
  super()
11
15
  end
12
- elsif (tag_name == 'input' and %w(submit image).include?(type)) or
13
- ((tag_name == 'button') and type.nil? or type == "submit")
16
+ elsif submits
14
17
  associated_form = form
15
18
  Capybara::Mechanize::Form.new(driver, form).submit(self) if associated_form
19
+ else
20
+ super
16
21
  end
17
22
  end
18
23
  end
@@ -1,5 +1,5 @@
1
1
  module Capybara
2
2
  module Mechanize
3
- VERSION = '1.10.0'
3
+ VERSION = '1.10.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-mechanize
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeroen van Dijk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-22 00:00:00.000000000 Z
11
+ date: 2018-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mechanize
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 2.7.0
27
- - !ruby/object:Gem::Dependency
28
- name: rack-test
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: 0.6.3
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: 0.6.3
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: capybara
43
29
  requirement: !ruby/object:Gem::Requirement