lib/core/plugin/project.rb in nucleon-0.1.4 vs lib/core/plugin/project.rb in nucleon-0.1.5

- old
+ new

@@ -42,11 +42,11 @@ set_directory(Util::Disk.filename(get(:directory, Dir.pwd))) register set_url(get(:url)) if get(:url, false) - myself.plugin_name = path if myself.plugin_name == plugin_provider + myself.plugin_name = path ui.resource = plugin_name logger = plugin_name if keys = delete(:keys, nil) @@ -65,23 +65,23 @@ #--- def init_project init_auth init_parent - init_remotes - load_revision + init_remotes + load_revision end #----------------------------------------------------------------------------- # Plugin operations def register super if directory lib_path = File.join(directory, 'lib') if File.directory?(lib_path) - CORL.register(lib_path) + Nucleon.register(lib_path) end end end #----------------------------------------------------------------------------- @@ -372,10 +372,12 @@ protected :load_revision #--- def checkout(revision) + success = false + if can_persist? localize do if extension_check(:checkout, { :revision => revision }) logger.info("Checking out project #{name} revision: #{revision}") @@ -391,10 +393,11 @@ end end else logger.warn("Project #{name} does not meet the criteria for persistence and can not checkout a revision") end + success end #--- def commit(files = '.', options = {}) @@ -709,11 +712,11 @@ end #----------------------------------------------------------------------------- # Remote operations - def pull(remote = :origin, options = {}) + def pull(remote = :edit, options = {}) success = false if can_persist? localize do config = Config.ensure(options).import({ :remote => remote }) @@ -726,11 +729,11 @@ success = yield(config, remote) if block_given? if success load_revision update_subprojects - + extension(:pull_success, { :directory => directory, :remote => remote, :config => config }) if ! parent.nil? && config.get(:propogate, true) logger.debug("Commit to parent as parent exists and propogate option was given") @@ -770,10 +773,10 @@ extension(:push_success, { :directory => directory, :remote => remote, :config => config }) if config.get(:propogate, true) logger.debug("Pushing sub projects as propogate option was given") - foreach! do |path, project| + each do |path, project| project.push(remote, config) end end end end