axe-core-api 4.5.1.pre.9dea670 → 4.5.1.pre.9e72a1b

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: 69c4b714fd9b5712f374385fe07006a19228385580456a94ddb3b787ba308026
4
- data.tar.gz: 01634af8405c7b9b5efd0c8c568115d5b0c8ee2d71b75f312a654b59caf2edc8
3
+ metadata.gz: ac49a5be19aecbe7271122ec837505cc8413070e680e9ff584a6611c46ecf7b5
4
+ data.tar.gz: f42f058f0499fc67057944ecd52f1dc0f63a05edc708ad6ab6cf8010ef4641b5
5
5
  SHA512:
6
- metadata.gz: 64b5e1b97cee3f42884e575ae684b0d0fc8bfbbee39af64dc8a04661727073335bad9e5f478e4a86856f0a25c269508f4d05a2e39b447bf00c760f0b4f315850
7
- data.tar.gz: 6942c910e6af5c9a2bb75d19914950e8418303ca35eef53786a9bbc36a2f10cdb3d35e0850f7b8ba3c29c3dd4c9c5ac7e96c590ff7f2532a34cb964bc8d9ed80
6
+ metadata.gz: ff64663c9e06dae63c677904bb40aa527da7af465c7d9c20b6233a67a31082fe2036bc98d00eb8b14e1a81c76078b1f89bca60f54c926d88d89da2aa58177fdd
7
+ data.tar.gz: c923d1064ea5a7368db69ca2dfd7e380df5e19a1d7e246a5abdd91172ec10ae2baff8109ff1c26017ff36c7e2a0b5914ba6cbe3cf6eface2e5d75775befadd50
@@ -9,11 +9,11 @@ module Axe
9
9
  end
10
10
 
11
11
  def within(*selectors)
12
- @inclusion.concat selectors.map { |s| Array(Selector.new s) }
12
+ @inclusion.concat selectors.map { |s| Selector::normalize s }
13
13
  end
14
14
 
15
15
  def excluding(*selectors)
16
- @exclusion.concat selectors.map { |s| Array(Selector.new s) }
16
+ @exclusion.concat selectors.map { |s| Selector::normalize s }
17
17
  end
18
18
 
19
19
  def to_h
@@ -1,6 +1,18 @@
1
1
  module Axe
2
2
  module API
3
3
  class Selector
4
+ def self.normalize(s)
5
+ if s.is_a? Hash
6
+ if s.key? :iframe and s.key? :selector
7
+ Array(Selector.new s)
8
+ else
9
+ s
10
+ end
11
+ else
12
+ Array(Selector.new s)
13
+ end
14
+ end
15
+
4
16
  def initialize(s)
5
17
  @selector = case s
6
18
  when Array then s
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: axe-core-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.5.1.pre.9dea670
4
+ version: 4.5.1.pre.9e72a1b
5
5
  platform: ruby
6
6
  authors:
7
7
  - Deque Systems
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-14 00:00:00.000000000 Z
11
+ date: 2023-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dumb_delegator