Class: Recipes::Script

Inherits:
Rails::AppBuilder
  • Object
show all
Defined in:
lib/potassium/recipes/script.rb

Instance Method Summary collapse

Instance Method Details

#createObject



2
3
4
5
6
7
8
9
# File 'lib/potassium/recipes/script.rb', line 2

def create
  template "../assets/bin/setup.erb", "bin/setup", force: true
  run "chmod a+x bin/setup"

  after(:database_creation) do
    inside('.') { run('bin/setup') }
  end
end

#installObject



11
12
13
14
15
# File 'lib/potassium/recipes/script.rb', line 11

def install
  heroku = load_recipe(:heroku)
  set(:heroku, heroku.installed?)
  create
end

#installed?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/potassium/recipes/script.rb', line 17

def installed?
  file_exist?("bin/setup")
end