scoop / bundle_outdated Goto Github PK
View Code? Open in Web Editor NEWFind out which gems in your bundle are outdated.
Home Page: http://patricklenz.com/posts/bundle-outdated
License: MIT License
Find out which gems in your bundle are outdated.
Home Page: http://patricklenz.com/posts/bundle-outdated
License: MIT License
Hello,
I did like explained in the documentation:
$ gem install bundle_outdated
$ gem update --system 1.6.0
$ bundle-outdated
Finding outdated gems..
/Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/gem_dependency.rb:40:in `<': comparison of Gem::Version with nil failed (ArgumentError)
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/gem_dependency.rb:40:in `outdated?'
from /Users/zedtux/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `to_proc'
from /Users/zedtux/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `find_all'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:31:in `each'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:31:in `find_all'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:31:in `outdated_gems'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:8:in `search!'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated.rb:7:in `search!'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/bin/bundle-outdated:23
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/bin/bundle-outdated:19:in `load'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/bin/bundle-outdated:19
I've added at line 34 of the file lib/bundle_outdated/gem_dependency.rb the line
puts "latest_version_for(#{name}): #{Gem.latest_version_for(name)}"
Then I got this output:
$ bundle-outdated
Finding outdated gems..
latest_version_for(bundler): 1.0.13
latest_version_for(rake): 0.8.7
latest_version_for(activesupport): 3.0.7
latest_version_for(activerecord): 3.0.7
latest_version_for(actionpack): 3.0.7
latest_version_for(actionmailer): 3.0.7
latest_version_for(activeresource): 3.0.7
latest_version_for(rails): 3.0.7
latest_version_for(rmagick): 2.13.1
latest_version_for(uuid): 2.3.2
latest_version_for(ruby-ole): 1.2.11.1
latest_version_for(rjb): 1.3.4
latest_version_for(RedCloth): 4.2.7
latest_version_for(thinking-sphinx): 2.0.3
latest_version_for(haml): 3.1.1
latest_version_for(paperclip): 2.3.11
latest_version_for(will_paginate): 2.3.15
latest_version_for(datanoise-actionwebservice):
/Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/gem_dependency.rb:40:in `<': comparison of Gem::Version with nil failed (ArgumentError)
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/gem_dependency.rb:40:in `outdated?'
from /Users/zedtux/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `to_proc'
from /Users/zedtux/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `find_all'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:31:in `each'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:31:in `find_all'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:31:in `outdated_gems'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated/searcher.rb:8:in `search!'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/lib/bundle_outdated.rb:7:in `search!'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/gems/bundle_outdated-0.0.2/bin/bundle-outdated:23
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/bin/bundle-outdated:19:in `load'
from /Users/zedtux/.rvm/gems/ree-1.8.7-2011.03/bin/bundle-outdated:19
/home/vagrant/lib/ruby/2.0.0/rubygems/version.rb:191:in `initialize': Malformed version number string ~> 3.2.3 (ArgumentError)
Bundler supports version specifier like this to exclude a specific version:
gem 'mail', '!= 2.4.1'
But bundle_outdated does not handle this, on running bundle-outdated
we get this error message:
Malformed version number string != 2.4.1 (ArgumentError)
It seems that a regex needs a small change.
Running bundle-outdated
, I get the following:
bundle-outdated 2s
Finding outdated gems..
/Users/me/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/bundle_outdated-0.0.4/lib/bundle_outdated/searcher.rb:39:in `gemfile': undefined method `exists?' for File:Class (NoMethodError)
unless File.exists?('Gemfile')
^^^^^^^^
Did you mean? exist?
from /Users/me/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/bundle_outdated-0.0.4/lib/bundle_outdated/searcher.rb:47:in `all_gems'
from /Users/me/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/bundle_outdated-0.0.4/lib/bundle_outdated/searcher.rb:31:in `outdated_gems'
from /Users/me/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/bundle_outdated-0.0.4/lib/bundle_outdated/searcher.rb:8:in `search!'
from /Users/me/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/bundle_outdated-0.0.4/lib/bundle_outdated.rb:7:in `search!'
from /Users/me/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/bundle_outdated-0.0.4/bin/bundle-outdated:23:in `<top (required)>'
from /Users/me/.rbenv/versions/3.2.1/bin/bundle-outdated:25:in `load'
from /Users/me/.rbenv/versions/3.2.1/bin/bundle-outdated:25:in `<main>'
I've got
$ gem -v
SlimGems 1.3.9.4
Using bundle_outdated in our project raises on bundle install
:
Gem::InstallError: bundle_outdated requires SlimGems version >= 1.6.0. Try 'gem update --system' to update SlimGems itself.
Is this a known fact? Do you know of any workaround?
Some of us are still running 1.8.7 but we want to keep our gems updated anyway (we're crazy like that). Unfortunately bundle_outdated doesn't seem to work with 1.8.x. I at first suspected that it was a neglected inclusion of rubygems, but that doesn't seem to be it (hence I am submitting this issue rather than a pull request). Perhaps it is a rubygems version requirement that is not identified?
I can confirm it runs correctly w/ 1.9.2-p180.
$ bundle-outdated
Finding outdated gems..
/home/mikej/.rvm/gems/ruby-1.8.7-p302/gems/bundle_outdated-0.0.1/lib/bundle_outdated.rb:38:in `latest_version': undefined method `latest_version_for' for Gem:Module (NoMethodError)
from /home/mikej/.rvm/gems/ruby-1.8.7-p302/gems/bundle_outdated-0.0.1/lib/bundle_outdated.rb:43:in `outdated?'
from /home/mikej/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `to_proc'
from /home/mikej/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `find_all'
from /home/mikej/.rvm/gems/ruby-1.8.7-p302/gems/bundle_outdated-0.0.1/lib/bundle_outdated.rb:76:in `each'
from /home/mikej/.rvm/gems/ruby-1.8.7-p302/gems/bundle_outdated-0.0.1/lib/bundle_outdated.rb:76:in `find_all'
from /home/mikej/.rvm/gems/ruby-1.8.7-p302/gems/bundle_outdated-0.0.1/lib/bundle_outdated.rb:76:in `outdated_gems'
from /home/mikej/.rvm/gems/ruby-1.8.7-p302/gems/bundle_outdated-0.0.1/lib/bundle_outdated.rb:53:in `search!'
from /home/mikej/.rvm/gems/ruby-1.8.7-p302/gems/bundle_outdated-0.0.1/lib/bundle_outdated.rb:3:in `search!'
from /home/mikej/.rvm/gems/ruby-1.8.7-p302/gems/bundle_outdated-0.0.1/bin/bundle-outdated:22
from /home/mikej/.rvm/gems/ruby-1.8.7-p302/bin/bundle-outdated:19:in `load'
from /home/mikej/.rvm/gems/ruby-1.8.7-p302/bin/bundle-outdated:19
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.