class Dependabot::Elm::FileUpdater
Public Class Methods
updated_files_regex()
click to toggle source
# File lib/dependabot/elm/file_updater.rb, line 11 def self.updated_files_regex [ /^elm\.json$/ ] end
Public Instance Methods
updated_dependency_files()
click to toggle source
# File lib/dependabot/elm/file_updater.rb, line 17 def updated_dependency_files updated_files = [] elm_json_files.each do |file| next unless file_changed?(file) updated_files << updated_file( file: file, content: updated_elm_json_content(file) ) end raise "No files have changed!" if updated_files.none? updated_files end
Private Instance Methods
check_required_files()
click to toggle source
# File lib/dependabot/elm/file_updater.rb, line 37 def check_required_files return if elm_json_files.any? raise "No elm.json" end
elm_json_files()
click to toggle source
# File lib/dependabot/elm/file_updater.rb, line 50 def elm_json_files dependency_files.select { |f| f.name.end_with?("elm.json") } end
updated_elm_json_content(file)
click to toggle source
# File lib/dependabot/elm/file_updater.rb, line 43 def updated_elm_json_content(file) ElmJsonUpdater.new( dependencies: dependencies, elm_json_file: file ).updated_content end