Class: TogoStanza::CLI::ProviderGenerator
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- TogoStanza::CLI::ProviderGenerator
- Includes:
- Thor::Actions
- Defined in:
- lib/togostanza/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
11 12 13 |
# File 'lib/togostanza/cli.rb', line 11 def self.source_root File.('../../../templates/provider', __FILE__) end |
Instance Method Details
#create_files ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/togostanza/cli.rb', line 15 def create_files template 'gitignore.erb', "#{name}/.gitignore" template 'Gemfile.erb', "#{name}/Gemfile" template 'config.ru.erb', "#{name}/config.ru" template 'Procfile.erb', "#{name}/Procfile" template 'config/unicorn.rb.erb', "#{name}/config/unicorn.rb" create_file "#{name}/log/.keep" end |
#init_repo ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/togostanza/cli.rb', line 25 def init_repo inside name do run "bundle" run "git init ." run "git add -A" end end |