Class: RubyDep::Warning
- Inherits:
-
Object
- Object
- RubyDep::Warning
- Defined in:
- lib/ruby_dep/warning.rb
Constant Summary collapse
- PREFIX =
'RubyDep: WARNING: '.freeze
- MSG_BUGGY =
'Your Ruby is outdated/buggy.'.freeze
- MSG_INSECURE =
'Your Ruby has security vulnerabilities!'.freeze
- MSG_HOW_TO_DISABLE =
' (To disable warnings, set'\ ' RUBY_DEP_GEM_SILENCE_WARNINGS=1)'.freeze
- OPEN_ISSUE_FOR_UNRECOGNIZED =
'If this version is important,'\ ' please open an issue at http://github.com/e2/ruby_dep'.freeze
Instance Method Summary collapse
Instance Method Details
#show_warnings ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ruby_dep/warning.rb', line 13 def show_warnings return if silenced? case (status = check_ruby) when :insecure warn_ruby(MSG_INSECURE, status) when :buggy warn_ruby(MSG_BUGGY, status) when :unknown else raise "Unknown problem type: #{problem.inspect}" end end |