Skip to content

Commit

Permalink
Merge pull request #6 from mattlqx/cookbook-metadata
Browse files Browse the repository at this point in the history
fix false return from metadata walk
  • Loading branch information
mattlqx authored Mar 28, 2019
2 parents c74a6a5 + a1e5af1 commit 3842aa6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To check Chef cookbook version bumps, use the `chef-cookbook-version` hook. Each
To unit test Ruby changes in your repo, use the `rspec` hook. Each path in your repo with a `spec` directory should have a `Gemfile` that includes your desired version of rspec (or a derivative library). It will be installed via Bundler prior to testing. Rspec will only be run against the closest directory in a changed file's path with a spec dir.

- repo: https://github.com/mattlqx/pre-commit-ruby
rev: v1.2.4
rev: v1.2.5
hooks:
- id: rubocop
- id: foodcritic
Expand Down
2 changes: 1 addition & 1 deletion bin/cookbook-wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def method_missing(sym, *args, &_block) # rubocop:disable Metrics/AbcSize, Style
changed_cookbooks = []
ARGV.each do |file|
cookbook, type = metadata_walk(file)
next if changed_cookbooks.map(&:first).include?(cookbook)
next if cookbook == false || changed_cookbooks.map(&:first).include?(cookbook)

changed_cookbooks << [cookbook, type] if bump_required?(file)
end
Expand Down

0 comments on commit 3842aa6

Please sign in to comment.