Class: Care::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Care::InstallGenerator
- Includes:
- Rails::Generators::AppName
- Defined in:
- lib/generators/care/install/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_initializer ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/generators/care/install/install_generator.rb', line 9 def add_initializer gem 'rspec-rails', group: [:development, :test], version: '~> 4.0.1' gem "rswag" template('swagger_helper.rb', 'spec/swagger_helper.rb') template("swagger.yml", "spec/support/#{app_name}.yml") template('rswag_api.rb', 'config/initializers/rswag_api.rb') template('rswag-ui.rb', 'config/initializers/rswag-ui.rb') gem "active_model_serializers", version: "~> 0.10.10" template('active_model_serializer.rb', 'config/initializers/active_model_serializer.rb') gem "centrifuge", version: "~> 1.2" template('centrifuge.rb', 'config/initializers/centrifuge.rb') end |
#add_routes ⇒ Object
28 29 30 31 |
# File 'lib/generators/care/install/install_generator.rb', line 28 def add_routes route("mount Rswag::Api::Engine => '/api-docs'") route("mount Rswag::Ui::Engine => '/api-docs'") end |
#install_components ⇒ Object
24 25 26 |
# File 'lib/generators/care/install/install_generator.rb', line 24 def install_components generate 'rspec:install' end |