screengem 0.20.1 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fba86591b5164655d8bc06ffa5680e02786ab24050c3bcf488eae10d0363970e
4
- data.tar.gz: b7848894bf07c289bde1a908cdbda79818fa7d512ca4a113ca72d8174c7da35a
3
+ metadata.gz: ed50ffbee800551f3f79133e4a2c295acc1775a60f7d7a7a423bbac98e39380f
4
+ data.tar.gz: d54c01b0b6cab94932da40c04dbca1118fa72b0d56d3ee2ad957588e0a3bf3fe
5
5
  SHA512:
6
- metadata.gz: 17460c68f16ec339e002313fba069eda78658be0ce68914f4bbdcb018b8266321444fe222d2f0cfaea5a2f9e6530d8828798d1cd0deb5acbc20c4141debc7742
7
- data.tar.gz: 3640742f4e7fd6076f6ffa959d83380db066b5610c0568a8db84ef775ec8492e914fcb12adf378b949a75ea1181a73349f257dcc38cea8f9f084d2c49ce1370b
6
+ metadata.gz: 21ad0b2a127ffaf7dcffe3e98897966bca63ee5806808c4cde895523df8a318958258d1fafec98ab808b86d53d0dee037ceb8613ebfda0f19efa78b4a9edc32b
7
+ data.tar.gz: 497373961001db9ff666c43beb4056a12fc26e8c1b552ef3716391b79da968e1aabe9b1a377ab95e708175b35b06ba592eb048eef5996052b1954d13d8784e61
data/.rubocop.yml CHANGED
@@ -5,7 +5,7 @@ require:
5
5
 
6
6
  AllCops:
7
7
  NewCops: enable
8
- TargetRubyVersion: 3.0
8
+ TargetRubyVersion: 3.2
9
9
 
10
10
  Gemspec/RequireMFA:
11
11
  Enabled: false
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.0.5
1
+ 3.2.4
data/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  ## main (unreleased)
4
4
 
5
+ ## 0.21.0 (2024-10-03)
6
+
7
+ ### New Features
8
+
9
+ * Auto visit considers all of the URI
10
+
11
+ ### Breaking Changes
12
+
13
+ * Drop support for Ruby 3.0 and Ruby 3.1
14
+
5
15
  ## 0.20.1 (2023-10-16)
6
16
 
7
17
  * Support Rails 7.1.x
@@ -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 == page.current_path
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
@@ -1,3 +1,3 @@
1
1
  module Screengem
2
- VERSION = "0.20.1"
2
+ VERSION = "0.21.0"
3
3
  end
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.0"
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.20.1
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: 2023-10-17 00:00:00.000000000 Z
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.0'
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.2.33
151
+ rubygems_version: 3.5.18
152
152
  signing_key:
153
153
  specification_version: 4
154
154
  summary: Ruby implementation of the Screengem Pattern.