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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ac095c1cbae4d4f383b2d82ff785b7c42297f467
4
- data.tar.gz: 545f83a936a547ed9231b77513f4b48bdc9d0ec0
3
+ metadata.gz: 34e9cb5204d67277e25fe66b6106f58c6246f529
4
+ data.tar.gz: 9bf9d1f6093ee9641ed37022754ac074cabb399b
5
5
  SHA512:
6
- metadata.gz: 7cbd721bdd6d6db70718053a2b9a1e2ec37982db2d06df2620b50ee23072a5f51aba46adf5cf3b9efccb225a69be8940e0fac54cfee6f67c3ecbd9f63ab67f67
7
- data.tar.gz: 73b0d915dbde5ce90f0d0b617e412f4b41666249dfba82dbf5b539d37c08129028bb25e3efc18877b0d54aeabcf5d2aac3ad6ee019752ad7204f9b498a94ff26
6
+ metadata.gz: 8e170aad31e1620e4614a6afeec1d73de255aa774cbd9fe770e531078de00c49c9b8250a3035cb0cc27f33d4995f29f35579a8f451850af5203bbbd58191fbd3
7
+ data.tar.gz: 5fc039b56b56191d6a160da37836e69ed592e6e9f41ed75cc1256775aee4d2ee4df143614134de234ddb3714d733494734c5859ac4083d53bb7ca11694733c65
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capybara-accessible (0.0.1)
4
+ capybara-accessible (0.1.0)
5
5
  capybara (~> 2.0, >= 2.0.2)
6
6
  selenium-webdriver
7
7
 
@@ -15,22 +15,24 @@ module Capybara::Accessible
15
15
  end
16
16
 
17
17
  def audit_failures
18
- script =<<-JAVASCRIPT
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("#{audit_rules} var results = axs.Audit.run(); return axs.Audit.createReport(results)")
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
- names = codes.map { |code| mapping[code]}
56
+ codes.map { |code| mapping[code]}
55
57
  end
56
58
 
57
59
  def run_script(script)
@@ -1,5 +1,5 @@
1
1
  module Capybara
2
2
  module Accessible
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
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.0
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-02 00:00:00.000000000 Z
11
+ date: 2013-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara