Sha256: d63363ff9f6e76195395053f206fc8f7f7fd98d493558eea20acf23618416123

Contents?: true

Size: 1.56 KB

Versions: 6

Compression:

Stored size: 1.56 KB

Contents

module Nucleon
module Mixin
module Action
module Project
        
  #-----------------------------------------------------------------------------
  # Settings
        
  def project_config
    register_project_provider :project_provider, nil, [ 
      'nucleon.core.mixin.action.project.options.project_provider', 
      'nucleon.core.mixin.action.project.errors.project_provider' 
    ]
    register_project :project_reference, nil, [ 
      'nucleon.core.mixin.action.project.options.project_reference', 
      'nucleon.core.mixin.action.project.errors.project_reference' 
    ]
    register_str :project_revision, :master, 'nucleon.core.mixin.action.project.options.project_revision'
  end
  
  #---
  
  def project_ignore
    [ :project_provider, :project_reference, :project_revision ]
  end
        
  #-----------------------------------------------------------------------------
  # Operations
        
  def project_load(root_dir, create = false, update = false)
        
    # 1. Set a default project provider (reference can override)
    # 2. Get project from root directory
    # 3. Initialize project if not yet initialized if requested
    # 4. Set remote if needed
    # 5. Checkout revision if needed
    # 6. Pull down updates if requested
          
    return Nucleon.project(extended_config(:project, {
      :create    => create,
      :provider  => settings[:project_provider],
      :directory => root_dir,
      :url       => settings[:project_reference],
      :revision  => settings[:project_revision],
      :pull      => update
    }))
  end       
end
end
end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
nucleon-0.2.7 lib/core/mixin/action/project.rb
nucleon-0.2.6 lib/core/mixin/action/project.rb
nucleon-0.2.5 lib/core/mixin/action/project.rb
nucleon-0.2.4 lib/core/mixin/action/project.rb
nucleon-0.2.3 lib/core/mixin/action/project.rb
nucleon-0.2.2 lib/core/mixin/action/project.rb