class DrySerialization::Blueprinter::InstallGenerator
Public Instance Methods
install_blueprinter()
click to toggle source
Add blueprinter gem to gemfile after dry_serialization declaration and bundles the newly declared gem
# 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