Sha256: e3ab84d078ff5176ea92f540f5b4c6b91847b0113eec308563edec588d263d5c
Contents?: true
Size: 1.75 KB
Versions: 14
Compression:
Stored size: 1.75 KB
Contents
require 'rake_factory' require_relative '../tasks' module RakeGithub module TaskSets class Repository < RakeFactory::TaskSet prepend RakeFactory::Namespaceable parameter :repository, required: true parameter :access_token, required: true parameter :deploy_keys, default: [] parameter :deploy_keys_namespace, default: :deploy_keys parameter :deploy_keys_destroy_task_name, default: :destroy parameter :deploy_keys_provision_task_name, default: :provision parameter :deploy_keys_ensure_task_name, default: :ensure task Tasks::DeployKeys::Provision, name: RakeFactory::DynamicValue.new { |ts| ts.deploy_keys_provision_task_name } task Tasks::DeployKeys::Destroy, name: RakeFactory::DynamicValue.new { |ts| ts.deploy_keys_destroy_task_name } task Tasks::DeployKeys::Ensure, name: RakeFactory::DynamicValue.new { |ts| ts.deploy_keys_ensure_task_name }, provision_task_name: RakeFactory::DynamicValue.new { |ts| ts.deploy_keys_provision_task_name }, destroy_task_name: RakeFactory::DynamicValue.new { |ts| ts.deploy_keys_destroy_task_name } def define_on(application) around_define(application) do self.class.tasks.each do |task_definition| ns = case task_definition.klass.to_s when /DeployKeys/ deploy_keys_namespace else nil end application.in_namespace(ns) do task_definition .for_task_set(self) .define_on(application) end end end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems