From bc10c5677908b20efe3049821f72df38e4fd30de Mon Sep 17 00:00:00 2001 From: Suyeol Jeon Date: Thu, 14 May 2015 01:51:20 +0900 Subject: [PATCH] Fix a bug that command seeds after targets won't be installed. --- lib/cocoaseeds/core.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/cocoaseeds/core.rb b/lib/cocoaseeds/core.rb index fe88999..4309d3c 100644 --- a/lib/cocoaseeds/core.rb +++ b/lib/cocoaseeds/core.rb @@ -73,19 +73,21 @@ def analyze_dependencies end def execute_seedfile + @current_target_name = nil + def target(*names, &code) names.each do |name| name = name.to_s # use string instead of symbol - @current_target_name = name - target = self.project.target_named(name) if not target raise Seeds::Exception.new\ "#{self.project.path.basename} doesn't have a target `#{name}`" end + @current_target_name = name code.call() end + @current_target_name = nil end def github(repo, tag, options={}) @@ -93,7 +95,6 @@ def github(repo, tag, options={}) target *self.project.targets.map(&:name) do send(__callee__, repo, tag, options) end - @current_target_name = nil else seed = Seeds::Seed::GitHub.new seed.url = "https://github.com/#{repo}" @@ -110,7 +111,6 @@ def github(repo, tag, options={}) end eval seedfile - @current_target_name = nil end def remove_seeds