Class: Danger::DangerWCC::Dependencies
- Inherits:
-
Object
- Object
- Danger::DangerWCC::Dependencies
- Includes:
- Utils
- Defined in:
- lib/wcc/dependencies.rb
Constant Summary collapse
- DEFAULT_OPTIONS =
{ lockfile: 'yarn.lock', severity: :warn }.freeze
Instance Method Summary collapse
-
#initialize(plugin, options = {}) ⇒ Dependencies
constructor
A new instance of Dependencies.
- #perform ⇒ Object
- #yarn_info ⇒ Object
Methods included from Utils
#diff_strings, #each_addition_in_diff, #each_file_in_diff, #each_line_in_diff, #find_file_in_diff, #find_in_diff, #format_links_as_markdown, #issue, #logger, #parsed_diffs, #plugin, #run, #run_and_diff, #with_revision
Constructor Details
#initialize(plugin, options = {}) ⇒ Dependencies
Returns a new instance of Dependencies.
20 21 22 23 |
# File 'lib/wcc/dependencies.rb', line 20 def initialize(plugin, = {}) @plugin = plugin @options = DEFAULT_OPTIONS.merge() end |
Instance Method Details
#perform ⇒ Object
25 26 27 28 29 |
# File 'lib/wcc/dependencies.rb', line 25 def perform return unless File.exist?(@options[:lockfile]) find_yarn_violations end |
#yarn_info ⇒ Object
15 16 17 18 |
# File 'lib/wcc/dependencies.rb', line 15 def yarn_info @yarn_info ||= Danger::DangerWCC::Util::YarnInfo.new(self, @options) end |