thor-foodcritic 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/thor-foodcritic.rb +13 -2
- data/lib/thor-foodcritic/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 364a19a82f19d4dccc1e2b592d0b5a3f9d138363
|
4
|
+
data.tar.gz: 565bf79d023b462a49bfea2acd8ed6176ee0963f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38a9bae47426433d6141084df7fa03be415e5e8c0c8e05ffe90a65df1ffe2e9ee3a0e40ba4162afbbf3d8773f1cfdb7fd4da56325881da54bdf59b2da1dd5e17
|
7
|
+
data.tar.gz: 693a397ed652e758ab27390b842071da9f518acac69563358dfed7a409db8eaf5627d3a4a30dffcbfa5578387eef74098e23a4fd987158d05d1e7d3977394d6b
|
data/lib/thor-foodcritic.rb
CHANGED
@@ -5,6 +5,16 @@ module ThorFoodCritic
|
|
5
5
|
class Tasks < Thor
|
6
6
|
namespace "foodcritic"
|
7
7
|
|
8
|
+
method_option :cookbook_path,
|
9
|
+
type: :array,
|
10
|
+
aliases: "-B",
|
11
|
+
desc: "Cookbook path(s) to check.",
|
12
|
+
default: Dir.pwd
|
13
|
+
method_option :role_path,
|
14
|
+
type: :array,
|
15
|
+
aliases: "-R",
|
16
|
+
desc: "Role path(s) to check.",
|
17
|
+
default: Array.new
|
8
18
|
method_option :tags,
|
9
19
|
type: :array,
|
10
20
|
aliases: "-t",
|
@@ -25,10 +35,11 @@ module ThorFoodCritic
|
|
25
35
|
aliases: "-e",
|
26
36
|
desc: "Paths to exclude when running tests.",
|
27
37
|
default: ['test/**/*', 'spec/**/*', 'features/**/*']
|
28
|
-
desc "lint", "Run a lint test against the Cookbook
|
38
|
+
desc "lint", "Run a lint test against the specified Cookbook and Role paths or otherwise your current working directory."
|
29
39
|
def lint
|
30
40
|
review = ::FoodCritic::Linter.new.check(
|
31
|
-
cookbook_paths:
|
41
|
+
cookbook_paths: options[:cookbook_path],
|
42
|
+
role_paths: options[:role_path],
|
32
43
|
tags: options[:tags],
|
33
44
|
include_rules: options[:include],
|
34
45
|
fail_tags: options[:epic_fail],
|