Module: Nucleon::Mixin::Action::Push
- Included in:
- Action::Project::Add, Action::Project::Remove, Action::Project::Save
- Defined in:
- lib/core/mixin/action/push.rb
Instance Method Summary collapse
-
#push(project, remote = :edit) ⇒ Object
—————————————————————————– Operations.
-
#push_config(optional = true) ⇒ Object
—————————————————————————– Settings.
-
#push_ignore ⇒ Object
—.
Instance Method Details
#push(project, remote = :edit) ⇒ Object
Operations
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/core/mixin/action/push.rb', line 35 def push(project, remote = :edit) success = true if project && settings[:push] success = project.push(settings[:remote], extended_config(:push, { :revision => settings[:revision], :propogate => settings[:propogate_push], :no_pull => ! settings[:pull] })) end success end |
#push_config(optional = true) ⇒ Object
Settings
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/core/mixin/action/push.rb', line 10 def push_config(optional = true) if optional register_bool :push, false, 'nucleon.core.mixin.action.push.options.push' else settings[:push] = true end register_bool :pull, true, 'nucleon.core.mixin.action.push.options.pull' register_bool :propogate_push, false, 'nucleon.core.mixin.action.push.options.propogate_push' register_str :remote, :edit, 'nucleon.core.mixin.action.push.options.remote' register_str :revision, :master, 'nucleon.core.mixin.action.push.options.revision' end |
#push_ignore ⇒ Object
28 29 30 |
# File 'lib/core/mixin/action/push.rb', line 28 def push_ignore [ :push, :pull, :propogate_push, :remote, :revision ] end |