capybara-accessible 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/capybara/accessible/auditor.rb +12 -10
- data/lib/capybara/accessible/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34e9cb5204d67277e25fe66b6106f58c6246f529
|
4
|
+
data.tar.gz: 9bf9d1f6093ee9641ed37022754ac074cabb399b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e170aad31e1620e4614a6afeec1d73de255aa774cbd9fe770e531078de00c49c9b8250a3035cb0cc27f33d4995f29f35579a8f451850af5203bbbd58191fbd3
|
7
|
+
data.tar.gz: 5fc039b56b56191d6a160da37836e69ed592e6e9f41ed75cc1256775aee4d2ee4df143614134de234ddb3714d733494734c5859ac4083d53bb7ca11694733c65
|
data/Gemfile.lock
CHANGED
@@ -15,22 +15,24 @@ module Capybara::Accessible
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def audit_failures
|
18
|
-
|
19
|
-
var config = new axs.AuditConfiguration();
|
20
|
-
config.auditRulesToIgnore = #{excluded_rules.to_json};
|
21
|
-
results = axs.Audit.run(config);
|
22
|
-
return axs.Audit.auditResults(results).getErrors();
|
23
|
-
JAVASCRIPT
|
24
|
-
|
25
|
-
run_script("#{audit_rules} #{script}")
|
18
|
+
run_script("#{perform_audit_script} return axs.Audit.auditResults(results).getErrors();")
|
26
19
|
end
|
27
20
|
|
28
21
|
def failure_messages
|
29
|
-
run_script("#{
|
22
|
+
run_script("#{perform_audit_script} return axs.Audit.createReport(results)")
|
30
23
|
end
|
31
24
|
|
32
25
|
private
|
33
26
|
|
27
|
+
def perform_audit_script
|
28
|
+
<<-JAVASCRIPT
|
29
|
+
#{audit_rules}
|
30
|
+
var config = new axs.AuditConfiguration();
|
31
|
+
config.auditRulesToIgnore = #{excluded_rules.to_json};
|
32
|
+
var results = axs.Audit.run(config);
|
33
|
+
JAVASCRIPT
|
34
|
+
end
|
35
|
+
|
34
36
|
def excluded_rules
|
35
37
|
codes = Capybara::Accessible::Auditor.exclusions
|
36
38
|
mapping = {
|
@@ -51,7 +53,7 @@ module Capybara::Accessible
|
|
51
53
|
# 'AX_ARIA_05' => '', # This has no rule associated with it
|
52
54
|
}
|
53
55
|
|
54
|
-
|
56
|
+
codes.map { |code| mapping[code]}
|
55
57
|
end
|
56
58
|
|
57
59
|
def run_script(script)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-accessible
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Case Commons
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|