Class: Bundler::AutoUpdate::Updater

Inherits:
Object
  • Object
show all
Defined in:
lib/bundler_auto_update.rb

Overview

class CLI

Constant Summary collapse

DEFAULT_TEST_COMMAND =
"rake"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(test_command = nil) ⇒ Updater

Returns a new instance of Updater.



26
27
28
# File 'lib/bundler_auto_update.rb', line 26

def initialize(test_command = nil)
  @test_command = test_command || DEFAULT_TEST_COMMAND
end

Instance Attribute Details

#test_commandObject (readonly)

Returns the value of attribute test_command.



24
25
26
# File 'lib/bundler_auto_update.rb', line 24

def test_command
  @test_command
end

Instance Method Details

#auto_update!Object



30
31
32
33
34
# File 'lib/bundler_auto_update.rb', line 30

def auto_update!
  gemfile.gems.each do |gem|
    GemUpdater.new(gem, gemfile, test_command).auto_update
  end
end

#gemfileObject



36
37
38
# File 'lib/bundler_auto_update.rb', line 36

def gemfile
  @gemfile ||= Gemfile.new
end