Class: TryApi::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/try_api/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_config_fileObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/generators/try_api/install_generator.rb', line 13

def create_config_file
  template 'config/try_api.yml', 'config/try_api.yml'

  # Bundler.with_clean_env do
  #   run "mkdir vendor/assets/try_api"
  #   run "cd vendor/assets/try_api && bower install jquery"
  #   run "cd vendor/assets/try_api && bower install bootstrap"
  #   run "cd vendor/assets/try_api && bower install slimScroll"
  #   run "cd vendor/assets/try_api && bower install highlightjs"
  #   run "cd vendor/assets/try_api && bower install angular"
  #   run "cd vendor/assets/try_api && bower install angular-bootstrap"
  #   run "cd vendor/assets/try_api && bower install angular-highlightjs"
  # end

end

#init_environmentObject



8
9
10
11
# File 'lib/generators/try_api/install_generator.rb', line 8

def init_environment
  app = ::Rails.application
  @app_name = app.class.to_s.split("::").first
end