Sha256: 145973f8c9e0a8186220b340ab26f90000d1040d47aeee8d972611dfc8c23af1

Contents?: true

Size: 711 Bytes

Versions: 53

Compression:

Stored size: 711 Bytes

Contents

module Context
  module DeployHelper
    def get_context_folder(context, folder)
      File.join(context.context_folder, folder)
    end

    def build_folder(context)
      get_context_folder(context, 'build')
    end
  
    def contexts_container(context)
      get_context_folder(context, 'contexts')
    end
    
    def chef_exec(commands)
      system("chef exec #{commands.join(' ')}")
    end
    
    def git(commands)
      chef_exec(['git'] + commands)
    end
    
    def gem(commands)
      chef_exec(['gem'] + commands)
    end
    
    def rake(commands)
      chef_exec(['rake'] + commands)
    end
    
    def cucumber(commands = [])
      chef_exec(['cucumber'] + commands)
    end
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
deploy-context-0.11.32 lib/deploy-context/context/deploy.rb
deploy-context-0.11.31 lib/deploy-context/context/deploy.rb
deploy-context-0.11.29 lib/deploy-context/context/deploy.rb
deploy-context-0.11.28 lib/deploy-context/context/deploy.rb
deploy-context-0.11.27 lib/deploy-context/context/deploy.rb
deploy-context-0.11.26 lib/deploy-context/context/deploy.rb
deploy-context-0.11.25 lib/deploy-context/context/deploy.rb
deploy-context-0.11.23 lib/deploy-context/context/deploy.rb
deploy-context-0.11.22 lib/deploy-context/context/deploy.rb
deploy-context-0.11.21 lib/deploy-context/context/deploy.rb
deploy-context-0.11.4 lib/deploy-context/context/deploy.rb
deploy-context-0.11.3 lib/deploy-context/context/deploy.rb
deploy-context-0.11.2 lib/deploy-context/context/deploy.rb
deploy-context-0.11.1 lib/deploy-context/context/deploy.rb
deploy-context-0.11.0.2.geb201f1 lib/deploy-context/context/deploy.rb
deploy-context-0.10.1 lib/deploy-context/context/deploy.rb
deploy-context-0.9.3 lib/deploy-context/context/deploy.rb
deploy-context-0.9.2 lib/deploy-context/context/deploy.rb
deploy-context-0.8.1 lib/deploy-context/context/deploy.rb
deploy-context-0.8.0.2.ged8af61 lib/deploy-context/context/deploy.rb