Sha256: 2d628a570d6b6c9a0824057a7ccac1d59fe305ad032fa5457ebaaa96f2529763

Contents?: true

Size: 1.04 KB

Versions: 20

Compression:

Stored size: 1.04 KB

Contents

module Nucleon
module Mixin
module Action
module Push
        
  #-----------------------------------------------------------------------------
  # Settings
        
  def push_config(optional = true)
    
    if optional
      register :push, :bool, false, 'nucleon.core.mixin.action.push.options.push'
    else
      settings[:push] = true
    end
    
    register :remote, :str, :edit, 'nucleon.core.mixin.action.push.options.remote'
    register :revision, :str, :master, 'nucleon.core.mixin.action.push.options.revision'
    
    register :propogate_push, :bool, false, 'nucleon.core.mixin.action.push.options.propogate_push'
  end
        
  #-----------------------------------------------------------------------------
  # Operations
        
  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]
      }))
    end
    success
  end
end
end
end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
nucleon-0.2.1 lib/core/mixin/action/push.rb
nucleon-0.2.0 lib/core/mixin/action/push.rb
nucleon-0.1.19 lib/core/mixin/action/push.rb
nucleon-0.1.18 lib/core/mixin/action/push.rb
nucleon-0.1.17 lib/core/mixin/action/push.rb
nucleon-0.1.16 lib/core/mixin/action/push.rb
nucleon-0.1.15 lib/core/mixin/action/push.rb
nucleon-0.1.14 lib/core/mixin/action/push.rb
nucleon-0.1.13 lib/core/mixin/action/push.rb
nucleon-0.1.12 lib/core/mixin/action/push.rb
nucleon-0.1.11 lib/core/mixin/action/push.rb
nucleon-0.1.10 lib/core/mixin/action/push.rb
nucleon-0.1.9 lib/core/mixin/action/push.rb
nucleon-0.1.8 lib/core/mixin/action/push.rb
nucleon-0.1.7 lib/core/mixin/action/push.rb
nucleon-0.1.6 lib/core/mixin/action/push.rb
nucleon-0.1.5 lib/core/mixin/action/push.rb
nucleon-0.1.4 lib/core/mixin/action/push.rb
nucleon-0.1.3 lib/core/mixin/action/push.rb
nucleon-0.1.2 lib/core/mixin/action/push.rb