Commit af4fe25a authored by Eric Amorde's avatar Eric Amorde

Remove :lockfile attribute from SandboxAnalyzer

parent 66373327
...@@ -861,7 +861,7 @@ module Pod ...@@ -861,7 +861,7 @@ module Pod
def generate_sandbox_state def generate_sandbox_state
sandbox_state = nil sandbox_state = nil
UI.section 'Comparing resolved specification to the sandbox manifest' do UI.section 'Comparing resolved specification to the sandbox manifest' do
sandbox_analyzer = SandboxAnalyzer.new(sandbox, result.specifications, update_mode?, lockfile) sandbox_analyzer = SandboxAnalyzer.new(sandbox, result.specifications, update_mode?)
sandbox_state = sandbox_analyzer.analyze sandbox_state = sandbox_analyzer.analyze
sandbox_state.print sandbox_state.print
end end
......
...@@ -42,23 +42,16 @@ module Pod ...@@ -42,23 +42,16 @@ module Pod
alias_method :update_mode?, :update_mode alias_method :update_mode?, :update_mode
# @return [Lockfile] The lockfile of the installation as a fall-back if
# there is no sandbox manifest.
#
attr_reader :lockfile
# Init a new SandboxAnalyzer # Init a new SandboxAnalyzer
# #
# @param [Sandbox] sandbox @see #sandbox # @param [Sandbox] sandbox @see sandbox
# @param [Array<Specifications>] specs @see #specs # @param [Array<Specifications>] specs @see specs
# @param [Bool] update_mode @see #update_mode # @param [Bool] update_mode @see update_mode
# @param [Lockfile] lockfile @see #lockfile
# #
def initialize(sandbox, specs, update_mode, lockfile = nil) def initialize(sandbox, specs, update_mode)
@sandbox = sandbox @sandbox = sandbox
@specs = specs @specs = specs
@update_mode = update_mode @update_mode = update_mode
@lockfile = lockfile
end end
# Performs the analysis to the detect the state of the sandbox respect # Performs the analysis to the detect the state of the sandbox respect
...@@ -160,7 +153,7 @@ module Pod ...@@ -160,7 +153,7 @@ module Pod
# @return [Lockfile] The manifest to use for the sandbox. # @return [Lockfile] The manifest to use for the sandbox.
# #
def sandbox_manifest def sandbox_manifest
sandbox.manifest || lockfile sandbox.manifest
end end
#--------------------------------------# #--------------------------------------#
......
Subproject commit 1f8a4113cdb89f7bda6aea5f9932a6944f9e36fe Subproject commit d7a64c03deab9decfa5c7e3af0af88ae225b1fc9
...@@ -92,13 +92,6 @@ module Pod ...@@ -92,13 +92,6 @@ module Pod
@analyzer.send(:sandbox_manifest).should == @manifest @analyzer.send(:sandbox_manifest).should == @manifest
end end
it 'returns the lockfile as the sandbox if one is not available' do
lockfile = Lockfile.new({})
@sandbox.stubs(:manifest)
@analyzer.stubs(:lockfile).returns(lockfile)
@analyzer.send(:sandbox_manifest).should == lockfile
end
#--------------------------------------# #--------------------------------------#
it 'returns the root name of the resolved Pods' do it 'returns the root name of the resolved Pods' do
......
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