Skip to content

Commit

Permalink
Added a quick and dirty dependency checker against the resource pack
Browse files Browse the repository at this point in the history
Prints out missing and (possibly) extra dependencies.

Signed-off-by: Ryan Davis <[email protected]>
  • Loading branch information
zenspider committed Aug 6, 2019
1 parent 9b1b8c6 commit 6c1fea5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,21 @@ namespace :test do
end
end

task :deps do
src = `curl -sL https://github.com/inspec/inspec-aws/archive/master.tar.gz | tar xO inspec-aws-master/Gemfile`

exp = src.lines.grep(/^gem..aws/)
exp.map! { |s| s[/aws-[\w-]+/] }
act = File.readlines("train-aws.gemspec").grep(/^ spec.add_dep.*aws-sdk/)
act.map! { |s| s[/aws-[\w-]+/] }

puts "# Missing:"
puts exp - act
puts
puts "# Extra?:"
puts act - exp
end

# #------------------------------------------------------------------#
# # Code Style Tasks
# #------------------------------------------------------------------#
Expand Down

0 comments on commit 6c1fea5

Please sign in to comment.