access_lint 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 243f96d956272aea296a5e54023fe9bc2cd2e7db
4
+ data.tar.gz: 16936267718bd9cf8be818d893b2dd139b406c44
5
+ SHA512:
6
+ metadata.gz: 537d74e137d88fcf6c691ff78fee365c8c2ca0ce077cde94b5f324a863ea04ffc757f66c0a1b4357a3f1003d213a8156fdd8df71519bc07d31509bab483cd877
7
+ data.tar.gz: 0662e4009e8ea87eee770724d2af8224f2e926a67ba49f533749cdff4503a4a0488ffc3c911c923b64fd6a31eb7a870eee3062ba07159c18b6546ba573bc3731
data/.gitmodules ADDED
@@ -0,0 +1,9 @@
1
+ [submodule "vendor/accessibility-developer-tools"]
2
+ path = vendor/accessibility-developer-tools
3
+ url = https://github.com/GoogleChrome/accessibility-developer-tools.git
4
+ [submodule "access-lint"]
5
+ path = access-lint
6
+ url = https://github.com/ckundo/access-lint.git
7
+ [submodule "vendor/access-lint"]
8
+ path = vendor/access-lint
9
+ url = https://github.com/ckundo/access-lint.git
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/Gemfile CHANGED
@@ -2,3 +2,10 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in access_lint.gemspec
4
4
  gemspec
5
+
6
+ group :development do
7
+ gem "rspec"
8
+ gem "pry"
9
+ gem "pry-stack_explorer"
10
+ gem "thor"
11
+ end
data/README.md CHANGED
@@ -17,10 +17,13 @@ Or install it yourself as:
17
17
 
18
18
  ## Usage
19
19
 
20
- $ axsl foo.html
20
+ $ access_lint audit http://localhost:3000/
21
21
 
22
22
  ## Contributing
23
23
 
24
+ $ git submodule update --init --recursive
25
+ $ rake axs:make
26
+
24
27
  1. Fork it
25
28
  2. Create your feature branch (`git checkout -b my-new-feature`)
26
29
  3. Commit your changes (`git commit -am 'Add some feature'`)
data/Rakefile CHANGED
@@ -1 +1,19 @@
1
1
  require "bundler/gem_tasks"
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new do |t|
5
+ t.pattern = "spec/**/*_spec.rb"
6
+ end
7
+
8
+ desc "Default: run all specs"
9
+ task :default => [:spec]
10
+
11
+ task :build => ["axs:make"]
12
+
13
+ desc "Google Accessibility Developer Tools"
14
+ namespace :axs do
15
+ desc "Generate Accessibility Developer Tools axs_testing.js"
16
+ task :make do
17
+ system "cd vendor/accessibility-developer-tools/ && make"
18
+ end
19
+ end
data/access_lint.gemspec CHANGED
@@ -14,9 +14,11 @@ Gem::Specification.new do |spec|
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
+ spec.test_files = spec.files.grep(%r{^spec/})
19
18
  spec.require_paths = ["lib"]
19
+ spec.executables = ['access_lint']
20
+
21
+ spec.add_dependency "thor"
20
22
 
21
23
  spec.add_development_dependency "bundler", "~> 1.3"
22
24
  spec.add_development_dependency "rake"
data/bin/access_lint ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+ $: << File.expand_path("../lib/", __FILE__)
3
+
4
+ Signal.trap("INT") { exit 1 } #
5
+
6
+ require 'access_lint'
7
+ require 'access_lint/cli'
8
+
9
+ AccessLint::CLI.start(ARGV)
data/lib/access_lint.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require "access_lint/version"
2
2
 
3
3
  module AccessLint
4
- # Your code goes here...
4
+ autoload :Audit, 'access_lint/audit'
5
5
  end
@@ -0,0 +1,21 @@
1
+ require 'access_lint'
2
+
3
+ module AccessLint
4
+ class Audit
5
+ RUNNER_PATH = File.expand_path("../../../vendor/access-lint/bin/auditor.js", __FILE__)
6
+
7
+ def initialize(target)
8
+ @target = target
9
+ end
10
+
11
+ def run
12
+ create_report
13
+ end
14
+
15
+ private
16
+
17
+ def create_report
18
+ %x( phantomjs #{RUNNER_PATH} #{@target})
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,11 @@
1
+ require 'thor'
2
+
3
+ module AccessLint
4
+ class CLI < Thor::Group
5
+ desc 'Run an accessibility audit on a target file or url.'
6
+ argument :target
7
+ def audit
8
+ puts Audit.new(target).run
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module AccessLint
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -0,0 +1,14 @@
1
+ require 'spec_helper'
2
+
3
+ module AccessLint
4
+ describe Audit do
5
+ describe '#run' do
6
+ let(:target) { double(:target) }
7
+ it 'returns a string' do
8
+ audit = Audit.new(target).run
9
+ audit.should be_an_instance_of String
10
+ audit.should_not be_empty
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,10 @@
1
+ require 'spec_helper'
2
+ require 'access_lint/cli'
3
+
4
+ module AccessLint
5
+ describe CLI do
6
+ it 'creates an audit' do
7
+ expect { CLI.start }.to_not raise_error
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,5 @@
1
+ $:.unshift File.expand_path('..', __FILE__)
2
+ $:.unshift File.expand_path('../../lib', __FILE__)
3
+ require 'rubygems'
4
+ require 'access_lint'
5
+ require 'rspec'
metadata CHANGED
@@ -1,20 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: access_lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
5
- prerelease:
4
+ version: 0.0.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Cameron Cundiff
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-07-27 00:00:00.000000000 Z
11
+ date: 2013-08-04 00:00:00.000000000 Z
13
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: thor
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
14
27
  - !ruby/object:Gem::Dependency
15
28
  name: bundler
16
29
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
30
  requirements:
19
31
  - - ~>
20
32
  - !ruby/object:Gem::Version
@@ -22,7 +34,6 @@ dependencies:
22
34
  type: :development
23
35
  prerelease: false
24
36
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
37
  requirements:
27
38
  - - ~>
28
39
  - !ruby/object:Gem::Version
@@ -30,67 +41,67 @@ dependencies:
30
41
  - !ruby/object:Gem::Dependency
31
42
  name: rake
32
43
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
44
  requirements:
35
- - - ! '>='
45
+ - - '>='
36
46
  - !ruby/object:Gem::Version
37
47
  version: '0'
38
48
  type: :development
39
49
  prerelease: false
40
50
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
51
  requirements:
43
- - - ! '>='
52
+ - - '>='
44
53
  - !ruby/object:Gem::Version
45
54
  version: '0'
46
55
  description: Run an accessibility audit on a file or URL from the command line.
47
56
  email:
48
57
  - ckundo@gmail.com
49
- executables: []
58
+ executables:
59
+ - access_lint
50
60
  extensions: []
51
61
  extra_rdoc_files: []
52
62
  files:
53
63
  - .gitignore
64
+ - .gitmodules
65
+ - .rspec
54
66
  - Gemfile
55
67
  - LICENSE.txt
56
68
  - README.md
57
69
  - Rakefile
58
70
  - access_lint.gemspec
59
- - access_lint/.gitignore
60
- - access_lint/Gemfile
61
- - access_lint/LICENSE.txt
62
- - access_lint/README.md
63
- - access_lint/Rakefile
64
- - access_lint/access_lint.gemspec
65
- - access_lint/lib/access_lint.rb
66
- - access_lint/lib/access_lint/version.rb
71
+ - bin/access_lint
67
72
  - lib/access_lint.rb
73
+ - lib/access_lint/audit.rb
74
+ - lib/access_lint/cli.rb
68
75
  - lib/access_lint/version.rb
76
+ - spec/access_lint/audit_spec.rb
77
+ - spec/access_lint/cli_spec.rb
78
+ - spec/spec_helper.rb
69
79
  homepage: https://github.com/ckundo/access_lint
70
80
  licenses:
71
81
  - MIT
82
+ metadata: {}
72
83
  post_install_message:
73
84
  rdoc_options: []
74
85
  require_paths:
75
86
  - lib
76
87
  required_ruby_version: !ruby/object:Gem::Requirement
77
- none: false
78
88
  requirements:
79
- - - ! '>='
89
+ - - '>='
80
90
  - !ruby/object:Gem::Version
81
91
  version: '0'
82
92
  required_rubygems_version: !ruby/object:Gem::Requirement
83
- none: false
84
93
  requirements:
85
- - - ! '>='
94
+ - - '>='
86
95
  - !ruby/object:Gem::Version
87
96
  version: '0'
88
97
  requirements: []
89
98
  rubyforge_project:
90
- rubygems_version: 1.8.19
99
+ rubygems_version: 2.0.6
91
100
  signing_key:
92
- specification_version: 3
101
+ specification_version: 4
93
102
  summary: AccessLint runs Google Accessibility Developer Tools assertions on a page
94
103
  via PhantomJS
95
- test_files: []
96
- has_rdoc:
104
+ test_files:
105
+ - spec/access_lint/audit_spec.rb
106
+ - spec/access_lint/cli_spec.rb
107
+ - spec/spec_helper.rb
@@ -1,17 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
data/access_lint/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in access_lint.gemspec
4
- gemspec
@@ -1,22 +0,0 @@
1
- Copyright (c) 2013 Cameron Cundiff
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,29 +0,0 @@
1
- # AccessLint
2
-
3
- TODO: Write a gem description
4
-
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- gem 'access_lint'
10
-
11
- And then execute:
12
-
13
- $ bundle
14
-
15
- Or install it yourself as:
16
-
17
- $ gem install access_lint
18
-
19
- ## Usage
20
-
21
- TODO: Write usage instructions here
22
-
23
- ## Contributing
24
-
25
- 1. Fork it
26
- 2. Create your feature branch (`git checkout -b my-new-feature`)
27
- 3. Commit your changes (`git commit -am 'Add some feature'`)
28
- 4. Push to the branch (`git push origin my-new-feature`)
29
- 5. Create new Pull Request
data/access_lint/Rakefile DELETED
@@ -1 +0,0 @@
1
- require "bundler/gem_tasks"
@@ -1,23 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'access_lint/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "access_lint"
8
- spec.version = AccessLint::VERSION
9
- spec.authors = ["Cameron Cundiff"]
10
- spec.email = ["ckundo@gmail.com"]
11
- spec.description = %q{TODO: Write a gem description}
12
- spec.summary = %q{TODO: Write a gem summary}
13
- spec.homepage = ""
14
- spec.license = "MIT"
15
-
16
- spec.files = `git ls-files`.split($/)
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
20
-
21
- spec.add_development_dependency "bundler", "~> 1.3"
22
- spec.add_development_dependency "rake"
23
- end
@@ -1,5 +0,0 @@
1
- require "access_lint/version"
2
-
3
- module AccessLint
4
- # Your code goes here...
5
- end
@@ -1,3 +0,0 @@
1
- module AccessLint
2
- VERSION = "0.0.1"
3
- end