site_prism-all_there 3.0.5 → 3.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -11
- data/lib/site_prism/all_there/recursion_checker.rb +7 -7
- data/lib/site_prism/all_there/version.rb +1 -1
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1767de4626d040f68dc05e43b1447fd8fe1cfb415728638855d1bfbf4100c1d2
|
4
|
+
data.tar.gz: 513d1c937911cf0fbca7aaaf013fe9e6e4968e73754e44480ded39344bbefd0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b98f8d7b8e75318a21c5aae5a9f7a46fae5b806de73bc06e7552317838d0c5aeccf1ca0b17ce622b083a3221078c13a9653157d7228c35ed78730e6c6461a42d
|
7
|
+
data.tar.gz: 5af14e3b1b4eafb3bee59880260db9f256d39447edfc4d9ddb242aaa69262e344a598438d047157194c83caa141876115625ca2b22004841bee0f6fba0417d68
|
data/README.md
CHANGED
@@ -1,28 +1,23 @@
|
|
1
1
|
# site_prism-all_there
|
2
|
+
|
2
3
|
- [History](#history)
|
3
|
-
- [Enabling gem methods](#enabling-gem-methods)
|
4
4
|
- [Usage](#usage)
|
5
5
|
- [In-line parameter](#in-line-parameter)
|
6
6
|
- [Global setting](#global-setting)
|
7
7
|
|
8
8
|
## History
|
9
9
|
|
10
|
-
This
|
11
|
-
|
12
|
-
This gem is a breakout of the current `SitePrism::Page#all_there?` and `SitePrism::Section#all_there?`
|
13
|
-
methods which have existed in site_prism since v2
|
14
|
-
|
15
|
-
The gem is version stable. It is default functionality in `site_prism` v4 and above
|
10
|
+
This is the breakout gem from SitePrism to perform recursion checks in the `#all_there?` method
|
16
11
|
|
17
|
-
|
12
|
+
This gem is a breakout from `SitePrism::Page#all_there?` and `SitePrism::Section#all_there?` methods from site_prism v2
|
18
13
|
|
19
|
-
The gem
|
14
|
+
The gem is version stable. It is default enabled in `site_prism` v4 and above, no configuration is required!
|
20
15
|
|
21
16
|
## Usage
|
22
17
|
|
23
|
-
You can
|
18
|
+
You can perform recursion either using an in-line keyword arg `recursion` or using a global setting
|
24
19
|
|
25
|
-
When using both it will always look for
|
20
|
+
When using both it will always look **first** for an in-line parameter
|
26
21
|
|
27
22
|
### In-line parameter
|
28
23
|
|
@@ -25,7 +25,7 @@ module SitePrism
|
|
25
25
|
when nil, :none
|
26
26
|
current_class_all_there?(**options)
|
27
27
|
when :one
|
28
|
-
current_class_all_there?(**options) && section_classes_all_there?(
|
28
|
+
current_class_all_there?(**options) && section_classes_all_there?(options) && sections_classes_all_there?(options)
|
29
29
|
else
|
30
30
|
SitePrism.logger.debug("Invalid input value '#{recursion}'. Valid values are 'nil', ':none' or ':one'.")
|
31
31
|
SitePrism.logger.error('Invalid recursion setting, Will not run #all_there?.')
|
@@ -40,18 +40,18 @@ module SitePrism
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
-
def section_classes_all_there?(
|
44
|
-
section_classes_to_check.all? { |section| section.all_there?(
|
45
|
-
SitePrism.logger.debug("Result of section_classes_all_there? for #{instance.class}: #{result}")
|
43
|
+
def section_classes_all_there?(opts)
|
44
|
+
section_classes_to_check.all? { |section| section.all_there?(options: opts) }.tap do |result|
|
45
|
+
SitePrism.logger.debug("Result of #section_classes_all_there? for #{instance.class}: #{result}")
|
46
46
|
end
|
47
47
|
rescue Capybara::ElementNotFound
|
48
48
|
SitePrism.logger.error("Error whilst attempting to locate all section classes from within #{instance.class}")
|
49
49
|
false
|
50
50
|
end
|
51
51
|
|
52
|
-
def sections_classes_all_there?(
|
53
|
-
sections_classes_to_check.flatten.all? { |section| section.all_there?(
|
54
|
-
SitePrism.logger.debug("Result of sections_classes_all_there? for #{instance.class}: #{result}")
|
52
|
+
def sections_classes_all_there?(opts)
|
53
|
+
sections_classes_to_check.flatten.all? { |section| section.all_there?(options: opts) }.tap do |result|
|
54
|
+
SitePrism.logger.debug("Result of #sections_classes_all_there? for #{instance.class}: #{result}")
|
55
55
|
end
|
56
56
|
rescue Capybara::ElementNotFound
|
57
57
|
SitePrism.logger.error("Error whilst attempting to locate all sections (plural), classes from within #{instance.class}")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: site_prism-all_there
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luke Hill
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -30,42 +30,42 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.77.0
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
40
|
+
version: 1.77.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rubocop-performance
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.24.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.24.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rubocop-rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 3.6.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: 3.6.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: site_prism
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -123,7 +123,7 @@ metadata:
|
|
123
123
|
bug_tracker_uri: https://github.com/site-prism/site_prism-all_there/issues
|
124
124
|
changelog_uri: https://github.com/site-prism/site_prism-all_there/blob/main/CHANGELOG.md
|
125
125
|
source_code_uri: https://github.com/site-prism/site_prism-all_there
|
126
|
-
post_install_message:
|
126
|
+
post_install_message:
|
127
127
|
rdoc_options: []
|
128
128
|
require_paths:
|
129
129
|
- lib
|
@@ -138,9 +138,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '0'
|
140
140
|
requirements: []
|
141
|
-
rubygems_version: 3.
|
142
|
-
signing_key:
|
141
|
+
rubygems_version: 3.3.27
|
142
|
+
signing_key:
|
143
143
|
specification_version: 4
|
144
|
-
summary:
|
145
|
-
|
144
|
+
summary: An extension to SitePrism that enables you to recurse through SitePrism Pages
|
145
|
+
and Sections
|
146
146
|
test_files: []
|