Skip to content

Commit

Permalink
Merge branch 'add-img-selector' of github.com:phikes/capybara_accessi…
Browse files Browse the repository at this point in the history
…ble_selectors into add-img-selector
  • Loading branch information
phikes committed Jan 14, 2024
2 parents 1e507d9 + 776fd8d commit 5cc54d4
Showing 26 changed files with 155 additions and 245 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_and_lint.yml
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
ruby-version: ['3.2', '3.1', '3.0', '2.7']
ruby-version: ['3.3', '3.2', '3.1', '3.0']

steps:
- uses: actions/checkout@v2
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ inherit_gem:

AllCops:
SuggestExtensions: false
TargetRubyVersion: 2.7.0
TargetRubyVersion: 3.0

Metrics/MethodLength:
Max: 20
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.0
3.3.0
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@

- Add `img` selector and matcher
- Added `aria` filter to `:combo_box`, `:disclosure`, and `:disclosure_button` [Sean Doyle]
- Removed support for Ruby 2.7. Minimum supported Ruby version is now 3.0

## v0.10.0

12 changes: 11 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# frozen_string_literal: true

source "https://rubygems.org"
gem "citizens-advice-style", git: "https://github.com/citizensadvice/citizens-advice-style-ruby", tag: "v9.0.0"

group :test, :development do
gem "citizens-advice-style", git: "https://github.com/citizensadvice/citizens-advice-style-ruby", tag: "v10.0.1"
gem "debug"
gem "puma"
gem "rack-test"
gem "rspec"
gem "rubocop"
gem "selenium-webdriver"
gem "sinatra"
end

gemspec
150 changes: 98 additions & 52 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,25 +1,38 @@
GIT
remote: https://github.com/citizensadvice/citizens-advice-style-ruby
revision: 1a0f7e2cdcfd455a1c4d757c03d1c45eb160551d
tag: v9.0.0
revision: ca09fc508ee68c238428d4558701a766f1e12c79
tag: v10.0.1
specs:
citizens-advice-style (9.0.0)
rubocop (~> 1.30.1)
rubocop-rspec (~> 2.11.1)
citizens-advice-style (10.0.1)
rubocop (~> 1.45)
rubocop-rails (~> 2.17)
rubocop-rspec (~> 2.18)

PATH
remote: .
specs:
capybara_accessible_selectors (0.10.0)
capybara (>= 3.36.0)
capybara (~> 3.36)

GEM
remote: https://rubygems.org/
specs:
addressable (2.8.1)
activesupport (7.1.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
capybara (3.38.0)
base64 (0.2.0)
bigdecimal (3.1.5)
capybara (3.39.2)
addressable
matrix
mini_mime (>= 0.1.3)
@@ -28,82 +41,115 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
debug (1.7.1)
irb (>= 1.5.0)
reline (>= 0.3.1)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
debug (1.9.1)
irb (~> 1.10)
reline (>= 0.3.8)
diff-lcs (1.5.0)
io-console (0.6.0)
irb (1.6.2)
reline (>= 0.3.0)
drb (2.2.0)
ruby2_keywords
i18n (1.14.1)
concurrent-ruby (~> 1.0)
io-console (0.7.1)
irb (1.11.0)
rdoc
reline (>= 0.3.8)
json (2.7.1)
language_server-protocol (3.17.0.3)
matrix (0.4.2)
mini_mime (1.1.2)
mini_portile2 (2.8.1)
mini_mime (1.1.5)
mini_portile2 (2.8.5)
minitest (5.20.0)
mustermann (3.0.0)
ruby2_keywords (~> 0.0.1)
nio4r (2.5.8)
nokogiri (1.14.0)
mini_portile2 (~> 2.8.0)
mutex_m (0.2.0)
nio4r (2.7.0)
nokogiri (1.16.0)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.14.0-x86_64-linux)
nokogiri (1.16.0-x86_64-linux)
racc (~> 1.4)
parallel (1.22.1)
parser (3.2.0.0)
parallel (1.24.0)
parser (3.3.0.2)
ast (~> 2.4.1)
public_suffix (5.0.1)
puma (6.0.2)
racc
psych (5.1.2)
stringio
public_suffix (5.0.4)
puma (6.4.1)
nio4r (~> 2.0)
racc (1.6.2)
rack (2.2.6.2)
rack-protection (3.0.5)
rack
rack-test (2.0.2)
racc (1.7.3)
rack (2.2.8)
rack-protection (3.2.0)
base64 (>= 0.1.0)
rack (~> 2.2, >= 2.2.4)
rack-test (2.1.0)
rack (>= 1.3)
rainbow (3.1.1)
regexp_parser (2.6.2)
reline (0.3.2)
rdoc (6.6.2)
psych (>= 4.0.0)
regexp_parser (2.8.3)
reline (0.4.2)
io-console (~> 0.5)
rexml (3.2.5)
rexml (3.2.6)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.0)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.2)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.3)
rspec-mocks (3.12.6)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
rubocop (1.30.1)
rspec-support (3.12.1)
rubocop (1.59.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.1.0.0)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.18.0, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.24.1)
parser (>= 3.1.1.0)
rubocop-rspec (2.11.1)
rubocop (~> 1.19)
ruby-progressbar (1.11.0)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.20.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.25.0)
rubocop (~> 1.33)
rubocop-rails (2.23.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-rspec (2.26.1)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
selenium-webdriver (4.7.1)
selenium-webdriver (4.16.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
sinatra (3.0.5)
sinatra (3.2.0)
mustermann (~> 3.0)
rack (~> 2.2, >= 2.2.4)
rack-protection (= 3.0.5)
rack-protection (= 3.2.0)
tilt (~> 2.0)
tilt (2.0.11)
unicode-display_width (2.4.2)
websocket (1.2.9)
stringio (3.1.0)
tilt (2.3.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
websocket (1.2.10)
xpath (3.2.0)
nokogiri (~> 1.8)

@@ -123,4 +169,4 @@ DEPENDENCIES
sinatra

BUNDLED WITH
2.4.5
2.4.7
11 changes: 2 additions & 9 deletions capybara_accessible_selectors.gemspec
Original file line number Diff line number Diff line change
@@ -10,16 +10,9 @@ Gem::Specification.new do |s|
s.files = Dir["lib/**/*.rb"]
s.authors = ["Daniel Lewis", "Sean Doyle"]
s.license = "ISC"
s.required_ruby_version = ">= 2.7.0"
s.required_ruby_version = ">= 3.0.0"

s.add_runtime_dependency "capybara", ">= 3.36.0"
s.add_runtime_dependency "capybara", "~> 3.36"

s.add_development_dependency "debug"
s.add_development_dependency "puma"
s.add_development_dependency "rack-test"
s.add_development_dependency "rspec"
s.add_development_dependency "rubocop"
s.add_development_dependency "selenium-webdriver"
s.add_development_dependency "sinatra"
s.metadata["rubygems_mfa_required"] = "true"
end
4 changes: 2 additions & 2 deletions lib/capybara_accessible_selectors/selectors/article.rb
Original file line number Diff line number Diff line change
@@ -26,8 +26,8 @@ module Session
#
# @param [String] Name Article label
# @param [Hash] options Finder options
def within_article(*arguments, **options, &block)
within(:article, *arguments, **options, &block)
def within_article(...)
within(:article, ...)
end
end
end
4 changes: 2 additions & 2 deletions lib/capybara_accessible_selectors/selectors/banner.rb
Original file line number Diff line number Diff line change
@@ -28,8 +28,8 @@ module Session
#
# @param [String] Name Banner label
# @param [Hash] options Finder options
def within_banner(*arguments, **options, &block)
within(:banner, *arguments, **options, &block)
def within_banner(...)
within(:banner, ...)
end
end
end
4 changes: 2 additions & 2 deletions lib/capybara_accessible_selectors/selectors/contentinfo.rb
Original file line number Diff line number Diff line change
@@ -28,8 +28,8 @@ module Session
#
# @param [String] Name Contentinfo label
# @param [Hash] options Finder options
def within_contentinfo(*arguments, **options, &block)
within(:contentinfo, *arguments, **options, &block)
def within_contentinfo(...)
within(:contentinfo, ...)
end
end
end
4 changes: 2 additions & 2 deletions lib/capybara_accessible_selectors/selectors/disclosure.rb
Original file line number Diff line number Diff line change
@@ -139,8 +139,8 @@ module Session
#
# @param [String] Name Fieldset label
# @param [Hash] options Finder options
def within_disclosure(name, **options, &block)
within(:disclosure, name, **options, &block)
def within_disclosure(...)
within(:disclosure, ...)
end
end
end
16 changes: 8 additions & 8 deletions lib/capybara_accessible_selectors/selectors/grid.rb
Original file line number Diff line number Diff line change
@@ -131,32 +131,32 @@ module Session
#
# @param [String] Name Columnheader label
# @param [Hash] options Finder options
def within_columnheader(*arguments, **options, &block)
within(:columnheader, *arguments, **options, &block)
def within_columnheader(...)
within(:columnheader, ...)
end

# Limit supplied block to within a grid
#
# @param [String] Name Grid label
# @param [Hash] options Finder options
def within_grid(*arguments, **options, &block)
within(:grid, *arguments, **options, &block)
def within_grid(...)
within(:grid, ...)
end

# Limit supplied block to within a gridcell
#
# @param [String] Name Gridcell label
# @param [Hash] options Finder options
def within_gridcell(*arguments, **options, &block)
within(:gridcell, *arguments, **options, &block)
def within_gridcell(...)
within(:gridcell, ...)
end

# Limit supplied block to within a row
#
# @param [String] Name Row label
# @param [Hash] options Finder options
def within_row(*arguments, **options, &block)
within(:row, *arguments, **options, &block)
def within_row(...)
within(:row, ...)
end
end
end
4 changes: 2 additions & 2 deletions lib/capybara_accessible_selectors/selectors/main.rb
Original file line number Diff line number Diff line change
@@ -28,8 +28,8 @@ module Session
#
# @param [String] Name Main label
# @param [Hash] options Finder options
def within_main(*arguments, **options, &block)
within(:main, *arguments, **options, &block)
def within_main(...)
within(:main, ...)
end
end
end
4 changes: 2 additions & 2 deletions lib/capybara_accessible_selectors/selectors/modal.rb
Original file line number Diff line number Diff line change
@@ -33,8 +33,8 @@ module Session
#
# @param [String] Name Modal label
# @param [Hash] options Finder options
def within_modal(name, **options, &block)
within(:modal, name, **options, &block)
def within_modal(...)
within(:modal, ...)
end
end
end
4 changes: 2 additions & 2 deletions lib/capybara_accessible_selectors/selectors/navigation.rb
Original file line number Diff line number Diff line change
@@ -26,8 +26,8 @@ module Session
#
# @param [String] Name Navigation label
# @param [Hash] options Finder options
def within_navigation(*arguments, **options, &block)
within(:navigation, *arguments, **options, &block)
def within_navigation(...)
within(:navigation, ...)
end
end
end
Loading

0 comments on commit 5cc54d4

Please sign in to comment.