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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e0aca0f2bef11e3af10fdb9224f9141b8c4b0db6
4
- data.tar.gz: b934c4aff61f332bc1066f10a15e6cade268738e
2
+ SHA256:
3
+ metadata.gz: 10ac4777fb8f23569cc65a32c7f8fe71ed416eefdc156451e5692e51f909b666
4
+ data.tar.gz: 3435caa0f0696aac287ae18d39101b58410e1308d55d2bd850b71719853251ab
5
5
  SHA512:
6
- metadata.gz: 2450edc23cf90442c85a79bfc6d500f35390e83b43324f17ec49300413517ceedcf1047e3f8a8182e58231133876fdf8cba54388681b443614c23c4df2eba995
7
- data.tar.gz: fbc8ca42ea7b36b72f406478360e1f740935af87341d1457b13df62c9bec9609b895e44ceac007f3239c289f630235d364c69d98adccc37ddd2b83f665a8263e
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
@@ -1,5 +1,8 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.5
3
+
1
4
  LineLength:
2
- Max: 100
5
+ Max: 120
3
6
 
4
7
  RegexpLiteral:
5
8
  Exclude:
@@ -9,3 +12,6 @@ RegexpLiteral:
9
12
  Metrics/BlockLength:
10
13
  Exclude:
11
14
  - 'spec/**/*'
15
+
16
+ Style/MutableConstant:
17
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.2.0
4
+
5
+ * Drop support for HAML-Lint v0.34.x or older
6
+ * Drop support for Ruby 2.4 or older
7
+
8
+ ## v1.1.0
9
+
10
+ * Drop support for Ruby 2.3 or older
11
+
3
12
  ## v1.0.0
4
13
 
5
14
  * Add cli option
@@ -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
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in guard-haml_lint.gemspec
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
@@ -1,4 +1,4 @@
1
- Copyright (c) 2016-2017 Yasuhiko Katoh
1
+ Copyright (c) 2016-2022 Yasuhiko Katoh
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
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
- [![Dependency Status](https://www.versioneye.com/ruby/guard-haml_lint/0.3.0/badge?style=flat)](https://www.versioneye.com/ruby/guard-haml_lint/0.3.0)
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
- all_on_start: true # Check all files at Guard startup. default: true
40
- haml_dires: ['app/views'] # Check Directories. default: 'app/views' or '.'
41
- cli: '--fail-fast --no-color' # Additional command line options to haml-lint. default: nil
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
@@ -1,6 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rspec/core/rake_task'
5
+ require 'rubocop/rake_task'
6
+
7
+ RuboCop::RakeTask.new
3
8
 
4
9
  RSpec::Core::RakeTask.new(:spec)
5
10
 
6
- task default: :spec
11
+ task default: %i[rubocop spec]
data/bin/console CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'bundler/setup'
4
5
  require 'guard/haml_lint'
data/bin/setup CHANGED
@@ -1,4 +1,6 @@
1
1
  #!/bin/bash
2
+ # frozen_string_literal: true
3
+
2
4
  set -euo pipefail
3
5
  IFS=$'\n\t'
4
6
 
@@ -1,4 +1,6 @@
1
- lib = File.expand_path('../lib', __FILE__)
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.2.6'
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', '>= 0.15.2'
28
+ spec.add_runtime_dependency 'haml_lint', '~> 0.35'
27
29
 
28
- spec.add_development_dependency 'bundler', '>= 1.0.0'
29
- spec.add_development_dependency 'rake', '~> 10.0'
30
- spec.add_development_dependency 'rspec', '~> 3.6.0'
31
- spec.add_development_dependency 'guard-rubocop', '~> 1.3.0'
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
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'guard/compat/plugin'
2
4
  require 'shellwords'
3
5
 
@@ -7,7 +9,7 @@ module Guard
7
9
  DEFAULT_OPTIONS = {
8
10
  all_on_start: true,
9
11
  cli: nil
10
- }.freeze
12
+ }
11
13
 
12
14
  attr_reader :options
13
15
 
@@ -1,3 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ # A sample Guardfile
1
4
  # Guard-HamlLint supports a lot options with default values:
2
5
  # all_on_start: true # Check all files at Guard startup. default: true
3
6
  # haml_dires: ['app/views'] # Check Directories. default: 'app/views' or '.'
@@ -1,6 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Guard
2
4
  # guard-haml_lint version class
3
5
  class HamlLintVersion
4
- VERSION = '1.0.1'.freeze
6
+ VERSION = '1.2.0'
5
7
  end
6
8
  end
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
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(Guard::HamlLint::ArgumentError, 'Please specify only String for :cli option')
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
@@ -1,4 +1,6 @@
1
- $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.unshift File.expand_path('../lib', __dir__)
2
4
  require 'guard/ui'
3
5
  require 'guard/compat/test/helper'
4
6
  require 'guard/haml_lint'
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.1
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: 2017-12-05 00:00:00.000000000 Z
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.15.2
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.15.2
54
+ version: '0.35'
55
55
  - !ruby/object:Gem::Dependency
56
- name: bundler
56
+ name: guard-rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.0.0
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: 1.0.0
68
+ version: 4.7.3
69
69
  - !ruby/object:Gem::Dependency
70
- name: rake
70
+ name: guard-rubocop
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '10.0'
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: '10.0'
82
+ version: 1.5.0
83
83
  - !ruby/object:Gem::Dependency
84
- name: rspec
84
+ name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 3.6.0
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.6.0
96
+ version: '12.3'
97
97
  - !ruby/object:Gem::Dependency
98
- name: guard-rubocop
98
+ name: rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.3.0
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: 1.3.0
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.2.6
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
- rubyforge_project:
156
- rubygems_version: 2.6.13
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:
data/.travis.yml DELETED
@@ -1,11 +0,0 @@
1
- language: ruby
2
-
3
- rvm:
4
- - 2.2.8
5
- - 2.3.4
6
- - 2.4.2
7
-
8
- sudo: false
9
-
10
- script:
11
- - bundle exec rspec spec