Skip to content

Commit

Permalink
External sources.
Browse files Browse the repository at this point in the history
  • Loading branch information
James Campbell committed Mar 15, 2016
1 parent 67e6900 commit 4939b5e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 7 additions & 2 deletions lib/cocoapods-deploy/deploy_downloader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 22,15 @@ def download_source(config)

def download_podspec(config)
dependencies_for_sources(config).each do |dep|
puts "woo #{dep}"
source = ExternalSources.from_dependency(dep, config.podfile.defined_in_file)
source.fetch

begin
return source.fetch
rescue
end
end

raise Informative, "Failed to deploy podspec for `#{@dependency.name}`."
end

def podfile_sources(config)
Expand Down
3 changes: 1 addition & 2 deletions spec/deploy_downloader_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 24,14 @@ module Pod
downloader = DeployDownloader.new(dependency)

@source.expects(:fetch)

downloader.download(Config.instance)
end

it "should download source from main repo" do
dependency = Dependency.new("AFNetworking", { :podspec => "{root-url}/master/Specs/AFNetworking/1.0/AFNetworking.podspec.json"})
downloader = DeployDownloader.new(dependency)

ExternalSources.stubs(:from_dependency).returns(@source)
@source.expects(:fetch)
downloader.download(Config.instance)
end
end
Expand Down

0 comments on commit 4939b5e

Please sign in to comment.