screengem 0.20.0 → 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: 440cf55bc9f3b573386865c682454c037e5c4d2f4d3445d0bc10fe5f8aa1bf23
4
- data.tar.gz: 7a5051441d9db8562a9a8d324066f6258b4db5c46879f4753e47bb6dbcc01fb9
3
+ metadata.gz: ed50ffbee800551f3f79133e4a2c295acc1775a60f7d7a7a423bbac98e39380f
4
+ data.tar.gz: d54c01b0b6cab94932da40c04dbca1118fa72b0d56d3ee2ad957588e0a3bf3fe
5
5
  SHA512:
6
- metadata.gz: '0731359611e4f825c219a3d2ab7f4e134cd101d50020af680049d506de73fb5f7a89834e767bd4b31cc20b0dfec8e4708fd3c954e21f2d02385fce073ae9a351'
7
- data.tar.gz: 567266575d5d911d74b21e5baa6b82abcb00b7ace7920cc6065098227a69c11af40d46b03e826bdddd9eb8bf05cfeba31dac7cdd0ef85260abd71bf1469c506d
6
+ metadata.gz: 21ad0b2a127ffaf7dcffe3e98897966bca63ee5806808c4cde895523df8a318958258d1fafec98ab808b86d53d0dee037ceb8613ebfda0f19efa78b4a9edc32b
7
+ data.tar.gz: 497373961001db9ff666c43beb4056a12fc26e8c1b552ef3716391b79da968e1aabe9b1a377ab95e708175b35b06ba592eb048eef5996052b1954d13d8784e61
data/.gitignore CHANGED
@@ -1,11 +1,12 @@
1
- /.bundle/
2
- /.idea/
3
- /.yardoc
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /spec/examples.txt
10
- /tmp/
1
+ *.swp
2
+ .bundle/
3
+ .idea/
4
+ .yardoc
11
5
  Gemfile.lock
6
+ _yardoc/
7
+ coverage/
8
+ doc/
9
+ pkg/
10
+ spec/examples.txt
11
+ spec/reports/
12
+ tmp/
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
@@ -51,9 +51,8 @@ RSpec/DescribedClass:
51
51
  RSpec/ExampleLength:
52
52
  Max: 20
53
53
 
54
- RSpec/FilePath:
55
- Exclude:
56
- - spec/screengem/concerns/*_spec.rb
54
+ RSpec/IndexedLet:
55
+ Enabled: false
57
56
 
58
57
  RSpec/MultipleMemoizedHelpers:
59
58
  Max: 8
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.0.5
1
+ 3.2.4
data/CHANGELOG.md CHANGED
@@ -2,6 +2,23 @@
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
+
15
+ ## 0.20.1 (2023-10-16)
16
+
17
+ * Support Rails 7.1.x
18
+ * Latest development dependencies
19
+ * Address rubocop violations
20
+ * Rework the .gitignore file
21
+
5
22
  ## 0.20.0 (2023-10-16)
6
23
 
7
24
  * Support Rails 7.1.1
data/Gemfile CHANGED
@@ -4,3 +4,13 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
5
  # Specify your gem's dependencies in screengem.gemspec
6
6
  gemspec
7
+
8
+ group :development do
9
+ gem "rake", "~> 13.0"
10
+ gem "rspec", "~> 3.12"
11
+ gem "rubocop", "~> 1.57"
12
+ gem "rubocop-performance", "~> 1.19"
13
+ gem "rubocop-rake", "~> 0.6"
14
+ gem "rubocop-rspec", "~> 2.24"
15
+ gem "simplecov", "~> 0.22"
16
+ end
@@ -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.0"
2
+ VERSION = "0.21.0"
3
3
  end
data/screengem.gemspec CHANGED
@@ -28,18 +28,10 @@ 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
- spec.add_runtime_dependency "activesupport", ">= 6.0", "< 7.1.1"
33
+ spec.add_runtime_dependency "activesupport", ">= 6.0", "< 7.2"
34
34
  spec.add_runtime_dependency "capybara", ">= 3.0", "< 4.0"
35
35
  spec.add_runtime_dependency "require_all", ">= 3.0", "< 4.0"
36
36
  spec.add_runtime_dependency "rspec-expectations", "~> 3.12"
37
-
38
- spec.add_development_dependency "rake", "~> 13.0"
39
- spec.add_development_dependency "rspec", "~> 3.12"
40
- spec.add_development_dependency "rubocop", "~> 1.48"
41
- spec.add_development_dependency "rubocop-performance", "~> 1.16"
42
- spec.add_development_dependency "rubocop-rake", "~> 0.6"
43
- spec.add_development_dependency "rubocop-rspec", "~> 2.19"
44
- spec.add_development_dependency "simplecov", "~> 0.22"
45
37
  end
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.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: 2023-10-16 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
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '6.0'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: 7.1.1
22
+ version: '7.2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '6.0'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: 7.1.1
32
+ version: '7.2'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: capybara
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -84,104 +84,6 @@ dependencies:
84
84
  - - "~>"
85
85
  - !ruby/object:Gem::Version
86
86
  version: '3.12'
87
- - !ruby/object:Gem::Dependency
88
- name: rake
89
- requirement: !ruby/object:Gem::Requirement
90
- requirements:
91
- - - "~>"
92
- - !ruby/object:Gem::Version
93
- version: '13.0'
94
- type: :development
95
- prerelease: false
96
- version_requirements: !ruby/object:Gem::Requirement
97
- requirements:
98
- - - "~>"
99
- - !ruby/object:Gem::Version
100
- version: '13.0'
101
- - !ruby/object:Gem::Dependency
102
- name: rspec
103
- requirement: !ruby/object:Gem::Requirement
104
- requirements:
105
- - - "~>"
106
- - !ruby/object:Gem::Version
107
- version: '3.12'
108
- type: :development
109
- prerelease: false
110
- version_requirements: !ruby/object:Gem::Requirement
111
- requirements:
112
- - - "~>"
113
- - !ruby/object:Gem::Version
114
- version: '3.12'
115
- - !ruby/object:Gem::Dependency
116
- name: rubocop
117
- requirement: !ruby/object:Gem::Requirement
118
- requirements:
119
- - - "~>"
120
- - !ruby/object:Gem::Version
121
- version: '1.48'
122
- type: :development
123
- prerelease: false
124
- version_requirements: !ruby/object:Gem::Requirement
125
- requirements:
126
- - - "~>"
127
- - !ruby/object:Gem::Version
128
- version: '1.48'
129
- - !ruby/object:Gem::Dependency
130
- name: rubocop-performance
131
- requirement: !ruby/object:Gem::Requirement
132
- requirements:
133
- - - "~>"
134
- - !ruby/object:Gem::Version
135
- version: '1.16'
136
- type: :development
137
- prerelease: false
138
- version_requirements: !ruby/object:Gem::Requirement
139
- requirements:
140
- - - "~>"
141
- - !ruby/object:Gem::Version
142
- version: '1.16'
143
- - !ruby/object:Gem::Dependency
144
- name: rubocop-rake
145
- requirement: !ruby/object:Gem::Requirement
146
- requirements:
147
- - - "~>"
148
- - !ruby/object:Gem::Version
149
- version: '0.6'
150
- type: :development
151
- prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
153
- requirements:
154
- - - "~>"
155
- - !ruby/object:Gem::Version
156
- version: '0.6'
157
- - !ruby/object:Gem::Dependency
158
- name: rubocop-rspec
159
- requirement: !ruby/object:Gem::Requirement
160
- requirements:
161
- - - "~>"
162
- - !ruby/object:Gem::Version
163
- version: '2.19'
164
- type: :development
165
- prerelease: false
166
- version_requirements: !ruby/object:Gem::Requirement
167
- requirements:
168
- - - "~>"
169
- - !ruby/object:Gem::Version
170
- version: '2.19'
171
- - !ruby/object:Gem::Dependency
172
- name: simplecov
173
- requirement: !ruby/object:Gem::Requirement
174
- requirements:
175
- - - "~>"
176
- - !ruby/object:Gem::Version
177
- version: '0.22'
178
- type: :development
179
- prerelease: false
180
- version_requirements: !ruby/object:Gem::Requirement
181
- requirements:
182
- - - "~>"
183
- - !ruby/object:Gem::Version
184
- version: '0.22'
185
87
  description:
186
88
  email:
187
89
  - alistairm@nulogy.com
@@ -194,7 +96,6 @@ files:
194
96
  - ".rubocop"
195
97
  - ".rubocop.yml"
196
98
  - ".ruby-version"
197
- - ".screengem.gemspec.swp"
198
99
  - CHANGELOG.md
199
100
  - CODE_OF_CONDUCT.md
200
101
  - Gemfile
@@ -240,14 +141,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
240
141
  requirements:
241
142
  - - ">="
242
143
  - !ruby/object:Gem::Version
243
- version: '3.0'
144
+ version: '3.2'
244
145
  required_rubygems_version: !ruby/object:Gem::Requirement
245
146
  requirements:
246
147
  - - ">="
247
148
  - !ruby/object:Gem::Version
248
149
  version: '0'
249
150
  requirements: []
250
- rubygems_version: 3.4.10
151
+ rubygems_version: 3.5.18
251
152
  signing_key:
252
153
  specification_version: 4
253
154
  summary: Ruby implementation of the Screengem Pattern.
Binary file