thought-driven / bummr

Update your gems in separate commits. Identify any that fail your build.
MIT License
234 stars 23 forks source link

Bummr says no outdated gems to update even though the output shows there are outdated gems #67

Closed monfresh closed 3 years ago

monfresh commented 3 years ago

I'm not sure if this is due to some changes on the Bundler side, but lately, Bummr hasn't been able to detect updates, even with the --all option. Here is a run from just now in this repo: https://github.com/codeforamerica/ohana-web-search

Bummr 0.5.0
To run Bummr, you must:
- Be in the root path of a clean git branch off of master
- Have no commits or local changes
- Have a 'log' directory, where we can place logs
- Have your build configured to fail fast (recommended)
- Have locked any Gem version that you don't wish to update in your Gemfile
- It is recommended that you lock your versions of `ruby` and `rails` in your `Gemfile`

Your test command is: 'bundle exec rake'

Bummr will run with the following options:
--all: false

Run `bummr help update` for more information.

Are you ready to use Bummr? (y/n) y
Ready to run bummr.
Bummr update initiated 2021-04-09 22:28:06 -0400
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...............

Gem                    Current  Latest   Requested  Groups
addressable            2.5.2    2.7.0
ast                    2.4.1    2.4.2
benchmark-ips          2.8.2    2.8.4
capybara               3.34.0   3.35.3   >= 0       test
chunky_png             1.3.11   1.4.0
crack                  0.4.4    0.4.5
derailed_benchmarks    1.7.0    2.0.1
diff-lcs               1.3      1.4.4
docile                 1.3.2    1.3.5
faraday                0.17.3   1.3.0
ffi                    1.14.2   1.15.0
font-awesome-rails     4.7.0.5  4.7.0.7  >= 0       default
get_process_mem        0.2.5    0.2.7
google-api-client      0.52.0   0.53.0   ~> 0.9     default
googleauth             0.14.0   0.16.1
haml_lint              0.36.0   0.37.0   >= 0       test
heapy                  0.1.4    0.2.0
i18n                   1.8.9    1.8.10
json                   2.3.0    2.5.1
launchy                2.4.3    2.5.0
listen                 3.1.5    3.5.1
loofah                 2.9.0    2.9.1
memory_profiler        0.9.14   1.0.0
mini_histogram         0.1.3    0.3.1
mini_mime              1.0.3    1.1.0
nio4r                  2.5.4    2.5.7
nokogiri               1.11.2   1.11.3
nokogiri               1.11.2   1.11.3
parser                 2.7.2.0  3.0.1.0
psych                  3.2.1    3.3.1
public_suffix          3.1.1    4.0.6
puma                   5.1.1    5.2.2    >= 0       default
rack-mini-profiler     2.2.0    2.3.1    >= 0       development
rb-fsevent             0.10.3   0.10.4
reek                   6.0.2    6.0.3    >= 0       development
regexp_parser          1.8.2    2.1.1
rexml                  3.2.4    3.2.5
rspec-core             3.9.1    3.9.3
rspec-expectations     3.9.1    3.9.4
rspec-support          3.9.2    3.9.4
rubocop                1.6.1    1.12.1   >= 0       test
rubocop-ast            1.3.0    1.4.1
ruby-progressbar       1.10.1   1.11.0
ruby-statistics        2.1.2    2.1.3
ruby_parser            3.13.1   3.15.1
sawyer                 0.8.1    0.8.2
semantic_range         2.3.1    3.0.0
sexp_processor         4.12.1   4.15.2
signet                 0.14.0   0.15.0
sprockets-rails        3.2.1    3.2.2
unicode-display_width  1.7.0    2.0.0
webdrivers             4.4.1    4.6.0    >= 4.1.2   test
webmock                3.11.0   3.12.2   >= 0       test
yard                   0.9.25   0.9.26   >= 0       development
No outdated gems to update

Unless I'm misremembering, I'm pretty sure that when a gem that was specified in the Gemfile was outdated, bummr used to be able to detect that. For example, I would expect it to upgrade google-api-client, which is specified like this in the Gemfile:

gem 'google-api-client', '~> 0.9'
monfresh commented 3 years ago

It looks like the output from bundle outdated has changed, and this regex is failing now.

monfresh commented 3 years ago

I think this fixes it:

def parse_gem_from(line)
  regex = /(.*)\s+(\d[\d\.]*\d)\s+(\d[\d\.]*\d)/.match line

  unless regex.nil?
    { name: regex[1].strip, newest: regex[3], installed: regex[2] }
  end
end
lpender commented 3 years ago

This is an issue with Bundler 2.2 output, fixed in v0.6.0

gem install bummr

should update/fix.

See https://github.com/lpender/bummr/pull/63