Sha256: e7811237a451a5f0e4518025a005253ca383a6289de2313980e73446b81017f9
Contents?: true
Size: 1.03 KB
Versions: 6
Compression:
Stored size: 1.03 KB
Contents
require 'rails/generators' module Care class InstallGenerator < Rails::Generators::Base include Rails::Generators::AppName source_root File.expand_path('../templates', __FILE__) 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 def install_components generate 'rspec:install' end def add_routes route("mount Rswag::Api::Engine => '/api-docs'") route("mount Rswag::Ui::Engine => '/api-docs'") end end end
Version data entries
6 entries across 6 versions & 1 rubygems