Class: Nucleon::Action::Project::Remove
- Inherits:
-
Object
- Object
- Nucleon::Action::Project::Remove
- Includes:
- Mixin::Action::Project, Mixin::Action::Push
- Defined in:
- lib/nucleon/action/project/remove.rb
Class Method Summary collapse
-
.describe ⇒ Object
—————————————————————————– Info.
Instance Method Summary collapse
- #arguments ⇒ Object
-
#configure ⇒ Object
—————————————————————————– Settings.
-
#execute ⇒ Object
—————————————————————————– Operations.
-
#ignore ⇒ Object
—.
Methods included from Mixin::Action::Push
#push, #push_config, #push_ignore
Methods included from Mixin::Action::Project
#project_config, #project_ignore, #project_load
Class Method Details
.describe ⇒ Object
Info
13 14 15 |
# File 'lib/nucleon/action/project/remove.rb', line 13 def self.describe super(:project, :remove, 600) end |
Instance Method Details
#arguments ⇒ Object
40 41 42 |
# File 'lib/nucleon/action/project/remove.rb', line 40 def arguments [ :sub_path ] end |
#configure ⇒ Object
Settings
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/nucleon/action/project/remove.rb', line 20 def configure super do codes :project_failure, :delete_failure, :push_failure register_str :path, Dir.pwd register_str :sub_path, nil project_config push_config end end |
#execute ⇒ Object
Operations
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/nucleon/action/project/remove.rb', line 47 def execute super do info('start') if project = project_load(settings[:path], false) if project.delete_subproject(settings[:sub_path]) myself.status = code.push_failure unless push(project) else myself.status = code.delete_failure end else myself.status = code.project_failure end end end |
#ignore ⇒ Object
36 37 38 |
# File 'lib/nucleon/action/project/remove.rb', line 36 def ignore [ :project_reference ] end |