site_prism-all_there 3.0.1 → 3.0.2
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 +13 -20
- data/lib/site_prism/all_there/recursion_checker.rb +2 -2
- data/lib/site_prism/all_there/version.rb +1 -1
- metadata +21 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14a223d06f824b7e67e41ee0bf0a8a6b31debabb74eff816c2c86fe8d3bd1fc3
|
4
|
+
data.tar.gz: e9dc0cccbb0acbbb5e720bfa1c2ee3326af5b0beabb8b99ccf36e0d1f55fc2bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad296627b3e2d735950b457d0a5e9065f575020a6fb0059137a977be69776504e8429b30821dd96e882ee5415549fbe99db88e6550e1ad9b5d66b928a1b5a47c
|
7
|
+
data.tar.gz: a87debaa8ffa1cd44722f76b1a36bdc8fda68a6fd4465a7089909b050f88e443d9af2c42111ab5dc4885042dfdcd7c6157f93244fe6d52af27770fb8216b8a50
|
data/README.md
CHANGED
@@ -2,26 +2,29 @@
|
|
2
2
|
- [History](#history)
|
3
3
|
- [Enabling gem methods](#enabling-gem-methods)
|
4
4
|
- [Usage](#usage)
|
5
|
-
- [In-line
|
6
|
-
- [Global
|
7
|
-
- [Troubleshooting](#troubleshooting)
|
5
|
+
- [In-line parameter](#in-line-parameter)
|
6
|
+
- [Global setting](#global-setting)
|
8
7
|
|
9
8
|
## History
|
10
9
|
|
11
10
|
This in the breakout gem from SitePrism to perform recursion checks for `#all_there?`
|
12
11
|
|
13
12
|
This gem is a breakout of the current `SitePrism::Page#all_there?` and `SitePrism::Section#all_there?`
|
14
|
-
methods which have
|
13
|
+
methods which have existed in site_prism since v2
|
15
14
|
|
16
|
-
The gem is
|
15
|
+
The gem is version stable. It is default functionality in `site_prism` v4 and above
|
17
16
|
|
18
17
|
## Enabling gem methods
|
19
18
|
|
20
|
-
The gem methods are
|
19
|
+
The gem methods are enabled by default. No configuration is required!
|
21
20
|
|
22
21
|
## Usage
|
23
22
|
|
24
|
-
|
23
|
+
You can configure the recursion either using an in-line parameter named `recursion` or using a global setting
|
24
|
+
|
25
|
+
When using both it will always look for the in-line parameter **first**
|
26
|
+
|
27
|
+
### In-line parameter
|
25
28
|
|
26
29
|
```rb
|
27
30
|
your_page = YourPage.new
|
@@ -31,12 +34,12 @@ your_page.all_there?(recursion: :one) # This will do the standard `#all_the
|
|
31
34
|
your_page.all_there?(recursion: :invalid) # This will not perform any checks and just log an error
|
32
35
|
```
|
33
36
|
|
34
|
-
### Global
|
37
|
+
### Global setting
|
35
38
|
|
36
39
|
```rb
|
37
40
|
SitePrism.recursion_setting = :one
|
38
41
|
your_page = YourPage.new
|
39
|
-
your_page.all_there?
|
42
|
+
your_page.all_there? # This will do the standard `#all_there?` check on the current page as well recursive checks on all `:section` or `:sections` objects -> doing the standard `#all_there?` check on those `SitePrism::Section` instances
|
40
43
|
|
41
44
|
# or...
|
42
45
|
|
@@ -45,15 +48,5 @@ SitePrism.configure do |config|
|
|
45
48
|
end
|
46
49
|
|
47
50
|
your_page = YourPage.new
|
48
|
-
your_page.all_there?
|
51
|
+
your_page.all_there? # This will do the standard `#all_there?` check on the current page as well recursive checks on all `:section` or `:sections` objects -> doing the standard `#all_there?` check on those `SitePrism::Section` instances
|
49
52
|
```
|
50
|
-
|
51
|
-
Then you can perform the above checks using the global config.
|
52
|
-
|
53
|
-
## Troubleshooting
|
54
|
-
|
55
|
-
**Mixing and matching the global config won't work - To come in v3!**
|
56
|
-
|
57
|
-
Happy Testing / Developing!
|
58
|
-
|
59
|
-
The SitePrism team
|
@@ -27,7 +27,7 @@ module SitePrism
|
|
27
27
|
when :one
|
28
28
|
current_class_all_there?(**options) && section_classes_all_there?(**options) && sections_classes_all_there?(**options)
|
29
29
|
else
|
30
|
-
SitePrism.logger.debug("Invalid input value '#{recursion}'. Valid values are nil, :none or :one.")
|
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?.')
|
32
32
|
end
|
33
33
|
end
|
@@ -36,7 +36,7 @@ module SitePrism
|
|
36
36
|
|
37
37
|
def current_class_all_there?(**opts)
|
38
38
|
expected_items.array.flatten.all? { |name| there?(name, **opts) }.tap do |result|
|
39
|
-
SitePrism.logger.
|
39
|
+
SitePrism.logger.debug("Result of current_class_all_there?: #{result}")
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luke Hill
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -30,56 +30,62 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.57.2
|
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.57.2
|
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.19.
|
47
|
+
version: 1.19.1
|
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.19.
|
54
|
+
version: 1.19.1
|
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: 2.
|
61
|
+
version: 2.25.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: 2.
|
68
|
+
version: 2.25.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: site_prism
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '4'
|
76
|
+
- - "<"
|
74
77
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
78
|
+
version: '6'
|
76
79
|
type: :development
|
77
80
|
prerelease: false
|
78
81
|
version_requirements: !ruby/object:Gem::Requirement
|
79
82
|
requirements:
|
80
|
-
- - "
|
83
|
+
- - ">"
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '4'
|
86
|
+
- - "<"
|
81
87
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
88
|
+
version: '6'
|
83
89
|
- !ruby/object:Gem::Dependency
|
84
90
|
name: yard
|
85
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -132,8 +138,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
138
|
- !ruby/object:Gem::Version
|
133
139
|
version: '0'
|
134
140
|
requirements: []
|
135
|
-
rubygems_version: 3.
|
141
|
+
rubygems_version: 3.2.3
|
136
142
|
signing_key:
|
137
143
|
specification_version: 4
|
138
|
-
summary:
|
144
|
+
summary: A SitePrism extension that allows you to recurse through your SitePrism Pages
|
145
|
+
or Sections
|
139
146
|
test_files: []
|