Class: Dependabot::Bundler::FileUpdater::GemspecUpdater
- Inherits:
-
Object
- Object
- Dependabot::Bundler::FileUpdater::GemspecUpdater
- Defined in:
- lib/dependabot/bundler/file_updater/gemspec_updater.rb
Instance Method Summary collapse
-
#initialize(dependencies:, gemspec:) ⇒ GemspecUpdater
constructor
A new instance of GemspecUpdater.
- #updated_gemspec_content ⇒ Object
Constructor Details
#initialize(dependencies:, gemspec:) ⇒ GemspecUpdater
Returns a new instance of GemspecUpdater.
12 13 14 15 |
# File 'lib/dependabot/bundler/file_updater/gemspec_updater.rb', line 12 def initialize(dependencies:, gemspec:) @dependencies = dependencies @gemspec = gemspec end |
Instance Method Details
#updated_gemspec_content ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/dependabot/bundler/file_updater/gemspec_updater.rb', line 17 def updated_gemspec_content content = gemspec.content dependencies.each do |dependency| content = replace_gemspec_version_requirement( gemspec, dependency, content ) end content end |