thor-foodcritic 1.1.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -11
- data/Thorfile +3 -3
- data/lib/thor-foodcritic.rb +6 -6
- data/lib/thor-foodcritic/version.rb +1 -1
- data/lib/thor/foodcritic.rb +1 -1
- data/thor-foodcritic.gemspec +5 -4
- metadata +16 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9997c8d577c0c6bff69b139b71944f91275eb987
|
4
|
+
data.tar.gz: 1e29272ecbfcb92cd23716a3a2f24318034a712f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 807881ff1656f318ba6ef3910f6b15da009aad8e5c3afe442cdf6b21d913d8a0370b5895b5495e0a94e8a267a9ca6670f5e96330c7708462a41ae45751501faf
|
7
|
+
data.tar.gz: b66880e2665218d2560991527624e7aef8d8e71cad90824d543ece2c2b8be5d88e12769563e6eca3e7ad7e3175a36767179ba61555eb1f65953e2c1ee45ed206
|
data/README.md
CHANGED
@@ -4,32 +4,40 @@ Food Critic Thor tasks for your Chef cookbook projects
|
|
4
4
|
|
5
5
|
# Installation
|
6
6
|
|
7
|
-
|
7
|
+
```
|
8
|
+
gem install thor-foodcritic
|
9
|
+
```
|
8
10
|
|
9
11
|
# Usage
|
10
12
|
|
11
13
|
To add the FoodCritic tasks to any Thorfile just require this gem
|
12
14
|
|
13
|
-
|
15
|
+
```
|
16
|
+
require 'thor/foodcritic'
|
17
|
+
```
|
14
18
|
|
15
19
|
And then get a list of your thor tasks
|
16
20
|
|
17
|
-
|
21
|
+
```
|
22
|
+
$ thor list
|
18
23
|
|
19
|
-
|
20
|
-
|
21
|
-
|
24
|
+
foodcritic
|
25
|
+
----------
|
26
|
+
thor foodcritic:lint # Run a lint test against the Cookbook in your current working directory.
|
27
|
+
```
|
22
28
|
|
23
29
|
Run the lint task to get a review
|
24
30
|
|
25
|
-
|
31
|
+
```
|
32
|
+
$ thor foodcritic:lint
|
26
33
|
|
27
|
-
|
28
|
-
|
29
|
-
|
34
|
+
FC002: Avoid string interpolation where not required: ...
|
35
|
+
FC003: Check whether you are running with chef server before using server-specific features: ...
|
36
|
+
FC011: Missing README in markdown format: ...
|
37
|
+
```
|
30
38
|
|
31
39
|
If any epic failure tags are specified with the `-f` flag, Thor will exit with a status code of `100`.
|
32
40
|
|
33
41
|
# Author
|
34
42
|
|
35
|
-
Author:: Jamie Winsor (
|
43
|
+
Author:: Jamie Winsor ([jamie@vialstudios.com](mailto:jamie@vialstudios.com))
|
data/Thorfile
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
$:.push File.expand_path("../lib", __FILE__)
|
3
3
|
|
4
|
-
require
|
5
|
-
require
|
6
|
-
require
|
4
|
+
require "bundler"
|
5
|
+
require "bundler/setup"
|
6
|
+
require "thor/rake_compat"
|
7
7
|
|
8
8
|
class Default < Thor
|
9
9
|
include Thor::RakeCompat
|
data/lib/thor-foodcritic.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require "thor-foodcritic/version"
|
2
|
+
require "foodcritic"
|
3
3
|
|
4
4
|
module ThorFoodCritic
|
5
5
|
class Tasks < Thor
|
@@ -34,7 +34,7 @@ module ThorFoodCritic
|
|
34
34
|
type: :array,
|
35
35
|
aliases: "-e",
|
36
36
|
desc: "Paths to exclude when running tests.",
|
37
|
-
default: [
|
37
|
+
default: ["test/**/*", "spec/**/*", "features/**/*"]
|
38
38
|
desc "lint", "Run a lint test against the specified Cookbook and Role paths or otherwise your current working directory."
|
39
39
|
def lint
|
40
40
|
review = ::FoodCritic::Linter.new.check(
|
@@ -51,8 +51,8 @@ module ThorFoodCritic
|
|
51
51
|
|
52
52
|
private
|
53
53
|
|
54
|
-
|
55
|
-
|
56
|
-
|
54
|
+
def exit_if_failure(review)
|
55
|
+
review.failed? ? exit(100) : nil
|
56
|
+
end
|
57
57
|
end
|
58
58
|
end
|
data/lib/thor/foodcritic.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
require
|
1
|
+
require "thor-foodcritic"
|
data/thor-foodcritic.gemspec
CHANGED
@@ -7,13 +7,14 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = ThorFoodCritic::VERSION
|
8
8
|
s.authors = ["Jamie Winsor"]
|
9
9
|
s.email = ["jamie@vialstudios.com"]
|
10
|
-
s.homepage = "https://github.com/
|
10
|
+
s.homepage = "https://github.com/sous-chefs/thor-foodcritic"
|
11
11
|
s.description = %q{FoodCritic Thor tasks for your Cookbook projects}
|
12
12
|
s.summary = s.description
|
13
|
+
s.license = "Apache 2.0"
|
13
14
|
s.files = `git ls-files`.split("\n")
|
14
15
|
s.require_paths = ["lib"]
|
15
|
-
s.required_ruby_version = ">=
|
16
|
+
s.required_ruby_version = ">= 2.1"
|
16
17
|
|
17
|
-
s.add_runtime_dependency
|
18
|
-
s.add_runtime_dependency
|
18
|
+
s.add_runtime_dependency "thor"
|
19
|
+
s.add_runtime_dependency "foodcritic"
|
19
20
|
end
|
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thor-foodcritic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamie Winsor
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: foodcritic
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
description: FoodCritic Thor tasks for your Cookbook projects
|
42
42
|
email:
|
43
43
|
- jamie@vialstudios.com
|
@@ -45,7 +45,7 @@ executables: []
|
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
|
-
- .gitignore
|
48
|
+
- ".gitignore"
|
49
49
|
- Gemfile
|
50
50
|
- LICENSE
|
51
51
|
- README.md
|
@@ -54,8 +54,9 @@ files:
|
|
54
54
|
- lib/thor-foodcritic/version.rb
|
55
55
|
- lib/thor/foodcritic.rb
|
56
56
|
- thor-foodcritic.gemspec
|
57
|
-
homepage: https://github.com/
|
58
|
-
licenses:
|
57
|
+
homepage: https://github.com/sous-chefs/thor-foodcritic
|
58
|
+
licenses:
|
59
|
+
- Apache 2.0
|
59
60
|
metadata: {}
|
60
61
|
post_install_message:
|
61
62
|
rdoc_options: []
|
@@ -63,17 +64,17 @@ require_paths:
|
|
63
64
|
- lib
|
64
65
|
required_ruby_version: !ruby/object:Gem::Requirement
|
65
66
|
requirements:
|
66
|
-
- -
|
67
|
+
- - ">="
|
67
68
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
69
|
+
version: '2.1'
|
69
70
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
71
|
requirements:
|
71
|
-
- -
|
72
|
+
- - ">="
|
72
73
|
- !ruby/object:Gem::Version
|
73
74
|
version: '0'
|
74
75
|
requirements: []
|
75
76
|
rubyforge_project:
|
76
|
-
rubygems_version: 2.
|
77
|
+
rubygems_version: 2.6.10
|
77
78
|
signing_key:
|
78
79
|
specification_version: 4
|
79
80
|
summary: FoodCritic Thor tasks for your Cookbook projects
|