Class: Remoting::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Remoting::Generators::InstallGenerator
- Defined in:
- lib/generators/remoting/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_remote_rake ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/generators/remoting/install_generator.rb', line 26 def create_remote_rake create_file "lib/tasks/remote/remote.rake", <<-eos namespace :remote do desc "Deploy application on server" task :deploy => [:push, :bundle, :"assets:compile", :restart] do end end eos end |
#create_remote_yml ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/generators/remoting/install_generator.rb', line 7 def create_remote_yml appname = Rails.application.class.to_s.split("::").first.underscore host = [:host] user = [:user] stub = <<-STUB remote: login: #{user}@#{host} dest: /var/#{user}/#{appname} repo: ssh://#{user}@#{host}/var/ror/git/#{appname}.git ruby: 1.9.3 tmp: /tmp app: #{appname} STUB create_file "config/remote.yml", stub end |