Class: Dependabot::FileUpdaters::Elm::ElmPackage
- Defined in:
- lib/dependabot/file_updaters/elm/elm_package.rb,
lib/dependabot/file_updaters/elm/elm_package/elm_json_updater.rb,
lib/dependabot/file_updaters/elm/elm_package/elm_package_updater.rb
Defined Under Namespace
Classes: ElmJsonUpdater, ElmPackageUpdater
Instance Attribute Summary
Attributes inherited from Base
#credentials, #dependencies, #dependency_files
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Dependabot::FileUpdaters::Base
Class Method Details
.updated_files_regex ⇒ Object
12 13 14 15 16 17 |
# File 'lib/dependabot/file_updaters/elm/elm_package.rb', line 12 def self.updated_files_regex [ /^elm-package\.json$/, /^elm\.json$/ ] end |
Instance Method Details
#updated_dependency_files ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/dependabot/file_updaters/elm/elm_package.rb', line 19 def updated_dependency_files updated_files = [] elm_package_files.each do |file| next unless file_changed?(file) updated_files << updated_file( file: file, content: updated_elm_package_content(file) ) end 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 |