Skip to content
Browse files

Allow the analyzer to do its work without updating sources.

This is needed for: HipByte/motion-cocoapods#50
  • Loading branch information...
1 parent 80de2e3 commit 371f7baed8b44c4662f1204635fccebd4922b375 @alloy alloy committed Mar 28, 2013
Showing with 6 additions and 4 deletions.
  1. +6 −4 lib/cocoapods/installer/analyzer.rb
View
10 lib/cocoapods/installer/analyzer.rb
@@ -45,14 +45,14 @@ def initialize(sandbox, podfile, lockfile = nil)
#
# @return [AnalysisResult]
#
- def analyze
- update_repositories_if_needed
+ def analyze(allow_fetches = true)
+ update_repositories_if_needed if allow_fetches
@result = AnalysisResult.new
@result.podfile_state = generate_podfile_state
@locked_dependencies = generate_version_locking_dependencies
@result.libraries = generated_libraries
- fetch_external_sources
+ fetch_external_sources if allow_fetches
@result.specs_by_target = resolve_dependencies
@result.specifications = generate_specifications
@result.sandbox_state = generate_sandbox_state
@@ -79,7 +79,9 @@ def podfile_needs_install?
# @return [Bool] Whether the sandbox is in synch with the lockfile.
#
def sandbox_needs_install?
- lockfile != sandbox.manifest
+ state = generate_sandbox_state
+ needing_install = state.added + state.changed + state.deleted
+ !needing_install.empty?
end
#-----------------------------------------------------------------------#

0 comments on commit 371f7ba

Please sign in to comment.
Something went wrong with that request. Please try again.