screengem 0.20.1 → 0.21.0
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/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +10 -0
- data/lib/screengem/screen_element.rb +18 -1
- data/lib/screengem/version.rb +1 -1
- data/screengem.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed50ffbee800551f3f79133e4a2c295acc1775a60f7d7a7a423bbac98e39380f
|
4
|
+
data.tar.gz: d54c01b0b6cab94932da40c04dbca1118fa72b0d56d3ee2ad957588e0a3bf3fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21ad0b2a127ffaf7dcffe3e98897966bca63ee5806808c4cde895523df8a318958258d1fafec98ab808b86d53d0dee037ceb8613ebfda0f19efa78b4a9edc32b
|
7
|
+
data.tar.gz: 497373961001db9ff666c43beb4056a12fc26e8c1b552ef3716391b79da968e1aabe9b1a377ab95e708175b35b06ba592eb048eef5996052b1954d13d8784e61
|
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.2.4
|
data/CHANGELOG.md
CHANGED
@@ -9,7 +9,7 @@ module Screengem
|
|
9
9
|
include Screengem::RailsRoutes
|
10
10
|
|
11
11
|
def visit(visit_uri = visit_path)
|
12
|
-
return if visit_uri ==
|
12
|
+
return if visit_uri == current_uri
|
13
13
|
|
14
14
|
page.visit(visit_uri)
|
15
15
|
end
|
@@ -20,5 +20,22 @@ module Screengem
|
|
20
20
|
#
|
21
21
|
def visit_path
|
22
22
|
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
#
|
27
|
+
# Screen elements may define a visit_path that includes these elements
|
28
|
+
# of a URI: the path, a query string, and a fragment. When deciding to
|
29
|
+
# skip the page.visit we have to consider all of these elements.
|
30
|
+
#
|
31
|
+
def current_uri
|
32
|
+
uri = URI(page.current_url)
|
33
|
+
|
34
|
+
current_uri = uri.path
|
35
|
+
current_uri += "?#{uri.query}" if uri.query
|
36
|
+
current_uri += "##{uri.fragment}" if uri.fragment
|
37
|
+
|
38
|
+
current_uri
|
39
|
+
end
|
23
40
|
end
|
24
41
|
end
|
data/lib/screengem/version.rb
CHANGED
data/screengem.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.bindir = "exe"
|
29
29
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
30
30
|
spec.require_paths = ["lib"]
|
31
|
-
spec.required_ruby_version = ">= 3.
|
31
|
+
spec.required_ruby_version = ">= 3.2"
|
32
32
|
|
33
33
|
spec.add_runtime_dependency "activesupport", ">= 6.0", "< 7.2"
|
34
34
|
spec.add_runtime_dependency "capybara", ">= 3.0", "< 4.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: screengem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.21.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alistair McKinnell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -141,14 +141,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
141
141
|
requirements:
|
142
142
|
- - ">="
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version: '3.
|
144
|
+
version: '3.2'
|
145
145
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
146
|
requirements:
|
147
147
|
- - ">="
|
148
148
|
- !ruby/object:Gem::Version
|
149
149
|
version: '0'
|
150
150
|
requirements: []
|
151
|
-
rubygems_version: 3.
|
151
|
+
rubygems_version: 3.5.18
|
152
152
|
signing_key:
|
153
153
|
specification_version: 4
|
154
154
|
summary: Ruby implementation of the Screengem Pattern.
|