formulaic 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.ruby-version +1 -1
- data/.travis.yml +3 -2
- data/README.md +2 -2
- data/Rakefile +0 -3
- data/formulaic.gemspec +1 -1
- data/lib/formulaic/inputs/array_input.rb +0 -5
- data/lib/formulaic/inputs/boolean_input.rb +2 -2
- data/lib/formulaic/inputs/file_input.rb +1 -1
- data/lib/formulaic/inputs/select_input.rb +2 -2
- data/lib/formulaic/inputs/string_input.rb +6 -6
- data/lib/formulaic/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3bf47076f596d2d6c8c24c3a6104013fcf64baa9988d49a26df1e34e7d924e84
|
4
|
+
data.tar.gz: d7502f483502c9198ee6b489ceeada502ff0919e4f9ca171d557ed2df5c40863
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73aa0ac611763b7ba09a23e2a2976923be4813a21c0f355da8a3f2086ae7bdafbf4afb053619724139767fc2ffbf75ff1c21cd8e2f8e898b0d7b7b09d174e3ca
|
7
|
+
data.tar.gz: a6bcd0e117c06e658a543593e044de0dfda999051e03c278e6137a552cee6d9218b4babb20e0dba41baa3b3adceeaee31a3ccf7256b06146ebcfef0187450591
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.5
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -112,7 +112,7 @@ class ActionDispatch::IntegrationTest
|
|
112
112
|
end
|
113
113
|
```
|
114
114
|
|
115
|
-
### Integration with [
|
115
|
+
### Integration with [Factory Bot](https://github.com/thoughtbot/factory_bot)
|
116
116
|
|
117
117
|
```ruby
|
118
118
|
fill_form(:user, attributes_for(:user))
|
@@ -185,4 +185,4 @@ Thank you!
|
|
185
185
|
[team]: https://thoughtbot.com/austin?utm_source=github
|
186
186
|
[contributors]: http://github.com/thoughtbot/formulaic/contributors
|
187
187
|
|
188
|
-
[![
|
188
|
+
[![thoughtbot](http://presskit.thoughtbot.com/images/thoughtbot-logo-for-readmes.svg)](https://thoughtbot.com/)
|
data/Rakefile
CHANGED
data/formulaic.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_dependency 'i18n'
|
26
26
|
spec.add_dependency 'activesupport'
|
27
27
|
|
28
|
-
spec.add_development_dependency 'bundler'
|
28
|
+
spec.add_development_dependency 'bundler'
|
29
29
|
spec.add_development_dependency 'rake'
|
30
30
|
spec.add_development_dependency 'rspec'
|
31
31
|
spec.add_development_dependency 'pry'
|
@@ -21,7 +21,7 @@ module Formulaic
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def has_select?
|
24
|
-
has_field?(label, type: "select")
|
24
|
+
has_field?(label.to_str, type: "select")
|
25
25
|
end
|
26
26
|
|
27
27
|
def select_is_multiple?
|
@@ -30,7 +30,7 @@ module Formulaic
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def select_element
|
33
|
-
@select_element ||= find_field(label, type: "select")
|
33
|
+
@select_element ||= find_field(label.to_str, type: "select")
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|
@@ -2,19 +2,19 @@ module Formulaic
|
|
2
2
|
module Inputs
|
3
3
|
class StringInput < Input
|
4
4
|
def fill
|
5
|
-
if page.has_selector?(:fillable_field, label, wait: Formulaic.default_wait_time)
|
6
|
-
fill_in(label, with: value)
|
7
|
-
elsif page.has_selector?(:radio_button, label, wait: Formulaic.default_wait_time)
|
5
|
+
if page.has_selector?(:fillable_field, label.to_str, wait: Formulaic.default_wait_time)
|
6
|
+
fill_in(label.to_str, with: value)
|
7
|
+
elsif page.has_selector?(:radio_button, label.to_str, wait: Formulaic.default_wait_time)
|
8
8
|
choose(value)
|
9
|
-
elsif has_option_in_select?(translate_option(value), label)
|
10
|
-
select(translate_option(value), from: label)
|
9
|
+
elsif has_option_in_select?(translate_option(value), label.to_str)
|
10
|
+
select(translate_option(value), from: label.to_str)
|
11
11
|
else
|
12
12
|
raise Formulaic::InputNotFound.new(%[Unable to find input "#{label}".])
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
16
|
def has_option_in_select?(option, select)
|
17
|
-
element = find(:select, select)
|
17
|
+
element = find(:select, select.to_str)
|
18
18
|
if ! element.has_selector?(:option, option, wait: Formulaic.default_wait_time)
|
19
19
|
raise Formulaic::OptionForSelectInputNotFound.new(%[Unable to find option with text matching "#{option}".])
|
20
20
|
end
|
data/lib/formulaic/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: formulaic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Caleb Thompson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -56,16 +56,16 @@ dependencies:
|
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
175
|
version: '0'
|
176
176
|
requirements: []
|
177
177
|
rubyforge_project:
|
178
|
-
rubygems_version: 2.6
|
178
|
+
rubygems_version: 2.7.6
|
179
179
|
signing_key:
|
180
180
|
specification_version: 4
|
181
181
|
summary: Simplify form filling with Capybara
|