Class: Pushapp::Generators

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

Instance Method Summary collapse

Instance Method Details

#chef_solo(remote) ⇒ Object



63
64
65
66
67
68
69
70
71
72
# File 'lib/pushapp/generators.rb', line 63

def chef_solo(remote)
  options[:remote] = remote

  template 'Cheffile.erb',    'config/deploys/chef/Cheffile'
  template 'Vagrantfile.erb', 'config/deploys/chef/Vagrantfile'
  template 'node.json.erb',   "config/deploys/chef/nodes/#{app_host}.json"
  template 'user.json.erb',   "config/deploys/chef/data_bags/users/#{app_user}.json"

  template 'chef.gitignore',  'config/deploys/chef/.gitignore'
end

#unicorn(remote) ⇒ Object



31
32
33
34
# File 'lib/pushapp/generators.rb', line 31

def unicorn(remote)
  options[:remote] = remote
  template 'unicorn.rb.erb', 'config/unicorn.rb'
end

#unicorn_nginx(remote) ⇒ Object



19
20
21
22
# File 'lib/pushapp/generators.rb', line 19

def unicorn_nginx(remote)
  options[:remote] = remote
  template 'unicorn_nginx.conf.erb', "config/deploys/#{app_name}.nginx.conf"
end

#unicorn_upstartObject



25
26
27
28
# File 'lib/pushapp/generators.rb', line 25

def unicorn_upstart
  template 'unicorn_upstart.erb', 'bin/unicorn_upstart'
  chmod 'bin/unicorn_upstart', 'a+x'
end