page_ez 0.2.0 → 0.2.1
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/Gemfile.lock +103 -73
- data/README.md +2 -2
- data/lib/page_ez/page.rb +3 -1
- data/lib/page_ez/parameters.rb +1 -1
- data/lib/page_ez/version.rb +1 -1
- data/page_ez.gemspec +2 -1
- metadata +18 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d43e379304db1b7e9d82ebceb53a7b223dcc0ba4210bce24f9bcded5cc15fad0
|
|
4
|
+
data.tar.gz: 5ead8bd699ac4baf2391e3f8c357e2eaa6f964f19901f78e7e495263c126be40
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 04152c93e07e5c76157117c9cc00e4816db8b35fe87c0c0842e7c14d37108c5e940184642125c016f6b5d9e148ba42e130a182837af2abda2ba6352b37830620
|
|
7
|
+
data.tar.gz: 12ff58d66114a127050deabbc551a749319b64c28ba566110d82a844f5ccaec398c8500850298df5eb40d8a12b9a4263cc8617dc531cb7b6c0c098fc4e9859d1
|
data/Gemfile.lock
CHANGED
|
@@ -1,139 +1,169 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
page_ez (0.2.
|
|
4
|
+
page_ez (0.2.1)
|
|
5
5
|
activesupport (>= 5.0)
|
|
6
6
|
capybara (~> 3.0)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
activesupport (
|
|
12
|
-
|
|
11
|
+
activesupport (8.1.2)
|
|
12
|
+
base64
|
|
13
|
+
bigdecimal
|
|
14
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
15
|
+
connection_pool (>= 2.2.5)
|
|
16
|
+
drb
|
|
13
17
|
i18n (>= 1.6, < 2)
|
|
18
|
+
json
|
|
19
|
+
logger (>= 1.4.2)
|
|
14
20
|
minitest (>= 5.1)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
securerandom (>= 0.3)
|
|
22
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
23
|
+
uri (>= 0.13.1)
|
|
24
|
+
addressable (2.8.8)
|
|
25
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
26
|
+
ast (2.4.3)
|
|
27
|
+
base64 (0.3.0)
|
|
28
|
+
bigdecimal (4.0.1)
|
|
29
|
+
capybara (3.40.0)
|
|
20
30
|
addressable
|
|
21
31
|
matrix
|
|
22
32
|
mini_mime (>= 0.1.3)
|
|
23
|
-
nokogiri (~> 1.
|
|
33
|
+
nokogiri (~> 1.11)
|
|
24
34
|
rack (>= 1.6.0)
|
|
25
35
|
rack-test (>= 0.6.3)
|
|
26
36
|
regexp_parser (>= 1.5, < 3.0)
|
|
27
37
|
xpath (~> 3.2)
|
|
28
|
-
concurrent-ruby (1.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
38
|
+
concurrent-ruby (1.3.6)
|
|
39
|
+
connection_pool (3.0.2)
|
|
40
|
+
diff-lcs (1.6.2)
|
|
41
|
+
docile (1.4.1)
|
|
42
|
+
drb (2.2.3)
|
|
43
|
+
i18n (1.14.8)
|
|
32
44
|
concurrent-ruby (~> 1.0)
|
|
33
|
-
json (2.
|
|
34
|
-
language_server-protocol (3.17.0.
|
|
45
|
+
json (2.18.1)
|
|
46
|
+
language_server-protocol (3.17.0.5)
|
|
35
47
|
launchy (2.5.2)
|
|
36
48
|
addressable (~> 2.8)
|
|
37
|
-
lint_roller (1.
|
|
38
|
-
|
|
49
|
+
lint_roller (1.1.0)
|
|
50
|
+
logger (1.7.0)
|
|
51
|
+
matrix (0.4.3)
|
|
39
52
|
mini_mime (1.1.5)
|
|
40
|
-
minitest (
|
|
41
|
-
|
|
53
|
+
minitest (6.0.1)
|
|
54
|
+
prism (~> 1.5)
|
|
55
|
+
mustermann (3.0.4)
|
|
42
56
|
ruby2_keywords (~> 0.0.1)
|
|
43
|
-
nio4r (2.5
|
|
44
|
-
nokogiri (1.
|
|
57
|
+
nio4r (2.7.5)
|
|
58
|
+
nokogiri (1.19.0-arm64-darwin)
|
|
45
59
|
racc (~> 1.4)
|
|
46
|
-
nokogiri (1.
|
|
60
|
+
nokogiri (1.19.0-x86_64-linux-gnu)
|
|
47
61
|
racc (~> 1.4)
|
|
48
|
-
|
|
49
|
-
|
|
62
|
+
ostruct (0.6.3)
|
|
63
|
+
parallel (1.27.0)
|
|
64
|
+
parser (3.3.10.1)
|
|
50
65
|
ast (~> 2.4.1)
|
|
51
|
-
|
|
52
|
-
|
|
66
|
+
racc
|
|
67
|
+
prism (1.9.0)
|
|
68
|
+
public_suffix (7.0.2)
|
|
69
|
+
puma (6.6.1)
|
|
53
70
|
nio4r (~> 2.0)
|
|
54
|
-
racc (1.
|
|
55
|
-
rack (2.2.
|
|
56
|
-
rack-protection (3.0
|
|
57
|
-
|
|
58
|
-
|
|
71
|
+
racc (1.8.1)
|
|
72
|
+
rack (2.2.22)
|
|
73
|
+
rack-protection (3.2.0)
|
|
74
|
+
base64 (>= 0.1.0)
|
|
75
|
+
rack (~> 2.2, >= 2.2.4)
|
|
76
|
+
rack-test (2.2.0)
|
|
59
77
|
rack (>= 1.3)
|
|
60
78
|
rainbow (3.1.1)
|
|
61
|
-
rake (13.
|
|
62
|
-
regexp_parser (2.
|
|
63
|
-
rexml (3.
|
|
64
|
-
rspec (3.
|
|
65
|
-
rspec-core (~> 3.
|
|
66
|
-
rspec-expectations (~> 3.
|
|
67
|
-
rspec-mocks (~> 3.
|
|
68
|
-
rspec-core (3.
|
|
69
|
-
rspec-support (~> 3.
|
|
70
|
-
rspec-expectations (3.
|
|
79
|
+
rake (13.3.1)
|
|
80
|
+
regexp_parser (2.11.3)
|
|
81
|
+
rexml (3.4.4)
|
|
82
|
+
rspec (3.13.2)
|
|
83
|
+
rspec-core (~> 3.13.0)
|
|
84
|
+
rspec-expectations (~> 3.13.0)
|
|
85
|
+
rspec-mocks (~> 3.13.0)
|
|
86
|
+
rspec-core (3.13.6)
|
|
87
|
+
rspec-support (~> 3.13.0)
|
|
88
|
+
rspec-expectations (3.13.5)
|
|
71
89
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
72
|
-
rspec-support (~> 3.
|
|
73
|
-
rspec-mocks (3.
|
|
90
|
+
rspec-support (~> 3.13.0)
|
|
91
|
+
rspec-mocks (3.13.7)
|
|
74
92
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
75
|
-
rspec-support (~> 3.
|
|
76
|
-
rspec-support (3.
|
|
77
|
-
rubocop (1.
|
|
93
|
+
rspec-support (~> 3.13.0)
|
|
94
|
+
rspec-support (3.13.7)
|
|
95
|
+
rubocop (1.84.2)
|
|
78
96
|
json (~> 2.3)
|
|
97
|
+
language_server-protocol (~> 3.17.0.2)
|
|
98
|
+
lint_roller (~> 1.1.0)
|
|
79
99
|
parallel (~> 1.10)
|
|
80
|
-
parser (>= 3.
|
|
100
|
+
parser (>= 3.3.0.2)
|
|
81
101
|
rainbow (>= 2.2.2, < 4.0)
|
|
82
|
-
regexp_parser (>=
|
|
83
|
-
|
|
84
|
-
rubocop-ast (>= 1.28.0, < 2.0)
|
|
102
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
103
|
+
rubocop-ast (>= 1.49.0, < 2.0)
|
|
85
104
|
ruby-progressbar (~> 1.7)
|
|
86
|
-
unicode-display_width (>= 2.4.0, <
|
|
87
|
-
rubocop-ast (1.
|
|
88
|
-
parser (>= 3.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
105
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
106
|
+
rubocop-ast (1.49.0)
|
|
107
|
+
parser (>= 3.3.7.2)
|
|
108
|
+
prism (~> 1.7)
|
|
109
|
+
rubocop-performance (1.26.1)
|
|
110
|
+
lint_roller (~> 1.1)
|
|
111
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
112
|
+
rubocop-ast (>= 1.47.1, < 2.0)
|
|
92
113
|
ruby-progressbar (1.13.0)
|
|
93
114
|
ruby2_keywords (0.0.5)
|
|
94
|
-
rubyzip (
|
|
95
|
-
|
|
115
|
+
rubyzip (3.2.2)
|
|
116
|
+
securerandom (0.4.1)
|
|
117
|
+
selenium-webdriver (4.40.0)
|
|
118
|
+
base64 (~> 0.2)
|
|
119
|
+
logger (~> 1.4)
|
|
96
120
|
rexml (~> 3.2, >= 3.2.5)
|
|
97
|
-
rubyzip (>= 1.2.2, <
|
|
121
|
+
rubyzip (>= 1.2.2, < 4.0)
|
|
98
122
|
websocket (~> 1.0)
|
|
99
123
|
simplecov (0.22.0)
|
|
100
124
|
docile (~> 1.1)
|
|
101
125
|
simplecov-html (~> 0.11)
|
|
102
126
|
simplecov_json_formatter (~> 0.1)
|
|
103
|
-
simplecov-html (0.
|
|
104
|
-
simplecov-lcov (0.
|
|
127
|
+
simplecov-html (0.13.2)
|
|
128
|
+
simplecov-lcov (0.9.0)
|
|
105
129
|
simplecov_json_formatter (0.1.4)
|
|
106
|
-
sinatra (3.0
|
|
130
|
+
sinatra (3.2.0)
|
|
107
131
|
mustermann (~> 3.0)
|
|
108
132
|
rack (~> 2.2, >= 2.2.4)
|
|
109
|
-
rack-protection (= 3.0
|
|
133
|
+
rack-protection (= 3.2.0)
|
|
110
134
|
tilt (~> 2.0)
|
|
111
|
-
standard (1.
|
|
135
|
+
standard (1.54.0)
|
|
112
136
|
language_server-protocol (~> 3.17.0.2)
|
|
113
137
|
lint_roller (~> 1.0)
|
|
114
|
-
rubocop (~> 1.
|
|
138
|
+
rubocop (~> 1.84.0)
|
|
115
139
|
standard-custom (~> 1.0.0)
|
|
116
|
-
standard-performance (~> 1.
|
|
117
|
-
standard-custom (1.0.
|
|
118
|
-
lint_roller (~> 1.0)
|
|
119
|
-
standard-performance (1.1.0)
|
|
140
|
+
standard-performance (~> 1.8)
|
|
141
|
+
standard-custom (1.0.2)
|
|
120
142
|
lint_roller (~> 1.0)
|
|
121
|
-
rubocop
|
|
122
|
-
|
|
143
|
+
rubocop (~> 1.50)
|
|
144
|
+
standard-performance (1.9.0)
|
|
145
|
+
lint_roller (~> 1.1)
|
|
146
|
+
rubocop-performance (~> 1.26.0)
|
|
147
|
+
tilt (2.7.0)
|
|
123
148
|
tzinfo (2.0.6)
|
|
124
149
|
concurrent-ruby (~> 1.0)
|
|
125
|
-
unicode-display_width (2.
|
|
126
|
-
|
|
150
|
+
unicode-display_width (3.2.0)
|
|
151
|
+
unicode-emoji (~> 4.1)
|
|
152
|
+
unicode-emoji (4.2.0)
|
|
153
|
+
uri (1.1.1)
|
|
154
|
+
websocket (1.2.11)
|
|
127
155
|
xpath (3.2.0)
|
|
128
156
|
nokogiri (~> 1.8)
|
|
129
157
|
|
|
130
158
|
PLATFORMS
|
|
131
159
|
arm64-darwin-21
|
|
132
160
|
arm64-darwin-22
|
|
161
|
+
arm64-darwin-24
|
|
133
162
|
x86_64-linux
|
|
134
163
|
|
|
135
164
|
DEPENDENCIES
|
|
136
165
|
launchy (~> 2.5)
|
|
166
|
+
ostruct
|
|
137
167
|
page_ez!
|
|
138
168
|
puma (~> 6.3)
|
|
139
169
|
rake (~> 13.0)
|
data/README.md
CHANGED
|
@@ -10,7 +10,7 @@ PageEz is a tool to define page objects with [Capybara].
|
|
|
10
10
|
|
|
11
11
|
Add the gem to your `Gemfile`:
|
|
12
12
|
|
|
13
|
-
```
|
|
13
|
+
```rb
|
|
14
14
|
gem "page_ez"
|
|
15
15
|
```
|
|
16
16
|
|
|
@@ -323,7 +323,7 @@ expect(todos).not_to have_item_at(2, state: "incomplete")
|
|
|
323
323
|
One key aspect of PageEz is that page hierarchy can be codified and scoped for interaction.
|
|
324
324
|
|
|
325
325
|
```rb
|
|
326
|
-
class TodosList
|
|
326
|
+
class TodosList < PageEz::Page
|
|
327
327
|
has_many_ordered :items, "li" do
|
|
328
328
|
has_one :name, "span[data-role=name]"
|
|
329
329
|
has_one :complete_button, "input[type=checkbox][data-action=toggle-complete]"
|
data/lib/page_ez/page.rb
CHANGED
|
@@ -5,6 +5,7 @@ require "active_support/core_ext/module/delegation"
|
|
|
5
5
|
module PageEz
|
|
6
6
|
class Page
|
|
7
7
|
include DelegatesTo[:container]
|
|
8
|
+
|
|
8
9
|
class_attribute :visitor, :macro_registrar, :nested_macro, :container_base_selector
|
|
9
10
|
|
|
10
11
|
self.visitor = PageVisitor.new
|
|
@@ -56,7 +57,7 @@ module PageEz
|
|
|
56
57
|
end
|
|
57
58
|
|
|
58
59
|
def self.delegate(...)
|
|
59
|
-
super
|
|
60
|
+
super.tap do |method_names|
|
|
60
61
|
method_names.each do |method_name|
|
|
61
62
|
visitor.track_method_delegated(method_name)
|
|
62
63
|
end
|
|
@@ -140,6 +141,7 @@ module PageEz
|
|
|
140
141
|
Class.new(superclass || self).tap do |klass|
|
|
141
142
|
visitor.begin_block_evaluation
|
|
142
143
|
klass.macro_registrar = {}
|
|
144
|
+
klass.container_base_selector = nil
|
|
143
145
|
klass.class_eval(&block)
|
|
144
146
|
visitor.end_block_evaluation
|
|
145
147
|
self.nested_macro = false
|
data/lib/page_ez/parameters.rb
CHANGED
data/lib/page_ez/version.rb
CHANGED
data/page_ez.gemspec
CHANGED
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
|
12
12
|
spec.description = "PageEz is a tool to define page objects with Capybara"
|
|
13
13
|
spec.homepage = "https://github.com/joshuaclayton/page_ez"
|
|
14
14
|
spec.license = "MIT"
|
|
15
|
-
spec.required_ruby_version = ">= 3.
|
|
15
|
+
spec.required_ruby_version = ">= 3.2.0"
|
|
16
16
|
|
|
17
17
|
spec.metadata["homepage_uri"] = spec.homepage
|
|
18
18
|
spec.metadata["source_code_uri"] = "https://github.com/joshuaclayton/page_ez"
|
|
@@ -35,6 +35,7 @@ Gem::Specification.new do |spec|
|
|
|
35
35
|
spec.add_development_dependency "rspec", "~> 3.0"
|
|
36
36
|
spec.add_development_dependency "standard", "~> 1.3"
|
|
37
37
|
spec.add_development_dependency "sinatra", "~> 3.0"
|
|
38
|
+
spec.add_development_dependency "ostruct"
|
|
38
39
|
spec.add_development_dependency "selenium-webdriver", "~> 4.10"
|
|
39
40
|
spec.add_development_dependency "puma", "~> 6.3"
|
|
40
41
|
spec.add_development_dependency "launchy", "~> 2.5"
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: page_ez
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Josh Clayton
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 2026-02-16 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: capybara
|
|
@@ -94,6 +93,20 @@ dependencies:
|
|
|
94
93
|
- - "~>"
|
|
95
94
|
- !ruby/object:Gem::Version
|
|
96
95
|
version: '3.0'
|
|
96
|
+
- !ruby/object:Gem::Dependency
|
|
97
|
+
name: ostruct
|
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
|
99
|
+
requirements:
|
|
100
|
+
- - ">="
|
|
101
|
+
- !ruby/object:Gem::Version
|
|
102
|
+
version: '0'
|
|
103
|
+
type: :development
|
|
104
|
+
prerelease: false
|
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
106
|
+
requirements:
|
|
107
|
+
- - ">="
|
|
108
|
+
- !ruby/object:Gem::Version
|
|
109
|
+
version: '0'
|
|
97
110
|
- !ruby/object:Gem::Dependency
|
|
98
111
|
name: selenium-webdriver
|
|
99
112
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -216,7 +229,6 @@ licenses:
|
|
|
216
229
|
metadata:
|
|
217
230
|
homepage_uri: https://github.com/joshuaclayton/page_ez
|
|
218
231
|
source_code_uri: https://github.com/joshuaclayton/page_ez
|
|
219
|
-
post_install_message:
|
|
220
232
|
rdoc_options: []
|
|
221
233
|
require_paths:
|
|
222
234
|
- lib
|
|
@@ -224,15 +236,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
224
236
|
requirements:
|
|
225
237
|
- - ">="
|
|
226
238
|
- !ruby/object:Gem::Version
|
|
227
|
-
version: 3.
|
|
239
|
+
version: 3.2.0
|
|
228
240
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
229
241
|
requirements:
|
|
230
242
|
- - ">="
|
|
231
243
|
- !ruby/object:Gem::Version
|
|
232
244
|
version: '0'
|
|
233
245
|
requirements: []
|
|
234
|
-
rubygems_version: 3.
|
|
235
|
-
signing_key:
|
|
246
|
+
rubygems_version: 3.6.2
|
|
236
247
|
specification_version: 4
|
|
237
248
|
summary: PageEz is a tool to define page objects with Capybara
|
|
238
249
|
test_files: []
|