Unverified Commit ac26c003 authored by Dimitris Koutsogiorgas's avatar Dimitris Koutsogiorgas Committed by GitHub

Merge pull request #7618 from amorde/sandbox-analyzer

Remove :lockfile attribute from SandboxAnalyzer
parents 66373327 af4fe25a
......@@ -861,7 +861,7 @@ module Pod
def generate_sandbox_state
sandbox_state = nil
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.print
end
......
......@@ -42,23 +42,16 @@ module Pod
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
#
# @param [Sandbox] sandbox @see #sandbox
# @param [Array<Specifications>] specs @see #specs
# @param [Bool] update_mode @see #update_mode
# @param [Lockfile] lockfile @see #lockfile
# @param [Sandbox] sandbox @see sandbox
# @param [Array<Specifications>] specs @see specs
# @param [Bool] update_mode @see update_mode
#
def initialize(sandbox, specs, update_mode, lockfile = nil)
def initialize(sandbox, specs, update_mode)
@sandbox = sandbox
@specs = specs
@update_mode = update_mode
@lockfile = lockfile
end
# Performs the analysis to the detect the state of the sandbox respect
......@@ -160,7 +153,7 @@ module Pod
# @return [Lockfile] The manifest to use for the sandbox.
#
def sandbox_manifest
sandbox.manifest || lockfile
sandbox.manifest
end
#--------------------------------------#
......
Subproject commit 1f8a4113cdb89f7bda6aea5f9932a6944f9e36fe
Subproject commit d7a64c03deab9decfa5c7e3af0af88ae225b1fc9
......@@ -92,13 +92,6 @@ module Pod
@analyzer.send(:sandbox_manifest).should == @manifest
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
......
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