guard-slimlint 1.3.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6fea1f964cbe5473c53006d23bc07c4ea0b0d1692d1ca24739978f4dcdd37f74
4
- data.tar.gz: 01e12f05a8d8538e8c39cd9fe15812641f4a58ee99ba9e297905eba10a0d8e39
3
+ metadata.gz: dfb29b85e6e86adbf353fd8a8f7ebb7d4ddffc72f79d7015ccdc12927ae91ece
4
+ data.tar.gz: 6d50a482ee6fad85b3d5474ab4a59a398e62e0fb8c42fbe0ffb997d1d9e056d3
5
5
  SHA512:
6
- metadata.gz: 8b278309d93cc8134ba37c5dad35ad65763495a09a8efdfc825ab64ef183d6b7140526be9216c3f3fcae17c50ffb5f205e60fd6aa6108db6dcc6358a745eb790
7
- data.tar.gz: 0ac02cab35908fd9fb9639721c59e10edda8e2842d0df71bc526d21efd47ac42d79c8078802e78bc4586523d7c1c645a28b05fa967da0f211a36e96c22527410
6
+ metadata.gz: 9e294839c1b05bf9bee7527b13d7847c99adf6b876ac21ca442ad63f74cde6badb216098af6604257e7d4d568f543b0fb0d8170e9ab2c456ce939ac3dcda2a93
7
+ data.tar.gz: 4e40c7f1451eb500cafde4ad53798db37f6f8f114bde89cf1724215aaf698693fcc6b163acc16d2fe924e31522af38b8d5c5ecd3dfb697e68bcd10d6bfda37f3
data/CHANGELOG.md ADDED
@@ -0,0 +1,125 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project
5
+ follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [2.0.0] - 2026-09-07
10
+
11
+ A behaviour release. The plugin still runs slim-lint as a subprocess, which
12
+ was a deliberate decision: Guard is a long-running process, and loading the
13
+ linter into it would freeze `.slim-lint.yml` at startup and let RuboCop's
14
+ caches grow all day. Four of the five comparable Guard plugins shell out for
15
+ the same reason.
16
+
17
+ ### Changed
18
+
19
+ - **`notify_on` now defaults to `:change`.** Notifications fire only when the
20
+ outcome flips, green to red or red to green. Saving a broken template twenty
21
+ times while fixing it produces one notification instead of twenty. Pass
22
+ `notify_on: :failure` for the old behaviour.
23
+ - **Ruby 3.3 or newer is required.** 3.2 reached end of life in March 2026.
24
+ - **`run_all` lints the directories Guard watches** rather than always
25
+ sweeping `.`. A `directories` line in your Guardfile now narrows it. Without
26
+ one, behaviour is unchanged.
27
+ - The Guardfile template watches `app/views` rather than every `.html.slim`
28
+ file anywhere in the project, and re-lints when `.slim-lint.yml` changes.
29
+ - Option readers are no longer writable. `notify_on` and `all_on_start` are
30
+ read once at construction, so the writers only ever looked useful.
31
+
32
+ ### Added
33
+
34
+ - `cli:` option, forwarding arbitrary arguments to slim-lint as a String or an
35
+ Array. This covers `-c`, linter selection and anything slim-lint adds later
36
+ without a new option here for each.
37
+ - `halt_on_fail:` option, default `true`, to opt out of failing Guard's task.
38
+ - An unrecognised `notify_on` now raises at startup instead of silently
39
+ disabling notifications for the whole session.
40
+ - Exit statuses that do not come from slim-lint itself now explain themselves.
41
+ Status 1 is Bundler failing to load the command, and 127 is a missing binary;
42
+ neither mentions Slim, so the bare number used to send people hunting for
43
+ lint errors in templates that were fine.
44
+
45
+ ### Removed
46
+
47
+ - The `colorize` runtime dependency. It monkeypatched `String` in every host
48
+ application to colour two log lines. Guard's own `Compat::UI.color` does the
49
+ same job, so the plugin now adds nothing to your object space.
50
+
51
+ ## [1.4.0] - 2026-09-04
52
+
53
+ The gem had not been touched since 2019 and could no longer be developed on any
54
+ supported Ruby. This release makes it buildable, testable and correct again
55
+ without changing the plugin's interface.
56
+
57
+ ### Fixed
58
+
59
+ - slim-lint failures are no longer reported as lint offences. slim-lint uses
60
+ sysexits codes, and only status 65 means offences were found. Crashes, usage
61
+ errors, missing files and bad configuration now go to `Guard::UI.error` with
62
+ the exit status instead of printing the red "offences detected" line.
63
+ - Paths are passed to slim-lint as separate arguments rather than interpolated
64
+ into a shell string, so files whose names contain spaces or shell
65
+ metacharacters are linted correctly.
66
+ - The plugin throws `:task_has_failed` when a run fails, so Guard's
67
+ `halt_on_fail` group option now works.
68
+ - `bundle install` works again. The gemspec required Bundler 1.x, which no Ruby
69
+ since 2.7 ships.
70
+ - `.rubocop.yml` used the long-since-renamed `Metrics/LineLength` cop, which
71
+ crashed slim-lint's RuboCop linter on every file in this repository.
72
+ - The spec suite no longer deletes the repository's own `Guardfile` on every
73
+ example, and runs in about four seconds instead of ten.
74
+ - Corrected "Slim offences has been detected" to "have been detected".
75
+ - The Guardfile template written by `guard init slimlint` used
76
+ `notify_on: :both`, the noisiest of the four settings, contradicting the
77
+ plugin's own `:failure` default. Every new user got a desktop notification
78
+ on every successful save. The template now matches the documented default,
79
+ and a spec keeps the two in step.
80
+
81
+ ### Added
82
+
83
+ - GitHub Actions CI covering Ruby 3.1 through 3.4, plus RuboCop.
84
+ - Dependabot configuration for Bundler and GitHub Actions.
85
+ - This changelog.
86
+ - Regression tests for every slim-lint exit status, for paths containing
87
+ spaces, and for `run_on_additions` and `run_all`.
88
+
89
+ ### Changed
90
+
91
+ - `required_ruby_version` is now declared as `>= 3.1`.
92
+ - Dependencies relaxed and modernised: `slim_lint` `>= 0.20, < 2.0`,
93
+ `colorize` `>= 0.8, < 2.0`, `rake` 13, `rspec` 3.13.
94
+ - Gemspec now carries `metadata` links and requires MFA for releases, and
95
+ builds its file list with `Dir.glob` rather than `git ls-files`.
96
+
97
+ ### Removed
98
+
99
+ - Travis CI configuration. travis-ci.org shut down in 2021.
100
+
101
+ ## [1.3.2] - 2019-11-13
102
+
103
+ ### Fixed
104
+
105
+ - Corrected the maintainer email address.
106
+
107
+ ## [1.3.1] - 2019-11-13
108
+
109
+ ### Changed
110
+
111
+ - Bumped the `slim_lint` dependency to 0.15.
112
+
113
+ ## [1.3.0] - 2018-04-15
114
+
115
+ ### Fixed
116
+
117
+ - `all_on_start` is honoured, so the plugin no longer lints everything on
118
+ startup when the option is disabled.
119
+
120
+ [Unreleased]: https://github.com/mike927/guard-slimlint/compare/v2.0.0...HEAD
121
+ [2.0.0]: https://github.com/mike927/guard-slimlint/compare/v1.4.0...v2.0.0
122
+ [1.4.0]: https://github.com/mike927/guard-slimlint/compare/v1.3.2...v1.4.0
123
+ [1.3.2]: https://github.com/mike927/guard-slimlint/compare/v1.3.1...v1.3.2
124
+ [1.3.1]: https://github.com/mike927/guard-slimlint/compare/v1.3.0...v1.3.1
125
+ [1.3.0]: https://github.com/mike927/guard-slimlint/releases/tag/v1.3.0
data/README.md CHANGED
@@ -1,11 +1,16 @@
1
1
  # Guard::SlimLint
2
2
 
3
- Guard::SlimLint gem helps developers to automatically run slim-lint every time a slim file is saved.
3
+ [![CI](https://github.com/mike927/guard-slimlint/actions/workflows/ci.yml/badge.svg)](https://github.com/mike927/guard-slimlint/actions/workflows/ci.yml)
4
+ [![Gem Version](https://badge.fury.io/rb/guard-slimlint.svg)](https://rubygems.org/gems/guard-slimlint)
4
5
 
6
+ Guard::SlimLint runs [slim-lint](https://github.com/sds/slim-lint) automatically
7
+ every time a Slim template is added or changed.
8
+
9
+ Requires Ruby 3.3 or newer.
5
10
 
6
11
  ## Installation
7
12
 
8
- Add this line to your application's Gemfile:
13
+ Add this to your application's Gemfile:
9
14
 
10
15
  ```ruby
11
16
  group :development do
@@ -13,31 +18,88 @@ group :development do
13
18
  end
14
19
  ```
15
20
 
16
- And then execute:
21
+ Then run:
17
22
 
18
- $ bundle
23
+ ```
24
+ bundle install
25
+ ```
19
26
 
20
- Or install it yourself as:
27
+ ## Usage
21
28
 
22
- $ gem install guard-slimlint
29
+ Add the plugin to your Guardfile:
23
30
 
31
+ ```
32
+ bundle exec guard init slimlint
33
+ ```
24
34
 
25
- ## Usage
26
- After gem instalation generate an empty ```Guardfile``` with:
35
+ Then start Guard:
27
36
 
28
- $ bundle exec guard init
29
-
30
- and run guard through Bundler with:
37
+ ```
38
+ bundle exec guard
39
+ ```
31
40
 
32
- $ bundle exec guard
41
+ Linting itself is configured by slim-lint, not by this plugin. Put a
42
+ `.slim-lint.yml` in your project root to choose linters and their options.
33
43
 
44
+ ## Options
34
45
 
35
- ## Contributing
46
+ ```ruby
47
+ guard :slimlint, notify_on: :change, cli: '-c config/.slim-lint.yml' do
48
+ watch(%r{^app/views/.+\.slim$})
49
+ watch(%r{(?:.+/)?\.slim-lint\.yml$}) { |m| File.dirname(m[0]) }
50
+ end
51
+ ```
36
52
 
37
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/guard-slimlint. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
53
+ | Option | Default | Meaning |
54
+ |--------|---------|---------|
55
+ | `notify_on` | `:change` | When to send a desktop notification. One of `:change`, `:failure`, `:success`, `:both`, `:none`. |
56
+ | `all_on_start` | `true` | Lint everything once when Guard starts. |
57
+ | `halt_on_fail` | `true` | Tell Guard the task failed, so a group's `halt_on_fail` can stop the rest of it. |
58
+ | `cli` | none | Extra arguments passed straight to slim-lint. String or Array. |
38
59
 
60
+ An unrecognised `notify_on` raises at startup rather than silently going quiet.
39
61
 
40
- ## License
62
+ ### Notifications
63
+
64
+ `:change` notifies only when the outcome flips, green to red or red to green.
65
+ Saving a broken file twenty times while you fix it produces one notification,
66
+ not twenty. `:failure` notifies on every failing run, which is the older
67
+ behaviour if you prefer it.
41
68
 
42
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
69
+ Notifications come from Guard itself. On macOS, add `terminal-notifier-guard`
70
+ to your Gemfile, or you will only see the terminal window title change.
71
+
72
+ ### Running everything
73
+
74
+ `run_all` lints the directories Guard is watching, so a `directories` line in
75
+ your Guardfile narrows it. Without one it falls back to the whole project.
76
+
77
+ ## Exit status handling
78
+
79
+ slim-lint reports its outcome with sysexits codes. This plugin treats status 65
80
+ as "offences were found" and every other non-zero status as slim-lint itself
81
+ failing, which is reported through `Guard::Compat::UI.error` with the status. A
82
+ misconfigured `.slim-lint.yml` or a crash is therefore not mistaken for a lint
83
+ failure.
84
+
85
+ ## Development
86
+
87
+ ```
88
+ bin/setup
89
+ bundle exec rake
90
+ ```
91
+
92
+ `rake` runs RSpec and RuboCop. The repository has its own Guardfile, so
93
+ `bundle exec guard` will run the suite and the linter as you edit.
94
+
95
+ ## Contributing
96
+
97
+ Bug reports and pull requests are welcome at
98
+ https://github.com/mike927/guard-slimlint. Contributors are expected to follow
99
+ the [Contributor Covenant](CODE_OF_CONDUCT.md).
100
+
101
+ ## License
43
102
 
103
+ Available as open source under the terms of the
104
+ [MIT License](https://opensource.org/licenses/MIT). See [CHANGELOG.md](CHANGELOG.md)
105
+ for release history.
@@ -1,6 +1,13 @@
1
1
  # available options:
2
- # notify_on:
3
- # failure, success, both, none
4
- guard :slimlint, notify_on: :both do
5
- watch(/^.+(\.html\.slim)$/)
2
+ # notify_on: change (default), failure, success, both, none
3
+ # all_on_start: true (default), false
4
+ # halt_on_fail: true (default), false
5
+ # cli: extra arguments for slim-lint, e.g. '-c config/.slim-lint.yml'
6
+ guard :slimlint, notify_on: :change do
7
+ # Rails views. For a non-Rails project, watch wherever your templates live,
8
+ # for example watch(%r{^templates/.+\.slim$})
9
+ watch(%r{^app/views/.+\.slim$})
10
+
11
+ # Re-lint when the slim-lint configuration itself changes.
12
+ watch(%r{(?:.+/)?\.slim-lint\.yml$}) { |m| File.dirname(m[0]) }
6
13
  end
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Guard
2
4
  class SlimLintVersion
3
- VERSION = '1.3.2'.freeze
5
+ VERSION = '2.0.0'
4
6
  end
5
7
  end
@@ -1,13 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'English'
4
+ require 'shellwords'
1
5
  require 'guard/compat/plugin'
2
- require 'colorize'
3
6
 
4
7
  module Guard
5
8
  class SlimLint < Plugin
6
- attr_accessor :notify_on, :all_on_start
9
+ # slim-lint reports its outcome with sysexits(3) codes. Only EX_DATAERR
10
+ # means "the linter ran and found offences"; every other non-zero status is
11
+ # slim-lint itself failing, and must not be reported as a lint failure.
12
+ EXIT_SUCCESS = 0
13
+ EXIT_LINT_FAILURE = 65
14
+
15
+ # Recognised :notify_on values. :change notifies only when the outcome
16
+ # flips, which is what stops a long editing session from producing one
17
+ # notification per save.
18
+ NOTIFY_MODES = %i[change failure success both none].freeze
19
+
20
+ # Statuses that are not slim-lint's own sysexits codes, paired with what a
21
+ # user is most likely looking at. Bundler exits 1 when it cannot load the
22
+ # command, and a shell exits 127 when the binary is missing; neither says
23
+ # anything about Slim, so the bare number sends people hunting for lint
24
+ # errors that do not exist.
25
+ STATUS_HINTS = {
26
+ 1 => 'the bundle is probably out of sync, try bundle install',
27
+ 127 => 'slim-lint is not on PATH, check that the gem is installed'
28
+ }.freeze
29
+
30
+ attr_reader :notify_on, :all_on_start, :halt_on_fail, :cli
7
31
 
8
32
  def initialize(options = {})
9
- @notify_on = options.fetch(:notify_on, :failure)
33
+ @notify_on = options.fetch(:notify_on, :change)
10
34
  @all_on_start = options.fetch(:all_on_start, true)
35
+ @halt_on_fail = options.fetch(:halt_on_fail, true)
36
+ @cli = options[:cli]
37
+ # Assume the project starts green, so a clean first run stays quiet
38
+ # under :change instead of announcing that nothing is wrong.
39
+ @last_success = true
40
+
41
+ validate_notify_on!
11
42
  super
12
43
  end
13
44
 
@@ -16,7 +47,7 @@ module Guard
16
47
  end
17
48
 
18
49
  def run_all
19
- run
50
+ run(lint_targets)
20
51
  end
21
52
 
22
53
  def run_on_modifications(paths)
@@ -29,39 +60,99 @@ module Guard
29
60
 
30
61
  private
31
62
 
32
- def run(paths = ['.'])
33
- result = system "slim-lint #{paths.join(' ')}"
34
- if result
35
- UI.info 'No Slim offences detected'.green
36
- else
37
- UI.info 'Slim offences has been detected'.red
63
+ def validate_notify_on!
64
+ return if NOTIFY_MODES.include?(notify_on)
65
+
66
+ raise ArgumentError,
67
+ "unknown :notify_on #{notify_on.inspect}, expected one of " \
68
+ "#{NOTIFY_MODES.map(&:inspect).join(', ')}"
69
+ end
70
+
71
+ # The directories Guard was told to watch, so run_all honours a
72
+ # `directories` line in the Guardfile instead of always sweeping the
73
+ # whole project.
74
+ def lint_targets
75
+ dirs = Compat.watched_directories.map(&:to_s)
76
+ dirs.empty? ? ['.'] : dirs
77
+ rescue NotImplementedError
78
+ # guard-compat raises this when Guard's CLI is not loaded, which
79
+ # happens when the plugin is driven programmatically rather than by
80
+ # `guard`. Linting the whole project is what run_all did before 2.0.0.
81
+ ['.']
82
+ end
83
+
84
+ def run(paths)
85
+ status = lint(paths)
86
+
87
+ case status
88
+ when EXIT_SUCCESS then report_success
89
+ when EXIT_LINT_FAILURE then report_offences
90
+ else report_error(status)
38
91
  end
39
- check_and_notify(result)
40
92
  end
41
93
 
42
- def notification_allowed?(result)
43
- case notify_on
44
- when :failure then !result
45
- when :success then result
46
- when :both then true
47
- when :none then false
94
+ # Runs slim-lint without a shell, so paths containing spaces or shell
95
+ # metacharacters reach the linter untouched.
96
+ #
97
+ # @param paths [Array<String>]
98
+ # @return [Integer, nil] the exit status, or nil if slim-lint never ran
99
+ def lint(paths)
100
+ system('slim-lint', *cli_args, *paths)
101
+ $CHILD_STATUS&.exitstatus
102
+ end
103
+
104
+ def cli_args
105
+ case cli
106
+ when Array then cli.map(&:to_s)
107
+ when String then cli.shellsplit
108
+ else []
48
109
  end
49
110
  end
50
111
 
51
- def check_and_notify(result)
52
- notify(result) if notification_allowed?(result)
112
+ def report_success
113
+ Compat::UI.info(Compat::UI.color('No Slim offences detected', :green))
114
+ finish(true, 'No slim offences')
115
+ end
116
+
117
+ def report_offences
118
+ Compat::UI.info(Compat::UI.color('Slim offences have been detected', :red))
119
+ finish(false, 'Slim offences detected')
120
+ end
121
+
122
+ def report_error(status)
123
+ message = error_message(status)
124
+ Compat::UI.error(message)
125
+ finish(false, message)
53
126
  end
54
127
 
55
- def image(result)
56
- result ? :success : :failed
128
+ def error_message(status)
129
+ return 'slim-lint could not be run' if status.nil?
130
+
131
+ message = "slim-lint exited with status #{status}"
132
+ hint = STATUS_HINTS[status]
133
+ hint ? "#{message}: #{hint}" : message
134
+ end
135
+
136
+ # Notifies if the configured mode calls for it, records the outcome so
137
+ # :change can compare against it next time, then hands back to Guard.
138
+ def finish(success, message)
139
+ notify(success, message) if notification_allowed?(success)
140
+ @last_success = success
141
+ throw :task_has_failed if halt_on_fail && !success
57
142
  end
58
143
 
59
- def message(result)
60
- result ? 'No slim offences' : 'Slim offences detected'
144
+ def notification_allowed?(success)
145
+ case notify_on
146
+ when :change then success != @last_success
147
+ when :failure then !success
148
+ when :success then success
149
+ when :both then true
150
+ else false
151
+ end
61
152
  end
62
153
 
63
- def notify(result)
64
- Notifier.notify(message(result), title: 'Slim-lint results', image: image(result))
154
+ def notify(success, message)
155
+ Compat::UI.notify(message, title: 'Slim-lint results', image: success ? :success : :failed)
65
156
  end
66
157
  end
67
158
  end
metadata CHANGED
@@ -1,165 +1,155 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-slimlint
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michal Gajowiak
8
- autorequire:
9
- bindir: exe
8
+ bindir: bin
10
9
  cert_chain: []
11
- date: 2019-11-13 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
- name: bundler
13
+ name: guard
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: '1.16'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 1.16.1
23
- type: :development
18
+ version: '2.14'
19
+ type: :runtime
24
20
  prerelease: false
25
21
  version_requirements: !ruby/object:Gem::Requirement
26
22
  requirements:
27
23
  - - "~>"
28
24
  - !ruby/object:Gem::Version
29
- version: '1.16'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 1.16.1
25
+ version: '2.14'
33
26
  - !ruby/object:Gem::Dependency
34
- name: rake
27
+ name: guard-compat
35
28
  requirement: !ruby/object:Gem::Requirement
36
29
  requirements:
37
30
  - - "~>"
38
31
  - !ruby/object:Gem::Version
39
- version: '12.3'
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- version: 12.3.1
43
- type: :development
32
+ version: '1.2'
33
+ type: :runtime
44
34
  prerelease: false
45
35
  version_requirements: !ruby/object:Gem::Requirement
46
36
  requirements:
47
37
  - - "~>"
48
38
  - !ruby/object:Gem::Version
49
- version: '12.3'
39
+ version: '1.2'
40
+ - !ruby/object:Gem::Dependency
41
+ name: slim_lint
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0.20'
47
+ - - "<"
48
+ - !ruby/object:Gem::Version
49
+ version: '2.0'
50
+ type: :runtime
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
50
54
  - - ">="
51
55
  - !ruby/object:Gem::Version
52
- version: 12.3.1
56
+ version: '0.20'
57
+ - - "<"
58
+ - !ruby/object:Gem::Version
59
+ version: '2.0'
53
60
  - !ruby/object:Gem::Dependency
54
- name: rspec
61
+ name: rake
55
62
  requirement: !ruby/object:Gem::Requirement
56
63
  requirements:
57
64
  - - "~>"
58
65
  - !ruby/object:Gem::Version
59
- version: '3.7'
66
+ version: '13.0'
60
67
  type: :development
61
68
  prerelease: false
62
69
  version_requirements: !ruby/object:Gem::Requirement
63
70
  requirements:
64
71
  - - "~>"
65
72
  - !ruby/object:Gem::Version
66
- version: '3.7'
73
+ version: '13.0'
67
74
  - !ruby/object:Gem::Dependency
68
- name: colorize
75
+ name: rspec
69
76
  requirement: !ruby/object:Gem::Requirement
70
77
  requirements:
71
78
  - - "~>"
72
79
  - !ruby/object:Gem::Version
73
- version: 0.8.1
74
- type: :runtime
80
+ version: '3.13'
81
+ type: :development
75
82
  prerelease: false
76
83
  version_requirements: !ruby/object:Gem::Requirement
77
84
  requirements:
78
85
  - - "~>"
79
86
  - !ruby/object:Gem::Version
80
- version: 0.8.1
87
+ version: '3.13'
81
88
  - !ruby/object:Gem::Dependency
82
- name: guard
89
+ name: rubocop
83
90
  requirement: !ruby/object:Gem::Requirement
84
91
  requirements:
85
92
  - - "~>"
86
93
  - !ruby/object:Gem::Version
87
- version: '2.14'
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- version: 2.14.2
91
- type: :runtime
94
+ version: '1.75'
95
+ type: :development
92
96
  prerelease: false
93
97
  version_requirements: !ruby/object:Gem::Requirement
94
98
  requirements:
95
99
  - - "~>"
96
100
  - !ruby/object:Gem::Version
97
- version: '2.14'
98
- - - ">="
99
- - !ruby/object:Gem::Version
100
- version: 2.14.2
101
+ version: '1.75'
101
102
  - !ruby/object:Gem::Dependency
102
- name: guard-compat
103
+ name: rubocop-rake
103
104
  requirement: !ruby/object:Gem::Requirement
104
105
  requirements:
105
106
  - - "~>"
106
107
  - !ruby/object:Gem::Version
107
- version: '1.2'
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: 1.2.1
111
- type: :runtime
108
+ version: '0.7'
109
+ type: :development
112
110
  prerelease: false
113
111
  version_requirements: !ruby/object:Gem::Requirement
114
112
  requirements:
115
113
  - - "~>"
116
114
  - !ruby/object:Gem::Version
117
- version: '1.2'
118
- - - ">="
119
- - !ruby/object:Gem::Version
120
- version: 1.2.1
115
+ version: '0.7'
121
116
  - !ruby/object:Gem::Dependency
122
- name: slim_lint
117
+ name: rubocop-rspec
123
118
  requirement: !ruby/object:Gem::Requirement
124
119
  requirements:
125
120
  - - "~>"
126
121
  - !ruby/object:Gem::Version
127
- version: '0.15'
128
- type: :runtime
122
+ version: '3.0'
123
+ type: :development
129
124
  prerelease: false
130
125
  version_requirements: !ruby/object:Gem::Requirement
131
126
  requirements:
132
127
  - - "~>"
133
128
  - !ruby/object:Gem::Version
134
- version: '0.15'
135
- description:
129
+ version: '3.0'
130
+ description: Runs slim-lint every time a Slim template is added or modified, and reports
131
+ the result through Guard notifications.
136
132
  email:
137
133
  - michal.gajowiak.927@gmail.com
138
134
  executables: []
139
135
  extensions: []
140
136
  extra_rdoc_files: []
141
137
  files:
142
- - ".gitignore"
143
- - ".rspec"
144
- - ".rubocop.yml"
145
- - ".travis.yml"
146
- - CODE_OF_CONDUCT.md
147
- - Gemfile
148
- - Guardfile
138
+ - CHANGELOG.md
149
139
  - LICENSE.txt
150
140
  - README.md
151
- - Rakefile
152
- - bin/console
153
- - bin/setup
154
- - guard-slimlint.gemspec
155
141
  - lib/guard/slimlint.rb
156
142
  - lib/guard/slimlint/templates/Guardfile
157
143
  - lib/guard/slimlint/version.rb
158
144
  homepage: https://github.com/mike927/guard-slimlint
159
145
  licenses:
160
146
  - MIT
161
- metadata: {}
162
- post_install_message:
147
+ metadata:
148
+ homepage_uri: https://github.com/mike927/guard-slimlint
149
+ source_code_uri: https://github.com/mike927/guard-slimlint
150
+ changelog_uri: https://github.com/mike927/guard-slimlint/blob/master/CHANGELOG.md
151
+ bug_tracker_uri: https://github.com/mike927/guard-slimlint/issues
152
+ rubygems_mfa_required: 'true'
163
153
  rdoc_options: []
164
154
  require_paths:
165
155
  - lib
@@ -167,15 +157,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
167
157
  requirements:
168
158
  - - ">="
169
159
  - !ruby/object:Gem::Version
170
- version: '0'
160
+ version: '3.3'
171
161
  required_rubygems_version: !ruby/object:Gem::Requirement
172
162
  requirements:
173
163
  - - ">="
174
164
  - !ruby/object:Gem::Version
175
165
  version: '0'
176
166
  requirements: []
177
- rubygems_version: 3.0.2
178
- signing_key:
167
+ rubygems_version: 3.6.9
179
168
  specification_version: 4
180
- summary: Guard::SlimLint runs slim-lint automatically
169
+ summary: Guard plugin that runs slim-lint automatically
181
170
  test_files: []
data/.gitignore DELETED
@@ -1,9 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --format documentation
2
- --color
data/.rubocop.yml DELETED
@@ -1,5 +0,0 @@
1
- Documentation:
2
- Enabled: false
3
- Metrics/LineLength:
4
- Max: 120
5
-
data/.travis.yml DELETED
@@ -1,4 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.2.3
4
- before_install: gem install bundler -v 1.11.2
data/CODE_OF_CONDUCT.md DELETED
@@ -1,49 +0,0 @@
1
- # Contributor Code of Conduct
2
-
3
- As contributors and maintainers of this project, and in the interest of
4
- fostering an open and welcoming community, we pledge to respect all people who
5
- contribute through reporting issues, posting feature requests, updating
6
- documentation, submitting pull requests or patches, and other activities.
7
-
8
- We are committed to making participation in this project a harassment-free
9
- experience for everyone, regardless of level of experience, gender, gender
10
- identity and expression, sexual orientation, disability, personal appearance,
11
- body size, race, ethnicity, age, religion, or nationality.
12
-
13
- Examples of unacceptable behavior by participants include:
14
-
15
- * The use of sexualized language or imagery
16
- * Personal attacks
17
- * Trolling or insulting/derogatory comments
18
- * Public or private harassment
19
- * Publishing other's private information, such as physical or electronic
20
- addresses, without explicit permission
21
- * Other unethical or unprofessional conduct
22
-
23
- Project maintainers have the right and responsibility to remove, edit, or
24
- reject comments, commits, code, wiki edits, issues, and other contributions
25
- that are not aligned to this Code of Conduct, or to ban temporarily or
26
- permanently any contributor for other behaviors that they deem inappropriate,
27
- threatening, offensive, or harmful.
28
-
29
- By adopting this Code of Conduct, project maintainers commit themselves to
30
- fairly and consistently applying these principles to every aspect of managing
31
- this project. Project maintainers who do not follow or enforce the Code of
32
- Conduct may be permanently removed from the project team.
33
-
34
- This code of conduct applies both within project spaces and in public spaces
35
- when an individual is representing the project or its community.
36
-
37
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
- reported by contacting a project maintainer at michal.gajowiak.927@gmail.com. All
39
- complaints will be reviewed and investigated and will result in a response that
40
- is deemed necessary and appropriate to the circumstances. Maintainers are
41
- obligated to maintain confidentiality with regard to the reporter of an
42
- incident.
43
-
44
- This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
- version 1.3.0, available at
46
- [http://contributor-covenant.org/version/1/3/0/][version]
47
-
48
- [homepage]: http://contributor-covenant.org
49
- [version]: http://contributor-covenant.org/version/1/3/0/
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in guard-slimlint.gemspec
4
- gemspec
data/Guardfile DELETED
@@ -1,6 +0,0 @@
1
- # available options:
2
- # notify_on:
3
- # failure, success, both, none
4
- guard :slimlint, notify_on: :success do
5
- watch(/^.+(\.html\.slim)$/)
6
- end
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task default: :spec
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'bundler/setup'
4
- require 'guard/slimlint'
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require 'irb'
14
- IRB.start
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -1,28 +0,0 @@
1
- lib = File.expand_path('lib', __dir__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require 'guard/slimlint/version'
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = 'guard-slimlint'
7
- spec.version = Guard::SlimLintVersion::VERSION
8
- spec.authors = ['Michal Gajowiak']
9
- spec.email = ['michal.gajowiak.927@gmail.com']
10
-
11
- spec.summary = 'Guard::SlimLint runs slim-lint automatically'
12
- spec.homepage = 'https://github.com/mike927/guard-slimlint'
13
- spec.license = 'MIT'
14
-
15
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
16
- spec.bindir = 'exe'
17
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
18
- spec.require_paths = ['lib']
19
-
20
- spec.add_development_dependency 'bundler', '~> 1.16', '>= 1.16.1'
21
- spec.add_development_dependency 'rake', '~> 12.3', '>= 12.3.1'
22
- spec.add_development_dependency 'rspec', '~> 3.7'
23
-
24
- spec.add_runtime_dependency 'colorize', '~> 0.8.1'
25
- spec.add_runtime_dependency 'guard', '~> 2.14', '>= 2.14.2'
26
- spec.add_runtime_dependency 'guard-compat', '~> 1.2', '>= 1.2.1'
27
- spec.add_runtime_dependency 'slim_lint', '~> 0.15'
28
- end