chop 0.25.0 → 0.25.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chop/form.rb +12 -1
- data/lib/chop/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f53842373f4008147af52ccaa536a0feba22f09f21f6a817a03843b97a63677f
|
4
|
+
data.tar.gz: 606f70be3cec864c4475f45a8dcd9356c79b153aa338129f4ada6819bac5f354
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9adfc4c43d158774acc43ffe64f95826614e88734482ba16cb989f4e3150bc88026384b60f29601b3d059eebb80db53b04717f30537976fdcc3d4f3c022c61f6
|
7
|
+
data.tar.gz: 91474fd0c048d4fbf61fa91becadc0cee1ffe88ebcda94a718380abde85b5b3c5bf0bfd7417ec5f239ee23fa6c99045eeb5784c7d4b63c89d08450ef5f709882
|
data/lib/chop/form.rb
CHANGED
@@ -8,7 +8,18 @@ module Chop
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def self.diff! selector, table, session: Capybara.current_session, &block
|
11
|
-
|
11
|
+
root = begin
|
12
|
+
if selector.is_a?(Capybara::Node::Element)
|
13
|
+
selector
|
14
|
+
else
|
15
|
+
session.find(selector)
|
16
|
+
end
|
17
|
+
rescue Capybara::ElementNotFound
|
18
|
+
raise unless @allow_not_found
|
19
|
+
Node("")
|
20
|
+
end
|
21
|
+
|
22
|
+
all_fields = root.all("input, textarea, select")
|
12
23
|
relevant_fields = all_fields.inject([]) do |fields, field|
|
13
24
|
next fields if field[:name].blank?
|
14
25
|
next fields if field[:type] == "submit"
|
data/lib/chop/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.25.
|
4
|
+
version: 0.25.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah Geisel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|