Class: PolishGeeks::DevTools::Commands::BundlerAudit
- Defined in:
- lib/polish_geeks/dev_tools/commands/bundler_audit.rb
Overview
Command wrapper for Bundler Audit Checks for vulnerable versions of gems in Gemfile.lock.
Constant Summary
Constants inherited from Base
PolishGeeks::DevTools::Commands::Base::TYPES
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#execute ⇒ String
Executes this command.
-
#valid? ⇒ Boolean
True if there were no vulnerabilities found.
Methods inherited from Base
#ensure_executable!, #error_message
Instance Method Details
#execute ⇒ String
Executes this command
12 13 14 |
# File 'lib/polish_geeks/dev_tools/commands/bundler_audit.rb', line 12 def execute @output = Shell.new.execute('bundle-audit update 2>&1 > /dev/null; bundle-audit check') end |
#valid? ⇒ Boolean
Returns true if there were no vulnerabilities found.
17 18 19 |
# File 'lib/polish_geeks/dev_tools/commands/bundler_audit.rb', line 17 def valid? @output.match(/Unpatched versions found/).nil? end |