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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 546277484221dadaf876fbe1aae02095cb0c4401
4
- data.tar.gz: 476d643f973898a4b921919b92fd59a0529cb48d
3
+ metadata.gz: 364a19a82f19d4dccc1e2b592d0b5a3f9d138363
4
+ data.tar.gz: 565bf79d023b462a49bfea2acd8ed6176ee0963f
5
5
  SHA512:
6
- metadata.gz: 6712417b89462259e59d5a26104f91136349c0f843f6da609c331f2c943b58447e1188d22e3b70ee18d364f1164149a63514b585cc046c05d96ce66cc7699626
7
- data.tar.gz: ac5005b6795b61db831ac58daa7ce31fc5cfb18cf887abe229a691cde7390ffdb602e25fd9291f75f30ef0b5ab3081ce4d580ccb24feeb47ef9f4dd7b9b859e2
6
+ metadata.gz: 38a9bae47426433d6141084df7fa03be415e5e8c0c8e05ffe90a65df1ffe2e9ee3a0e40ba4162afbbf3d8773f1cfdb7fd4da56325881da54bdf59b2da1dd5e17
7
+ data.tar.gz: 693a397ed652e758ab27390b842071da9f518acac69563358dfed7a409db8eaf5627d3a4a30dffcbfa5578387eef74098e23a4fd987158d05d1e7d3977394d6b
@@ -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 in your current working directory."
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: Dir.pwd,
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],
@@ -1,3 +1,3 @@
1
1
  module ThorFoodCritic
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thor-foodcritic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Winsor