Sha256: 1752136e22c7bb31182e330a58fd2fe302847af2548a0bc9a9cf3764160794cd

Contents?: true

Size: 776 Bytes

Versions: 2

Compression:

Stored size: 776 Bytes

Contents

module Lobot
  class InstallGenerator < Rails::Generators::Base
    source_root File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
    
    def create_ci_files
      template 'ci.yml', 'config/ci.yml'
      template 'ci.rake', 'lib/tasks/ci.rake'
      template 'bootstrap_server.sh', 'script/bootstrap_server.sh'
      template 'deploy-ci.rb', 'config/deploy/ci.rb'
      template 'capistrano-ci.rb', 'config/capistrano/ci.rb'
      template 'soloistrc', 'soloistrc'
    end
    
    def add_load_path_to_capfile
      template 'Capfile', 'Capfile' unless File.exists?("#{destination_root}/Capfile")
      prepend_to_file 'Capfile', "load 'config/capistrano/ci'\n"
    end
    
    def create_chef_cookbooks
      directory 'chef', 'chef'
    end
    
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lobot-0.9.2 lib/generators/lobot/install_generator.rb
lobot-0.9.0 lib/generators/lobot/install_generator.rb