Sha256: 0ae14a8b874d96764ed88d19e605b977c7d2228b7855f43514932e9c142781a1

Contents?: true

Size: 1.13 KB

Versions: 10

Compression:

Stored size: 1.13 KB

Contents

module Nucleon
module Action
module Cloud
class Create < Nucleon.plugin_class(:nucleon, :cloud_action)

  include Mixin::Action::Project
 
  #-----------------------------------------------------------------------------
  # Info
  
  def self.describe
    super(:cloud, :create, 1000)
  end
  
  #-----------------------------------------------------------------------------
  # Settings
  
  def configure
    super do    
      config.defaults(CORL.action_config(:project_create))      
      config[:project_reference].default = 'github:::coralnexus/network-template'
    end
  end
  
  #---
  
  def ignore
    node_ignore
  end
  
  def arguments
    [ :project_reference ]
  end
 
  #-----------------------------------------------------------------------------
  # Operations
   
  def execute
    super(false) do
      info('start')
      
      project       = project_load(settings[:path], true, true)
      myself.status = code.project_failure unless project
      
      if project.remote(:origin) =~ /coralnexus\/network\-template/
        project.delete_remote(:origin)
        project.delete_remote(:edit)
      end
    end
  end
end
end
end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
corl-0.5.11 lib/nucleon/action/cloud/create.rb
corl-0.5.10 lib/nucleon/action/cloud/create.rb
corl-0.5.9 lib/nucleon/action/cloud/create.rb
corl-0.5.8 lib/nucleon/action/cloud/create.rb
corl-0.5.7 lib/nucleon/action/cloud/create.rb
corl-0.5.6 lib/nucleon/action/cloud/create.rb
corl-0.5.5 lib/nucleon/action/cloud/create.rb
corl-0.5.4 lib/nucleon/action/cloud/create.rb
corl-0.5.3 lib/nucleon/action/cloud/create.rb
corl-0.5.2 lib/nucleon/action/cloud/create.rb