Commit bf09f4bd authored by Marius Rackwitz's avatar Marius Rackwitz

Refactoring: Renamed Installer#update_mode to Installer#update

parent 43576820
...@@ -34,7 +34,7 @@ module Pod ...@@ -34,7 +34,7 @@ module Pod
# #
def run_install_with_update(update) def run_install_with_update(update)
installer = Installer.new(config.sandbox, config.podfile, config.lockfile) installer = Installer.new(config.sandbox, config.podfile, config.lockfile)
installer.update_mode = update installer.update = update
installer.install! installer.install!
end end
end end
......
...@@ -64,11 +64,12 @@ module Pod ...@@ -64,11 +64,12 @@ module Pod
@lockfile = lockfile @lockfile = lockfile
end end
# @return [Bool] Whether the installer is in update mode. In update mode # @return [Hash, Boolean, nil] Pods that have been requested to be
# the contents of the Lockfile are not taken into account for # updated or true if all Pods should be updated.
# deciding what Pods to install. # If all Pods should been updated the contents of the Lockfile are
# not taken into account for deciding what Pods to install.
# #
attr_accessor :update_mode attr_accessor :update
# Installs the Pods. # Installs the Pods.
# #
...@@ -169,7 +170,7 @@ module Pod ...@@ -169,7 +170,7 @@ module Pod
end end
analyzer = Analyzer.new(sandbox, podfile, lockfile) analyzer = Analyzer.new(sandbox, podfile, lockfile)
analyzer.update_mode = update_mode analyzer.update_mode = update
@analysis_result = analyzer.analyze @analysis_result = analyzer.analyze
@aggregate_targets = analyzer.result.targets @aggregate_targets = analyzer.result.targets
end end
......
...@@ -113,7 +113,7 @@ module Pod ...@@ -113,7 +113,7 @@ module Pod
end end
it "configures the analyzer to use update mode if appropriate" do it "configures the analyzer to use update mode if appropriate" do
@installer.update_mode = true @installer.update = true
Installer::Analyzer.any_instance.expects(:update_mode=).with(true) Installer::Analyzer.any_instance.expects(:update_mode=).with(true)
@installer.send(:analyze) @installer.send(:analyze)
@installer.aggregate_targets.map(&:name).sort.should == ['Pods'] @installer.aggregate_targets.map(&:name).sort.should == ['Pods']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment