Created
November 28, 2013 10:10
-
-
Save thbar/7689740 to your computer and use it in GitHub Desktop.
Quick, slow, dirty way to verify how aged your gems are.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task :outdated => :environment do | |
include ActionView::Helpers::DateHelper | |
regexp = /\* ([^ ]+) \((\S+) > ([^)]+)\)/ | |
outdated = `bundle outdated`.scan(regexp) | |
outdated.each do |gem_name, available, current| | |
data = JSON.parse(`curl --silent https://rubygems.org/api/v1/versions/#{gem_name}.json`) | |
version = data.find { |e| e['number'] == current } | |
age = distance_of_time_in_words_to_now(Time.parse(version['built_at'])) | |
puts " * #{gem_name}: (#{available} > #{current}, built #{age} ago)" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment