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 +4 -4
- data/lib/axe/api/context.rb +2 -2
- data/lib/axe/api/selector.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac49a5be19aecbe7271122ec837505cc8413070e680e9ff584a6611c46ecf7b5
|
4
|
+
data.tar.gz: f42f058f0499fc67057944ecd52f1dc0f63a05edc708ad6ab6cf8010ef4641b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff64663c9e06dae63c677904bb40aa527da7af465c7d9c20b6233a67a31082fe2036bc98d00eb8b14e1a81c76078b1f89bca60f54c926d88d89da2aa58177fdd
|
7
|
+
data.tar.gz: c923d1064ea5a7368db69ca2dfd7e380df5e19a1d7e246a5abdd91172ec10ae2baff8109ff1c26017ff36c7e2a0b5914ba6cbe3cf6eface2e5d75775befadd50
|
data/lib/axe/api/context.rb
CHANGED
@@ -9,11 +9,11 @@ module Axe
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def within(*selectors)
|
12
|
-
@inclusion.concat selectors.map { |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|
|
16
|
+
@exclusion.concat selectors.map { |s| Selector::normalize s }
|
17
17
|
end
|
18
18
|
|
19
19
|
def to_h
|
data/lib/axe/api/selector.rb
CHANGED
@@ -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.
|
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:
|
11
|
+
date: 2023-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dumb_delegator
|