Class: RubyDep::Warning
- Inherits:
-
Object
- Object
- RubyDep::Warning
- Defined in:
- lib/ruby_dep/warning.rb
Constant Summary collapse
- MSG_BUGGY =
'RubyDep: WARNING: your Ruby is outdated/buggy.'\ ' Please upgrade.'.freeze
- MSG_INSECURE =
'RubyDep: WARNING: your Ruby has security vulnerabilities!'\ ' Please upgrade!'.freeze
- MSG_HOW_TO_DISABLE =
' (To disable warnings, set'\ ' RUBY_DEP_GEM_SILENCE_WARNINGS=1)'.freeze
Instance Method Summary collapse
Instance Method Details
#show_warnings ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ruby_dep/warning.rb', line 12 def show_warnings return if silenced? case check_ruby when :insecure STDERR.puts MSG_INSECURE + MSG_HOW_TO_DISABLE when :buggy STDERR.puts MSG_BUGGY + MSG_HOW_TO_DISABLE when :unknown else raise "Unknown problem type: #{problem.inspect}" end end |