Class: Aldagai::Generators::Install

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/aldagai/generators/install.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



10
11
12
# File 'lib/aldagai/generators/install.rb', line 10

def self.source_root
  File.dirname(__FILE__) + '/install'
end

Instance Method Details

#copy_environmentsObject



18
19
20
21
22
# File 'lib/aldagai/generators/install.rb', line 18

def copy_environments
  template('.development', '.development')
  template('.staging',     '.staging')
  template('.production',  '.production')
end

#copy_secretObject



14
15
16
# File 'lib/aldagai/generators/install.rb', line 14

def copy_secret
  template('.aldagai.secret', '.aldagai.secret')
end

#ignore_secretObject



24
25
26
27
# File 'lib/aldagai/generators/install.rb', line 24

def ignore_secret
  create_file '.gitignore', '', skip: true
  append_to_file '.gitignore', '.aldagai.secret'
end

#say_next_instructionsObject



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/aldagai/generators/install.rb', line 29

def say_next_instructions
  say ''
  say 'What is next:', :blue
  say ''
  say '* Run `$ heroku plugins:install heroku-cli-oauth`', :blue
  say '* Run `$ heroku authorizations:create -d "YouApp"` and copy the Token', :blue
  say '* Set ALDAGAI_HEROKU_TOKEN on heroku with the Token that was just generated', :blue
  say '* Set ALDAGAI_APP_NAME on heroku with the name of the application', :blue
  say '* Set ALDAGAI_PIPELINE_ENV on heroku with the name of the environment on the pipeline', :blue
  say '* Add `bundle exec aldagai set` to release part on the Procfile', :blue
  say ''
  say 'For more information about release phase go to ' +
    'https://devcenter.heroku.com/articles/release-phase', :green
  say ''
end