Class: Venus::Generators::PumaGenerator
- Inherits:
-
Base
- Object
- Rails::Generators::Base
- Base
- Venus::Generators::PumaGenerator
show all
- Defined in:
- lib/generators/venus/puma/puma_generator.rb
Instance Method Summary
collapse
Methods inherited from Base
next_migration_number, source_root
Instance Method Details
#asks ⇒ Object
10
11
12
13
14
15
|
# File 'lib/generators/venus/puma/puma_generator.rb', line 10
def asks
say 'checking dependent gems "capistrnano"...'
generate 'venus:deploy' unless has_gem?('capistrano')
@app_name = app_name
@rails_env = "production"
end
|
#configs ⇒ Object
22
23
24
25
26
|
# File 'lib/generators/venus/puma/puma_generator.rb', line 22
def configs
template("nginx.conf.erb", "config/puma/nginx.conf.example")
template("config.erb", "config/puma.rb")
concat_template("config/deploy.rb", "deploy.rb.erb") unless file_has_content?("config/deploy.rb", load_template("deploy.rb.erb"))
end
|
#gemfile ⇒ Object
17
18
19
20
|
# File 'lib/generators/venus/puma/puma_generator.rb', line 17
def gemfile
add_gem("puma", "~> 2.1.1")
bundle_install
end
|
#name ⇒ Object
6
7
8
|
# File 'lib/generators/venus/puma/puma_generator.rb', line 6
def name
"puma"
end
|