grodowski / undercover

undercover warns about methods, classes and blocks that were changed without tests, to help you easily find untested code and reduce the number of bugs. It does so by analysing data from git diffs, code structure and SimpleCov coverage reports

Home Page:https://undercover-ci.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NameError: uninitialized constant Imagen::AVAILABLE_RUBY_VERSIONS

fabioperrella opened this issue · comments

Hi!

When using the gem imagen in version 0.1.2, it raises an error as the following:

$ bundle exec undercover --version
warning: parser/current is loading parser/ruby22, which recognizes
warning: 2.2.x-compliant syntax, but you are running 2.3.5.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
bundler: failed to load command: undercover (/home/fabioperrella/.rbenv/versions/2.3.5/bin/undercover)
NameError: uninitialized constant Imagen::AVAILABLE_RUBY_VERSIONS
  /home/fabioperrella/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/undercover-0.3.2/lib/undercover/options.rb:111:in `ruby_syntax_option'
  /home/fabioperrella/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/undercover-0.3.2/lib/undercover/options.rb:53:in `block in parse'
  /home/fabioperrella/.rbenv/versions/2.3.5/lib/ruby/2.3.0/optparse.rb:1062:in `initialize'
  /home/fabioperrella/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/undercover-0.3.2/lib/undercover/options.rb:36:in `new'
  /home/fabioperrella/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/undercover-0.3.2/lib/undercover/options.rb:36:in `parse'
  /home/fabioperrella/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/undercover-0.3.2/lib/undercover/cli.rb:18:in `run'
  /home/fabioperrella/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/undercover-0.3.2/bin/undercover:11:in `block in <top (required)>'
  /home/fabioperrella/.rbenv/versions/2.3.5/lib/ruby/2.3.0/benchmark.rb:308:in `realtime'
  /home/fabioperrella/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/undercover-0.3.2/bin/undercover:10:in `<top (required)>'
  /home/fabioperrella/.rbenv/versions/2.3.5/bin/undercover:23:in `load'
  /home/fabioperrella/.rbenv/versions/2.3.5/bin/undercover:23:in `<top (required)>'

I think it is necessary to change the gemspec file and require the correct minimum version for the gem imagen to avoid this problem.

Thanks for opening this issue @fabioperrella, I'll ship a fixup release shortly!