Skip to content

Commit 4e0288c

Browse files
authored
Merge pull request #2815 from teamcapybara/first_free_time_in_a_year
Start getting this repo back to where it should be
2 parents ea65ac5 + 251c77b commit 4e0288c

33 files changed

+101
-43
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
ruby: ["3.0", "3.1", "3.2"]
26+
ruby: ["3.2", "3.3", "3.4"]
2727
task: ["rack_smoke", "cucumber"]
2828

2929
steps:
@@ -72,7 +72,7 @@ jobs:
7272
# Ensure all jobs are run to completion
7373
fail-fast: false
7474
matrix:
75-
ruby: ["3.0"]
75+
ruby: ["3.2"]
7676
task: ["spec_chrome", "spec_firefox"]
7777

7878
steps:
@@ -137,7 +137,7 @@ jobs:
137137
# Ensure all jobs are run to completion
138138
fail-fast: false
139139
matrix:
140-
ruby: ["3.0"]
140+
ruby: ["3.2"]
141141
task: ["spec_chrome", "spec_firefox"]
142142

143143
steps:
@@ -165,7 +165,7 @@ jobs:
165165
strategy:
166166
fail-fast: false
167167
matrix:
168-
ruby: ["3.2"]
168+
ruby: ["3.4"]
169169
task: ["spec_rack"]
170170

171171
steps:

.rubocop.yml

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
require:
1+
plugins:
22
- rubocop-minitest
33
- rubocop-performance
44
- rubocop-rake
5-
- rubocop-rspec
65
- rubocop-capybara
6+
- rubocop-rspec
77

88
AllCops:
99
NewCops: enable
1010
DisabledByDefault: false
11-
TargetRubyVersion: 3.0
11+
TargetRubyVersion: 3.2
1212
Exclude:
1313
- 'vendor/**/*'
1414
- 'gemfiles/vendor/**/*'
@@ -24,6 +24,12 @@ RSpec/SpecFilePathFormat:
2424
RSpec/SpecFilePathSuffix:
2525
Enabled: false
2626

27+
Capybara/FindAllFirst:
28+
Enabled: false
29+
30+
Capybara/NegationMatcherAfterVisit:
31+
Enabled: false
32+
2733
Capybara/RSpec/HaveSelector:
2834
Enabled: false
2935

@@ -128,9 +134,11 @@ Naming/MethodParameterName:
128134
- 'y'
129135
- 'on'
130136

131-
Naming/PredicateName:
137+
Naming/PredicatePrefix:
132138
Exclude:
133139
- '**/*/*matchers.rb'
140+
- '**/*/matchers/base.rb'
141+
- '**/*/matchers/match_style.rb'
134142

135143
#################### Performance ####################
136144

@@ -142,8 +150,8 @@ Performance/StringIdentifierArgument:
142150

143151
#################### RSpec ####################
144152

145-
RSpec/Capybara/FeatureMethods:
146-
Enabled: false
153+
# Capybara/FeatureMethods:
154+
# Enabled: false
147155

148156
RSpec/ContextWording:
149157
Enabled: false
@@ -157,8 +165,8 @@ RSpec/ExampleLength:
157165
RSpec/ExampleWording:
158166
Enabled: false
159167

160-
RSpec/FilePath:
161-
Enabled: false
168+
# RSpec/FilePath:
169+
# Enabled: false
162170

163171
RSpec/InstanceVariable:
164172
AssignmentOnly: true
@@ -227,3 +235,31 @@ Style/SingleLineMethods:
227235
Style/SpecialGlobalVars:
228236
Exclude:
229237
- 'capybara.gemspec'
238+
239+
### Enable and fix
240+
Style/KeywordArgumentsMerging:
241+
Enabled: false
242+
243+
Gemspec/AddRuntimeDependency:
244+
Enabled: false
245+
246+
Lint/UselessConstantScoping:
247+
Enabled: false
248+
249+
Naming/PredicateMethod:
250+
Enabled: false
251+
252+
RSpec/IncludeExamples:
253+
Enabled: false
254+
255+
Style/SuperArguments:
256+
Enabled: false
257+
258+
Style/FileNull:
259+
Enabled: false
260+
261+
Naming/BlockForwarding:
262+
Enabled: false
263+
264+
Style/ArrayIntersect:
265+
Enabled: false

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ gem 'bundler', '< 3.0'
66
gemspec
77

88
gem 'xpath', github: 'teamcapybara/xpath'
9-
109
# gem 'rack-test', github: 'rack/rack-test'
1110

1211
group :doc do

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ RuboCop::RakeTask.new
1010

1111
desc 'Run all examples with Firefox'
1212

13-
rspec_opts = %w[--color]
13+
rspec_opts = '--color'
1414

1515
RSpec::Core::RakeTask.new(:spec_firefox) do |t|
1616
t.rspec_opts = rspec_opts

capybara.gemspec

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ require 'capybara/version'
88
Gem::Specification.new do |s|
99
s.name = 'capybara'
1010
s.version = Capybara::VERSION
11-
s.required_ruby_version = '>= 3.0.0'
11+
s.required_ruby_version = '>= 3.2.0'
1212
s.license = 'MIT'
1313

1414
s.authors = ['Thomas Walpole', 'Jonas Nicklas']
@@ -52,10 +52,11 @@ Gem::Specification.new do |s|
5252
s.add_development_dependency('rspec', ['>= 3.5.0'])
5353
s.add_development_dependency('rspec-instafail')
5454
s.add_development_dependency('rubocop', ['~>1.1'])
55+
s.add_development_dependency('rubocop-capybara')
5556
s.add_development_dependency('rubocop-minitest')
5657
s.add_development_dependency('rubocop-performance')
5758
s.add_development_dependency('rubocop-rake')
58-
s.add_development_dependency('rubocop-rspec', ['~>2.0'])
59+
s.add_development_dependency('rubocop-rspec', ['~>3.0'])
5960
s.add_development_dependency('sauce_whisk')
6061
s.add_development_dependency('selenium_statistics')
6162
s.add_development_dependency('selenium-webdriver', ['~>4.8'])

gemfiles/Gemfile.base-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ gem 'rack', '~>2.0.0'
77
gem 'nokogiri', '~>1.11.0'
88
gem 'xpath', '~>3.2.0'
99
gem 'rspec', '~>3.5.0'
10-
gem 'selenium-webdriver', '~>4.8.0'
10+
gem 'selenium-webdriver', '~>4.11.0'
1111
gem 'irb', '~>1.1.1'
1212
gem 'webdrivers', '~>5.0.0'

lib/capybara/node/actions.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ def _update_style(element, style)
358358

359359
def _reset_style(element)
360360
element.execute_script(RESET_STYLE_SCRIPT)
361-
rescue StandardError # rubocop:disable Lint/SuppressedException swallow extra errors
361+
rescue StandardError # rubocop:disable Lint/SuppressedException -- swallow extra errors
362362
end
363363

364364
def _check_with_label(selector, checked, locator,

lib/capybara/queries/base_query.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ def matches_count?(count)
6060
# Generates a failure message from the query description and count options.
6161
#
6262
def failure_message
63-
+"expected to find #{description}" << count_message
63+
"expected to find #{description}" << count_message
6464
end
6565

6666
def negative_failure_message
67-
+"expected not to find #{description}" << count_message
67+
"expected not to find #{description}" << count_message
6868
end
6969

7070
private

lib/capybara/queries/selector_query.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,11 @@ def supports_exact?
177177
end
178178

179179
def failure_message
180-
+"expected to find #{applied_description}" << count_message
180+
"expected to find #{applied_description}" << count_message
181181
end
182182

183183
def negative_failure_message
184-
+"expected not to find #{applied_description}" << count_message
184+
"expected not to find #{applied_description}" << count_message
185185
end
186186

187187
private

lib/capybara/queries/style_query.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ def resolves_for?(node)
2727
end
2828

2929
def failure_message
30-
+"Expected node to have styles #{@expected_styles.inspect}. " \
31-
"Actual styles were #{@actual_styles.inspect}"
30+
"Expected node to have styles #{@expected_styles.inspect}. " \
31+
"Actual styles were #{@actual_styles.inspect}"
3232
end
3333

3434
private

0 commit comments

Comments
 (0)