Class: Dependabot::Helm::FileUpdater::ChartUpdater
- Inherits:
-
Object
- Object
- Dependabot::Helm::FileUpdater::ChartUpdater
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/helm/file_updater/chart_updater.rb
Instance Method Summary collapse
-
#initialize(dependency:) ⇒ ChartUpdater
constructor
A new instance of ChartUpdater.
- #updated_chart_yaml_content(file) ⇒ Object
Constructor Details
#initialize(dependency:) ⇒ ChartUpdater
Returns a new instance of ChartUpdater.
22 23 24 |
# File 'lib/dependabot/helm/file_updater/chart_updater.rb', line 22 def initialize(dependency:) @dependency = dependency end |
Instance Method Details
#updated_chart_yaml_content(file) ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/dependabot/helm/file_updater/chart_updater.rb', line 27 def updated_chart_yaml_content(file) content = file.content yaml_obj = YAML.safe_load(T.must(content)) content = update_chart_dependencies(T.must(content), yaml_obj, file) raise "Expected content to change!" if content == file.content content end |