guard-scss-lint 0.0.1alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.rubocop.yml +57 -0
- data/.yardopts +1 -0
- data/Gemfile +16 -0
- data/LICENSE.txt +23 -0
- data/README.md +113 -0
- data/Rakefile +13 -0
- data/guard-scss-lint.gemspec +33 -0
- data/lib/guard/scss-lint.rb +110 -0
- data/lib/guard/scss-lint/runner.rb +131 -0
- data/lib/guard/scss-lint/templates/Guardfile +3 -0
- data/lib/guard/scss-lint/version.rb +16 -0
- data/lib/guard/scsslint.rb +2 -0
- data/spec/.rubocop.yml +12 -0
- metadata +191 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 600702aa7cc75cac7231d2e55a29036f93800a7b
|
4
|
+
data.tar.gz: 3c01059f27f088d790ca57e65293f5a1801ecd40
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 242584fd1aae0967d7ff87878b474414712909b6b158357c1d46ff205b24a0d893e30c24243e1ce327ac4427aa0b215d3a82c6062a697a02e7436fc1a94394cc
|
7
|
+
data.tar.gz: 310ab0dc06d49efc0759f5674914be1100cef36d7cda12188a656bbfc5c5f5a3eb9932a85413720b91856e51a7e0cf84e424cf342b0df1fd4736fb3c100a22d4
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
Style/Documentation:
|
2
|
+
Enabled: false
|
3
|
+
|
4
|
+
Style/CollectionMethods:
|
5
|
+
Enabled: false
|
6
|
+
|
7
|
+
Style/EachWithObject:
|
8
|
+
Enabled: false
|
9
|
+
|
10
|
+
Style/StringLiterals:
|
11
|
+
Enabled: false
|
12
|
+
|
13
|
+
Style/SignalException:
|
14
|
+
Enabled: false
|
15
|
+
|
16
|
+
Style/TrailingComma:
|
17
|
+
EnforcedStyleForMultiline: no_comma
|
18
|
+
|
19
|
+
Style/AlignHash:
|
20
|
+
EnforcedLastArgumentHashStyle: ignore_implicit
|
21
|
+
|
22
|
+
Style/AlignParameters:
|
23
|
+
EnforcedStyle: with_fixed_indentation
|
24
|
+
|
25
|
+
Style/CaseIndentation:
|
26
|
+
IndentOneStep: true
|
27
|
+
|
28
|
+
Style/SingleLineBlockParams:
|
29
|
+
Enabled: false
|
30
|
+
|
31
|
+
Metrics/BlockNesting:
|
32
|
+
Max: 2
|
33
|
+
|
34
|
+
Metrics/MethodLength:
|
35
|
+
Max: 7
|
36
|
+
|
37
|
+
Metrics/ParameterLists:
|
38
|
+
Max: 4
|
39
|
+
|
40
|
+
Metrics/LineLength:
|
41
|
+
Exclude:
|
42
|
+
- '**/Guardfile'
|
43
|
+
- guard-scss-lint.gemspec
|
44
|
+
|
45
|
+
Style/GlobalVars:
|
46
|
+
Exclude:
|
47
|
+
- '**/Guardfile'
|
48
|
+
- test/support/guard/*.rb
|
49
|
+
|
50
|
+
Style/FileName:
|
51
|
+
Exclude:
|
52
|
+
- '**/scss-lint.rb'
|
53
|
+
|
54
|
+
Style/RegexpLiteral:
|
55
|
+
Exclude:
|
56
|
+
- '**/Guardfile'
|
57
|
+
- guard-scss-lint.gemspec
|
data/.yardopts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--markup markdown
|
data/Gemfile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gemspec
|
4
|
+
|
5
|
+
group :test do
|
6
|
+
gem 'coveralls', '~> 0.6'
|
7
|
+
gem 'simplecov-rcov', '~> 0.2'
|
8
|
+
gem 'ci_reporter', '~> 1.8'
|
9
|
+
end
|
10
|
+
|
11
|
+
platforms :rbx do
|
12
|
+
gem 'rubysl'
|
13
|
+
gem 'rubinius-developer_tools'
|
14
|
+
gem 'json'
|
15
|
+
gem 'racc' # Needed for RuboCop
|
16
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
COPYRIGHT (C) 2014 ADAM EBERLIN
|
2
|
+
COPYRIGHT (C) 2013 YUJI NAKAYAMA
|
3
|
+
|
4
|
+
MIT LICENSE
|
5
|
+
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
7
|
+
a copy of this software and associated documentation files (the
|
8
|
+
"Software"), to deal in the Software without restriction, including
|
9
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
10
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
11
|
+
permit persons to whom the Software is furnished to do so, subject to
|
12
|
+
the following conditions:
|
13
|
+
|
14
|
+
The above copyright notice and this permission notice shall be
|
15
|
+
included in all copies or substantial portions of the Software.
|
16
|
+
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
18
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
19
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
20
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
21
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
22
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
23
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,113 @@
|
|
1
|
+
<!--
|
2
|
+
[![Gem Version](http://img.shields.io/gem/v/guard-scss-lint.svg)](http://badge.fury.io/rb/guard-scss-lint)
|
3
|
+
-->
|
4
|
+
|
5
|
+
[![Dependency Status](http://img.shields.io/gemnasium/arkbot/guard-scss-lint.svg)](https://gemnasium.com/arkbot/guard-scss-lint)
|
6
|
+
[![Build Status](https://travis-ci.org/arkbot/guard-scss-lint.svg?branch=master)](https://travis-ci.org/arkbot/guard-scss-lint)
|
7
|
+
[![Coverage Status](https://img.shields.io/coveralls/arkbot/guard-scss-lint/master.svg)](https://coveralls.io/r/arkbot/guard-scss-lint)
|
8
|
+
[![Code Climate](http://img.shields.io/codeclimate/github/arkbot/guard-scss-lint.svg)](https://codeclimate.com/github/arkbot/guard-scss-lint)
|
9
|
+
|
10
|
+
# guard-scss-lint
|
11
|
+
|
12
|
+
**guard-scss-lint** automatically checks your SCSS code style with [scss-lint](https://github.com/causes/scss-lint/) when files are modified.
|
13
|
+
|
14
|
+
Tested on MRI 1.9, 2.0, 2.1, JRuby in 1.9 mode and Rubinius.
|
15
|
+
|
16
|
+
## Installation
|
17
|
+
|
18
|
+
Please make sure to have [Guard](https://github.com/guard/guard) installed before continue.
|
19
|
+
|
20
|
+
Add `guard-scss-lint` to your `Gemfile`:
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
group :development do
|
24
|
+
gem 'guard-scss-lint'
|
25
|
+
end
|
26
|
+
```
|
27
|
+
|
28
|
+
and then execute:
|
29
|
+
|
30
|
+
```sh
|
31
|
+
$ bundle install
|
32
|
+
```
|
33
|
+
|
34
|
+
or install it yourself as:
|
35
|
+
|
36
|
+
```sh
|
37
|
+
$ gem install guard-scss-lint
|
38
|
+
```
|
39
|
+
|
40
|
+
Add the default Guard::ScssLint definition to your `Guardfile` by running:
|
41
|
+
|
42
|
+
```sh
|
43
|
+
$ guard init scsslint
|
44
|
+
```
|
45
|
+
|
46
|
+
## Usage
|
47
|
+
|
48
|
+
Please read the [Guard usage documentation](https://github.com/guard/guard#readme).
|
49
|
+
|
50
|
+
## Options
|
51
|
+
|
52
|
+
You can pass some options in `Guardfile` like the following example:
|
53
|
+
|
54
|
+
```ruby
|
55
|
+
guard :scsslint, all_on_start: false do
|
56
|
+
# ...
|
57
|
+
end
|
58
|
+
```
|
59
|
+
|
60
|
+
### Available Options
|
61
|
+
|
62
|
+
```ruby
|
63
|
+
all_on_start: true # Check all files at Guard startup.
|
64
|
+
# default: true
|
65
|
+
cli: '--some-opts' # Pass arbitrary scss-lint CLI arguments.
|
66
|
+
# An array or string is acceptable.
|
67
|
+
# default: nil
|
68
|
+
hide_stdout: false # Do not display console output (in case outputting to file).
|
69
|
+
# default: false
|
70
|
+
keep_failed: true # Keep failed files until they pass.
|
71
|
+
# default: true
|
72
|
+
notification: :failed # Display Growl notification after each run.
|
73
|
+
# true - Always notify
|
74
|
+
# false - Never notify
|
75
|
+
# :failed - Notify only when failed
|
76
|
+
# default: :failed
|
77
|
+
```
|
78
|
+
|
79
|
+
## Advanced Tips
|
80
|
+
|
81
|
+
If you're using a testing Guard plugin such as [`guard-rspec`](https://github.com/guard/guard-rspec) together with `guard-scss-lint` in the TDD way (the red-green-refactor cycle),
|
82
|
+
you might be uncomfortable with the offense reports from scss-lint in the red-green phase:
|
83
|
+
|
84
|
+
In this case, you may find the following `Guardfile` structure useful:
|
85
|
+
|
86
|
+
```ruby
|
87
|
+
# This group allows to skip running scss-lint when RSpec failed.
|
88
|
+
group :red_green_refactor, halt_on_fail: true do
|
89
|
+
guard :rspec do
|
90
|
+
# ...
|
91
|
+
end
|
92
|
+
|
93
|
+
guard :scsslint do
|
94
|
+
# ...
|
95
|
+
end
|
96
|
+
end
|
97
|
+
```
|
98
|
+
|
99
|
+
## Contributing
|
100
|
+
|
101
|
+
1. Fork it
|
102
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
103
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
104
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
105
|
+
5. Create new Pull Request
|
106
|
+
|
107
|
+
## MIT License
|
108
|
+
|
109
|
+
See the [LICENSE.txt](LICENSE.txt) for details.
|
110
|
+
|
111
|
+
## Credits
|
112
|
+
|
113
|
+
Yuji Nakayama's gem [`guard-rubocop`](https://github.com/bbatsov/rubocop/) made this project possible amidst my numerous time constraints.
|
data/Rakefile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
require 'bundler/gem_tasks'
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
require 'rubocop/rake_task'
|
6
|
+
|
7
|
+
RSpec::Core::RakeTask.new(:spec)
|
8
|
+
RuboCop::RakeTask.new(:style)
|
9
|
+
|
10
|
+
desc 'Run RSpec and RuboCop'
|
11
|
+
task all: [:spec, :style]
|
12
|
+
|
13
|
+
task default: :all
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
|
6
|
+
require 'guard/scss-lint/version'
|
7
|
+
|
8
|
+
Gem::Specification.new do |spec|
|
9
|
+
spec.name = 'guard-scss-lint'
|
10
|
+
spec.version = Guard::ScssLintVersion.to_s
|
11
|
+
spec.authors = ['Adam Eberlin']
|
12
|
+
spec.email = ['ae@adameberlin.com']
|
13
|
+
spec.summary = 'Guard plugin for scss-lint'
|
14
|
+
spec.description = 'Automatically checks SCSS style with scss-lint when files are modified.'
|
15
|
+
spec.homepage = 'https://github.com/arkbot/guard-scss-lint'
|
16
|
+
spec.license = 'MIT'
|
17
|
+
|
18
|
+
spec.files = `git ls-files -z`.split("\x0")
|
19
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
20
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
21
|
+
spec.require_paths = ['lib']
|
22
|
+
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
24
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
25
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
26
|
+
spec.add_development_dependency 'simplecov', '~> 0.7'
|
27
|
+
spec.add_development_dependency 'guard-rspec', '>= 4.2.3', '< 5.0'
|
28
|
+
spec.add_development_dependency 'rubocop', '~> 0.20'
|
29
|
+
spec.add_development_dependency 'ruby_gntp', '~> 0.3'
|
30
|
+
|
31
|
+
spec.add_runtime_dependency 'guard', '~> 2.0'
|
32
|
+
spec.add_runtime_dependency 'scss-lint', '~> 0.30.0'
|
33
|
+
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
require 'guard'
|
4
|
+
require 'guard/plugin'
|
5
|
+
|
6
|
+
module Guard
|
7
|
+
# This class gets API calls from `guard` and runs `scss-lint` command via
|
8
|
+
# {Guard::ScssLint::Runner}. An instance of this class stays alive in a
|
9
|
+
# `guard` command session.
|
10
|
+
class ScssLint < Plugin
|
11
|
+
autoload :Runner, 'guard/scss-lint/runner'
|
12
|
+
|
13
|
+
attr_reader :options, :failed_paths
|
14
|
+
|
15
|
+
def initialize(options = nil)
|
16
|
+
super
|
17
|
+
|
18
|
+
merge_with_default_opts(options)
|
19
|
+
|
20
|
+
@failed_paths = []
|
21
|
+
end
|
22
|
+
|
23
|
+
def merge_with_default_opts(options = {})
|
24
|
+
@options = {
|
25
|
+
all_on_start: true,
|
26
|
+
keep_failed: true,
|
27
|
+
notification: :failed,
|
28
|
+
cli: nil,
|
29
|
+
hide_stdout: false
|
30
|
+
}.merge(options)
|
31
|
+
end
|
32
|
+
|
33
|
+
def start
|
34
|
+
run_all if @options[:all_on_start]
|
35
|
+
end
|
36
|
+
|
37
|
+
def run_all
|
38
|
+
UI.info 'Inspecting SCSS code style of all files'
|
39
|
+
inspect_with_scsslint
|
40
|
+
end
|
41
|
+
|
42
|
+
def run_on_additions(paths)
|
43
|
+
run_partially(paths)
|
44
|
+
end
|
45
|
+
|
46
|
+
def run_on_modifications(paths)
|
47
|
+
# run_partially(paths)
|
48
|
+
inspect_with_scsslint(paths)
|
49
|
+
end
|
50
|
+
|
51
|
+
def reload
|
52
|
+
@failed_paths = []
|
53
|
+
end
|
54
|
+
|
55
|
+
private
|
56
|
+
|
57
|
+
def run_partially(paths)
|
58
|
+
paths += @failed_paths if @options[:keep_failed]
|
59
|
+
paths = clean_paths(paths)
|
60
|
+
|
61
|
+
return if paths.empty?
|
62
|
+
|
63
|
+
displayed_paths = paths.map { |path| smart_path(path) }
|
64
|
+
UI.info "Inspecting SCSS code style: #{displayed_paths.join(' ')}"
|
65
|
+
|
66
|
+
inspect_with_scsslint(paths)
|
67
|
+
end
|
68
|
+
|
69
|
+
def inspect_with_scsslint(paths = [])
|
70
|
+
runner = Runner.new(@options)
|
71
|
+
passed = runner.run(paths)
|
72
|
+
@failed_paths = runner.failed_paths
|
73
|
+
throw :task_has_failed unless passed
|
74
|
+
rescue => error
|
75
|
+
throw_inspect_error(error)
|
76
|
+
end
|
77
|
+
|
78
|
+
def throw_inspect_error(error)
|
79
|
+
error_klazz = error.class.name
|
80
|
+
UI.error 'The following exception occurred while running scss-lint: ' \
|
81
|
+
"#{error.backtrace.first} #{error.message} (#{error_klazz})"
|
82
|
+
end
|
83
|
+
|
84
|
+
def clean_paths(paths)
|
85
|
+
paths = paths.dup
|
86
|
+
paths.map! { |path| File.expand_path(path) }.uniq!
|
87
|
+
paths.reject! do |path|
|
88
|
+
next true unless File.exist?(path)
|
89
|
+
included_in_other_path?(path, paths)
|
90
|
+
end
|
91
|
+
paths
|
92
|
+
end
|
93
|
+
|
94
|
+
def included_in_other_path?(target_path, other_paths)
|
95
|
+
dir_paths = other_paths.select { |path| File.directory?(path) }
|
96
|
+
dir_paths.delete(target_path)
|
97
|
+
dir_paths.any? do |dir_path|
|
98
|
+
target_path.start_with?(dir_path)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
def smart_path(path)
|
103
|
+
if path.start_with?(Dir.pwd)
|
104
|
+
Pathname.new(path).relative_path_from(Pathname.getwd).to_s
|
105
|
+
else
|
106
|
+
path
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,131 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
require 'json'
|
4
|
+
|
5
|
+
module Guard
|
6
|
+
class ScssLint
|
7
|
+
# This class runs `scss-lint` command, retrieves result and notifies. An
|
8
|
+
# instance of this class is intended to invoke `scss-lint` only once in
|
9
|
+
# its lifetime.
|
10
|
+
class Runner
|
11
|
+
|
12
|
+
def initialize(options)
|
13
|
+
@options = options
|
14
|
+
end
|
15
|
+
|
16
|
+
def run(paths = [])
|
17
|
+
command = build_command(paths)
|
18
|
+
passed = system(*command)
|
19
|
+
handle_notifications(passed)
|
20
|
+
passed
|
21
|
+
end
|
22
|
+
|
23
|
+
def handle_notifications(passed)
|
24
|
+
case @options[:notification]
|
25
|
+
when :failed then notify(passed) unless passed
|
26
|
+
when true then notify(passed)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def build_command(paths)
|
31
|
+
command = build_formatters_for_command(['scss-lint'])
|
32
|
+
command.concat(args_specified_by_user)
|
33
|
+
command.concat(paths)
|
34
|
+
end
|
35
|
+
|
36
|
+
def build_formatters_for_command(command)
|
37
|
+
command.concat(['--format', 'JSON', '--out', json_file_path])
|
38
|
+
|
39
|
+
# Keep default formatter for console.
|
40
|
+
unless include_formatter_for_console?(args_specified_by_user)
|
41
|
+
command.concat(%w(--format Default))
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def args_specified_by_user(args = @options[:cli])
|
46
|
+
@args_specified_by_user ||= begin
|
47
|
+
case args
|
48
|
+
when Array, String then handle_args_array_or_string(args)
|
49
|
+
when NilClass then []
|
50
|
+
else fail ':cli option must be either an array or string'
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def handle_args_array_or_string(args)
|
56
|
+
args.is_a?(Array) ? args : args.shellsplit
|
57
|
+
end
|
58
|
+
|
59
|
+
def include_formatter_for_console?(cli_args)
|
60
|
+
return true if @options[:hide_stdout]
|
61
|
+
|
62
|
+
formatter_args(cli_args).each_value.any? do |args|
|
63
|
+
args.none? { |a| a == '--out' || a.start_with?('-o') }
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def formatter_args(cli_args)
|
68
|
+
index = -1
|
69
|
+
args = cli_args.group_by do |arg|
|
70
|
+
index += 1 if arg == '--format' || arg.start_with?('-f')
|
71
|
+
index
|
72
|
+
end
|
73
|
+
args.delete(-1)
|
74
|
+
args
|
75
|
+
end
|
76
|
+
|
77
|
+
def json_file_path
|
78
|
+
@json_file_path ||= begin
|
79
|
+
# Just generate random tempfile path.
|
80
|
+
basename = self.class.name.downcase.gsub('::', '_')
|
81
|
+
tempfile = Tempfile.new(basename)
|
82
|
+
tempfile.close
|
83
|
+
tempfile.path
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
def result
|
88
|
+
@result ||= begin
|
89
|
+
File.open(json_file_path) do |file|
|
90
|
+
# Rubinius 2.0.0.rc1 does not support `JSON.load` with 3 args.
|
91
|
+
JSON.parse(file.read)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
def notify(passed)
|
97
|
+
image = passed ? :success : :failed
|
98
|
+
Notifier.notify(summary_text, title: 'scss-lint results', image: image)
|
99
|
+
end
|
100
|
+
|
101
|
+
def summary_text
|
102
|
+
offense_count, file_count = 0, 0
|
103
|
+
result.each do |file, offenses|
|
104
|
+
file_count += 1
|
105
|
+
offense_count += offenses.size
|
106
|
+
end
|
107
|
+
text = pluralize(file_count, 'file')
|
108
|
+
text << ' inspected, '
|
109
|
+
|
110
|
+
text << pluralize(offense_count, 'offense', no_for_zero: true)
|
111
|
+
text << ' detected'
|
112
|
+
end
|
113
|
+
|
114
|
+
def failed_paths
|
115
|
+
failed_files = result.reject do |file, offenses|
|
116
|
+
offenses.empty?
|
117
|
+
end
|
118
|
+
failed_files.to_a.collect(&:first)
|
119
|
+
end
|
120
|
+
|
121
|
+
def pluralize(number, thing, options = {})
|
122
|
+
if number == 0 && options[:no_for_zero]
|
123
|
+
text = 'no'
|
124
|
+
else
|
125
|
+
text = number.to_s
|
126
|
+
end
|
127
|
+
text << (number == 1 ? " #{thing}" : " #{thing}s")
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
module Guard
|
4
|
+
# A workaround for declaring `class ScssLint`
|
5
|
+
# before `class ScssLint < Guard` in scss-lint.rb
|
6
|
+
module ScssLintVersion
|
7
|
+
# http://semver.org/
|
8
|
+
MAJOR = 0
|
9
|
+
MINOR = 0
|
10
|
+
PATCH = '1alpha'
|
11
|
+
|
12
|
+
def self.to_s
|
13
|
+
[MAJOR, MINOR, PATCH].join('.')
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/spec/.rubocop.yml
ADDED
metadata
ADDED
@@ -0,0 +1,191 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: guard-scss-lint
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1alpha
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Adam Eberlin
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-11-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: simplecov
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.7'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.7'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: guard-rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 4.2.3
|
76
|
+
- - "<"
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '5.0'
|
79
|
+
type: :development
|
80
|
+
prerelease: false
|
81
|
+
version_requirements: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: 4.2.3
|
86
|
+
- - "<"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '5.0'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: rubocop
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0.20'
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0.20'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: ruby_gntp
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0.3'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0.3'
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: guard
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '2.0'
|
124
|
+
type: :runtime
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - "~>"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '2.0'
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: scss-lint
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - "~>"
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: 0.30.0
|
138
|
+
type: :runtime
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - "~>"
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: 0.30.0
|
145
|
+
description: Automatically checks SCSS style with scss-lint when files are modified.
|
146
|
+
email:
|
147
|
+
- ae@adameberlin.com
|
148
|
+
executables: []
|
149
|
+
extensions: []
|
150
|
+
extra_rdoc_files: []
|
151
|
+
files:
|
152
|
+
- ".gitignore"
|
153
|
+
- ".rubocop.yml"
|
154
|
+
- ".yardopts"
|
155
|
+
- Gemfile
|
156
|
+
- LICENSE.txt
|
157
|
+
- README.md
|
158
|
+
- Rakefile
|
159
|
+
- guard-scss-lint.gemspec
|
160
|
+
- lib/guard/scss-lint.rb
|
161
|
+
- lib/guard/scss-lint/runner.rb
|
162
|
+
- lib/guard/scss-lint/templates/Guardfile
|
163
|
+
- lib/guard/scss-lint/version.rb
|
164
|
+
- lib/guard/scsslint.rb
|
165
|
+
- spec/.rubocop.yml
|
166
|
+
homepage: https://github.com/arkbot/guard-scss-lint
|
167
|
+
licenses:
|
168
|
+
- MIT
|
169
|
+
metadata: {}
|
170
|
+
post_install_message:
|
171
|
+
rdoc_options: []
|
172
|
+
require_paths:
|
173
|
+
- lib
|
174
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
175
|
+
requirements:
|
176
|
+
- - ">="
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: '0'
|
179
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
180
|
+
requirements:
|
181
|
+
- - ">"
|
182
|
+
- !ruby/object:Gem::Version
|
183
|
+
version: 1.3.1
|
184
|
+
requirements: []
|
185
|
+
rubyforge_project:
|
186
|
+
rubygems_version: 2.4.2
|
187
|
+
signing_key:
|
188
|
+
specification_version: 4
|
189
|
+
summary: Guard plugin for scss-lint
|
190
|
+
test_files:
|
191
|
+
- spec/.rubocop.yml
|