congress_forms 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/congress_forms/actions.rb +10 -2
- data/lib/congress_forms/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5dc781f1fa127f7d791fe00ced51a3bcb870d80f
|
4
|
+
data.tar.gz: ca38b5475b8bc7cee9e0fd527c19243d144d59ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fbd7e0e8241aa3e655391bc32d897c53ecd13bbaf03dda872105657dd4e8bbfb21f91f83088670a7e830e496e561d53d6e2637fe9cf97be43a517e5c3f90c1a
|
7
|
+
data.tar.gz: 7d112a5df56ab5d71970fb543785a193f468dd44bdcab9fb4bc095e10da695e8afc95dcbe5836ae9e23e8882b736c6552c31843961ea6a8abd9877de2b3c6a98
|
@@ -1,4 +1,6 @@
|
|
1
1
|
module CongressForms
|
2
|
+
UnsupportedAction = Class.new(Error)
|
3
|
+
|
2
4
|
module Actions
|
3
5
|
DEFAULT_FIND_WAIT_TIME = 5
|
4
6
|
|
@@ -6,7 +8,12 @@ module CongressForms
|
|
6
8
|
key = step.keys.first
|
7
9
|
|
8
10
|
const_name = key.capitalize.gsub(/_(\w)/){ |m| m[1].upcase }
|
9
|
-
|
11
|
+
|
12
|
+
begin
|
13
|
+
klass = const_get(const_name, false)
|
14
|
+
rescue NameError => e
|
15
|
+
raise UnsupportedAction, "#{const_name} handler missing"
|
16
|
+
end
|
10
17
|
|
11
18
|
if Visit == klass
|
12
19
|
Array(klass.new("value" => step[key]))
|
@@ -88,7 +95,8 @@ module CongressForms
|
|
88
95
|
|
89
96
|
browser.within(selector) do
|
90
97
|
if placeholder_value?
|
91
|
-
option_value = user_value
|
98
|
+
option_value = user_value or
|
99
|
+
raise Error, "Required field missing: #{value}"
|
92
100
|
else
|
93
101
|
option_value = value
|
94
102
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: congress_forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Woo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|