Skip to content

Commit

Permalink
Add rake task for checking outdated gems
Browse files Browse the repository at this point in the history
This runs the `bundle outdated` command with:
* --only-explicit
* displaying the output
* recording the output in tmp/bundle_outdated.txt
  • Loading branch information
acant committed Oct 28, 2022
1 parent e665b44 commit 7311ba9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,14 @@ Yardstick::Rake::Measurement.new(:yardstick_measure) do |measurement|
measurement.output = 'tmp/yard_coverage.txt'
end

desc 'Show which specified gems are outdated'
task 'bundle:outdated' do
bundle_outdated_report_pathname =
Pathname(Rake.application.original_dir).join('tmp', 'bundle_outdated.txt')
bundle_outdated_report_pathname.dirname.mkpath

# TODO: Should consider re-writing this without using `tee`.
sh("bundle outdated --only-explicit | tee #{bundle_outdated_report_pathname}")
end

task default: %i[spec features rubocop yardstick_measure bundle:audit license_finder]

0 comments on commit 7311ba9

Please sign in to comment.