guard-cookstyle 0.1.0 → 0.2.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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +3 -19
- data/guard-cookstyle.gemspec +1 -0
- data/lib/guard/cookstyle.rb +1 -2
- data/lib/guard/cookstyle/runner.rb +2 -1
- data/lib/guard/cookstyle/templates/Guardfile +2 -1
- data/lib/guard/cookstyle/version.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f12320c9b5e0c4747e14b1a13d274e0345e5b45
|
4
|
+
data.tar.gz: '03394b2dd0bb869b209e14ae38431067d958993a'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7319497e4cd71e9ad87e9ca6d2fd39057ef2e9d7cde6b43a737b4d3744292e23bbb44c5a5539a371223be371bcf24105a5632b6ce3b9046ccb64c3d7aa127bd0
|
7
|
+
data.tar.gz: e6211d1f4086e55ea3ffc0acc9a2bdbc0ffc7a2a9f4a2fc21171a5b50217ad7d1f0a88ac85cb1ddfb0cc3b0a0ff065320b66ef4de4db624fec4e00eb6e9030c6
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Guard::Cookstyle
|
2
2
|
|
3
|
-
|
3
|
+
[](https://badge.fury.io/rb/guard-cookstyle)
|
4
4
|
|
5
|
-
guard-
|
5
|
+
guard-cookstyle allows you to automatically check Chef cookbook style with [Cookstyle](https://github.com/chef/cookstyle) when files are modified.
|
6
6
|
|
7
7
|
Cookstyle is a wrapper of rubocop, so most of the codes were based on [yujinakayama/guard-rubocop]((https://github.com/yujinakayama/guard-rubocop)).
|
8
8
|
|
@@ -32,8 +32,6 @@ Add the default Guard::Cookstyle definition to your Guardfile by running:
|
|
32
32
|
$ guard init cookstyle
|
33
33
|
```
|
34
34
|
|
35
|
-
Rules of Rubocop definition are loaded from `.cookstyle.yml` by default.
|
36
|
-
|
37
35
|
## Usage
|
38
36
|
|
39
37
|
Please read the [Guard usage documentation](https://github.com/guard/guard#readme).
|
@@ -43,7 +41,7 @@ Please read the [Guard usage documentation](https://github.com/guard/guard#readm
|
|
43
41
|
You can pass some options in `Guardfile` like the following example:
|
44
42
|
|
45
43
|
```ruby
|
46
|
-
guard :cookstyle, all_on_start: false, cli: ['--format', 'clang'], cookbook_dirs: ['mycookbooks']
|
44
|
+
guard :cookstyle, all_on_start: false, cli: ['--format', 'clang'], cookbook_dirs: ['mycookbooks'] do
|
47
45
|
# ...
|
48
46
|
end
|
49
47
|
```
|
@@ -69,20 +67,6 @@ launchy: nil # Filename to launch using Launchy after RuboCop runs.
|
|
69
67
|
# default: nil
|
70
68
|
cookbook_dirs: [] # Directory of Cookbooks to check.
|
71
69
|
# default: %w[cookbooks site-cookbooks]
|
72
|
-
rubocop_config: # Rubocop Config path.
|
73
|
-
# default: '.cookstyle.yml'
|
74
|
-
```
|
75
|
-
|
76
|
-
### Tips
|
77
|
-
|
78
|
-
In order to use it with Rubocop, we recommend that `.cookstyle.yml` inherits `.rubocop.yml` and add cookbook specific rules.
|
79
|
-
|
80
|
-
```
|
81
|
-
---
|
82
|
-
inherit_from: .rubocop.yml
|
83
|
-
|
84
|
-
... rules for cookbooks
|
85
|
-
|
86
70
|
```
|
87
71
|
|
88
72
|
## Contributing
|
data/guard-cookstyle.gemspec
CHANGED
data/lib/guard/cookstyle.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'json'
|
2
|
+
require 'cookstyle'
|
2
3
|
|
3
4
|
module Guard
|
4
5
|
class Cookstyle
|
@@ -32,7 +33,7 @@ module Guard
|
|
32
33
|
command.concat(%w[--format progress]) # Keep default formatter for console.
|
33
34
|
end
|
34
35
|
|
35
|
-
command.concat(['--config',
|
36
|
+
command.concat(['--config', ::Cookstyle.config])
|
36
37
|
command.concat(['--format', 'json', '--out', json_file_path])
|
37
38
|
command << '--force-exclusion'
|
38
39
|
command.concat(args_specified_by_user)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-cookstyle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sawanoboly
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: cookstyle
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|