Class: DrySerialization::Blueprinter::InstallGenerator
- Inherits:
-
BaseGenerator
- Object
- Rails::Generators::Base
- BaseGenerator
- DrySerialization::Blueprinter::InstallGenerator
- Defined in:
- lib/generators/dry_serialization/blueprinter/install_generator.rb
Constant Summary
Constants inherited from BaseGenerator
BaseGenerator::API_CONTROLLER_PATH, BaseGenerator::SERIALIZERS
Instance Method Summary collapse
-
#install_blueprinter ⇒ Object
Add blueprinter gem to gemfile after dry_serialization declaration and bundles the newly declared gem.
Methods inherited from BaseGenerator
Instance Method Details
#install_blueprinter ⇒ Object
Add blueprinter gem to gemfile after dry_serialization declaration and bundles the newly declared gem
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/generators/dry_serialization/blueprinter/install_generator.rb', line 9 def install_blueprinter remove_other_supported_gems(SERIALIZERS[:ams], SERIALIZERS[:jsonapi_serializer]) puts "Installing #{SERIALIZERS[:blueprinter]}..." insert_into_file('Gemfile', "\ngem 'blueprinter'", after: "gem 'dry_serialization', source: 'https://gem.fury.io/mikeyduece-gems/'") run 'bundle install' helper_include(SERIALIZERS[:blueprinter]) end |