guard-haml_lint 1.0.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/lint.yml +34 -0
- data/.github/workflows/tests.yml +34 -0
- data/.rubocop.yml +7 -1
- data/CHANGELOG.md +9 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +2 -0
- data/Guardfile +28 -0
- data/MIT-LICENSE +1 -1
- data/README.md +15 -5
- data/Rakefile +6 -1
- data/bin/console +1 -0
- data/bin/setup +2 -0
- data/guard-haml_lint.gemspec +9 -7
- data/lib/guard/haml_lint.rb +3 -1
- data/lib/guard/hamllint/templates/Guardfile +3 -0
- data/lib/guard/hamllint/version.rb +3 -1
- data/spec/guard/haml_lint_spec.rb +2 -2
- data/spec/spec_helper.rb +3 -1
- metadata +28 -27
- data/.travis.yml +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 10ac4777fb8f23569cc65a32c7f8fe71ed416eefdc156451e5692e51f909b666
|
4
|
+
data.tar.gz: 3435caa0f0696aac287ae18d39101b58410e1308d55d2bd850b71719853251ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c026e494871a1a36339b97a54dc77a7c385a69bfe26b32a59fe638eeb9df6eaa6319e2c5bbc258294b6016d60f83be962e48411578260967f8fbba1eee729c81
|
7
|
+
data.tar.gz: 20c274be31282cfb783b1ce7a0f893ced94f25a6b31e1a5eec9c1cf0cee8386534a8d455b8dbd41561d07c29407e6599a4f43d7acd993f83e6ed7964ea87c3d6
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
name: Lint
|
8
|
+
on:
|
9
|
+
push:
|
10
|
+
branches: [ master ]
|
11
|
+
pull_request:
|
12
|
+
branches: [ master ]
|
13
|
+
jobs:
|
14
|
+
rubocop:
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
strategy:
|
17
|
+
matrix:
|
18
|
+
ruby-version:
|
19
|
+
- "2.5.9"
|
20
|
+
- "2.6.9"
|
21
|
+
- "2.7.6"
|
22
|
+
- "3.0.4"
|
23
|
+
- "3.1.2"
|
24
|
+
steps:
|
25
|
+
- uses: actions/checkout@v2
|
26
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
27
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
28
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
29
|
+
uses: ruby/setup-ruby@v1
|
30
|
+
with:
|
31
|
+
ruby-version: ${{ matrix.ruby-version }}
|
32
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
33
|
+
- name: Run Rubocop
|
34
|
+
run: bundle exec rubocop
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
name: Tests
|
8
|
+
on:
|
9
|
+
push:
|
10
|
+
branches: [ master ]
|
11
|
+
pull_request:
|
12
|
+
branches: [ master ]
|
13
|
+
jobs:
|
14
|
+
rspec:
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
strategy:
|
17
|
+
matrix:
|
18
|
+
ruby-version:
|
19
|
+
- "2.5.9"
|
20
|
+
- "2.6.9"
|
21
|
+
- "2.7.6"
|
22
|
+
- "3.0.4"
|
23
|
+
- "3.1.2"
|
24
|
+
steps:
|
25
|
+
- uses: actions/checkout@v2
|
26
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
27
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
28
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
29
|
+
uses: ruby/setup-ruby@v1
|
30
|
+
with:
|
31
|
+
ruby-version: ${{ matrix.ruby-version }}
|
32
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
33
|
+
- name: Run RSpec
|
34
|
+
run: bundle exec rspec
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at toyasyu@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
CHANGED
data/Guardfile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# A sample Guardfile
|
2
4
|
# More info at https://github.com/guard/guard#readme
|
3
5
|
|
@@ -19,3 +21,29 @@ guard :rubocop do
|
|
19
21
|
watch(%r{.+\.rb$})
|
20
22
|
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
|
21
23
|
end
|
24
|
+
|
25
|
+
# NOTE: The cmd option is now required due to the increasing number of ways
|
26
|
+
# rspec may be run, below are examples of the most common uses.
|
27
|
+
# * bundler: 'bundle exec rspec'
|
28
|
+
# * bundler binstubs: 'bin/rspec'
|
29
|
+
# * spring: 'bin/rspec' (This will use spring if running and you have
|
30
|
+
# installed the spring binstubs per the docs)
|
31
|
+
# * zeus: 'zeus rspec' (requires the server to be started separately)
|
32
|
+
# * 'just' rspec: 'rspec'
|
33
|
+
|
34
|
+
guard :rspec, cmd: 'bundle exec rspec' do
|
35
|
+
require 'guard/rspec/dsl'
|
36
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
37
|
+
|
38
|
+
# Feel free to open issues for suggestions and improvements
|
39
|
+
|
40
|
+
# RSpec files
|
41
|
+
rspec = dsl.rspec
|
42
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
43
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
44
|
+
watch(rspec.spec_files)
|
45
|
+
|
46
|
+
# Ruby files
|
47
|
+
ruby = dsl.ruby
|
48
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
49
|
+
end
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,12 +1,16 @@
|
|
1
1
|
[![Gem Version](https://badge.fury.io/rb/guard-haml_lint.svg)](https://badge.fury.io/rb/guard-haml_lint)
|
2
|
-
[![
|
3
|
-
[![Build Status](https://travis-ci.org/yatmsu/guard-haml-lint.svg)](https://travis-ci.org/yatmsu/guard-haml-lint)
|
2
|
+
[![Build Status](https://github.com/yatmsu/guard-haml-lint/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/yatmsu/guard-haml-lint/actions/workflows/tests.yml?branch=master)
|
4
3
|
[![Code Climate](https://codeclimate.com/github/yatmsu/guard-haml-lint/badges/gpa.svg)](https://codeclimate.com/github/yatmsu/guard-haml-lint)
|
5
4
|
|
6
5
|
# Guard::HamlLint
|
7
6
|
|
8
7
|
A guard to lint your Haml.
|
9
8
|
|
9
|
+
## Requirements
|
10
|
+
|
11
|
+
* Ruby 2.5+
|
12
|
+
* Haml-Lint 0.35.0+
|
13
|
+
|
10
14
|
## Installation
|
11
15
|
|
12
16
|
Add this line to your application's Gemfile
|
@@ -36,9 +40,11 @@ Please read the [Guardfile DSL documentation](https://github.com/guard/guard#rea
|
|
36
40
|
|
37
41
|
Available options:
|
38
42
|
|
39
|
-
|
40
|
-
|
41
|
-
|
43
|
+
```ruby
|
44
|
+
all_on_start: true # Check all files at Guard startup. default: true
|
45
|
+
haml_dires: ['app/views'] # Check Directories. default: 'app/views' or '.'
|
46
|
+
cli: '--fail-fast --no-color' # Additional command line options to haml-lint. default: nil
|
47
|
+
```
|
42
48
|
|
43
49
|
## Contributing
|
44
50
|
|
@@ -47,3 +53,7 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/yatmsu
|
|
47
53
|
## License
|
48
54
|
|
49
55
|
guard-haml_lint is released under the [MIT License](https://opensource.org/licenses/MIT).
|
56
|
+
|
57
|
+
## Code of Conduct
|
58
|
+
|
59
|
+
Everyone interacting in the Guard::HamlLint project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/yatmsu/guard-haml-lint/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
data/bin/setup
CHANGED
data/guard-haml_lint.gemspec
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
2
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
5
|
require 'guard/hamllint/version'
|
4
6
|
|
@@ -17,16 +19,16 @@ Gem::Specification.new do |spec|
|
|
17
19
|
spec.executables = `git ls-files -- exe/*`.split("\n").map { |f| File.basename(f) }
|
18
20
|
spec.require_paths = ['lib']
|
19
21
|
|
20
|
-
spec.required_ruby_version = '>= 2.
|
22
|
+
spec.required_ruby_version = '>= 2.5.8'
|
21
23
|
|
22
24
|
spec.license = 'MIT'
|
23
25
|
|
24
26
|
spec.add_dependency 'guard', '~> 2.2'
|
25
27
|
spec.add_dependency 'guard-compat', '~> 1.2'
|
26
|
-
spec.add_runtime_dependency 'haml_lint', '
|
28
|
+
spec.add_runtime_dependency 'haml_lint', '~> 0.35'
|
27
29
|
|
28
|
-
spec.add_development_dependency '
|
29
|
-
spec.add_development_dependency '
|
30
|
-
spec.add_development_dependency '
|
31
|
-
spec.add_development_dependency '
|
30
|
+
spec.add_development_dependency 'guard-rspec', '~> 4.7.3'
|
31
|
+
spec.add_development_dependency 'guard-rubocop', '~> 1.5.0'
|
32
|
+
spec.add_development_dependency 'rake', '~> 12.3'
|
33
|
+
spec.add_development_dependency 'rspec', '~> 3.9.0'
|
32
34
|
end
|
data/lib/guard/haml_lint.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
describe Guard::HamlLint do
|
4
4
|
subject { described_class.new(options) }
|
@@ -74,7 +74,7 @@ describe Guard::HamlLint do
|
|
74
74
|
let(:options) { { cli: ['--fail-fast'] } }
|
75
75
|
|
76
76
|
it 'raise Guard::HamlLint::ArgumentError' do
|
77
|
-
expect { subject.start }.to raise_error(
|
77
|
+
expect { subject.start }.to raise_error(ArgumentError, 'Please specify only String for :cli option')
|
78
78
|
end
|
79
79
|
end
|
80
80
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-haml_lint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yasuhiko Katoh
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|
@@ -42,72 +42,72 @@ dependencies:
|
|
42
42
|
name: haml_lint
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: '0.35'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: '0.35'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: guard-rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 4.7.3
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 4.7.3
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: guard-rubocop
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 1.5.0
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 1.5.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 3
|
89
|
+
version: '12.3'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 3
|
96
|
+
version: '12.3'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: rspec
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 3.9.0
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 3.9.0
|
111
111
|
description: Guard::HamlLint automatically runs Haml Lint tools.
|
112
112
|
email:
|
113
113
|
- toyasyu@gmail.com
|
@@ -115,11 +115,13 @@ executables: []
|
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
|
+
- ".github/workflows/lint.yml"
|
119
|
+
- ".github/workflows/tests.yml"
|
118
120
|
- ".gitignore"
|
119
121
|
- ".rspec"
|
120
122
|
- ".rubocop.yml"
|
121
|
-
- ".travis.yml"
|
122
123
|
- CHANGELOG.md
|
124
|
+
- CODE_OF_CONDUCT.md
|
123
125
|
- Gemfile
|
124
126
|
- Guardfile
|
125
127
|
- MIT-LICENSE
|
@@ -137,7 +139,7 @@ homepage: https://github.com/yatmsu/guard-haml-lint
|
|
137
139
|
licenses:
|
138
140
|
- MIT
|
139
141
|
metadata: {}
|
140
|
-
post_install_message:
|
142
|
+
post_install_message:
|
141
143
|
rdoc_options: []
|
142
144
|
require_paths:
|
143
145
|
- lib
|
@@ -145,16 +147,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
145
147
|
requirements:
|
146
148
|
- - ">="
|
147
149
|
- !ruby/object:Gem::Version
|
148
|
-
version: 2.
|
150
|
+
version: 2.5.8
|
149
151
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
150
152
|
requirements:
|
151
153
|
- - ">="
|
152
154
|
- !ruby/object:Gem::Version
|
153
155
|
version: '0'
|
154
156
|
requirements: []
|
155
|
-
|
156
|
-
|
157
|
-
signing_key:
|
157
|
+
rubygems_version: 3.3.22
|
158
|
+
signing_key:
|
158
159
|
specification_version: 4
|
159
160
|
summary: Guard plugin for HAML-Lint
|
160
161
|
test_files:
|