Sha256: 8d12139c4b299440dce21ec257fc6afd815b582fe575416ab5fcb60ebf7de5f8
Contents?: true
Size: 835 Bytes
Versions: 8
Compression:
Stored size: 835 Bytes
Contents
# frozen_string_literal: true module SolidusInter module Generators class InstallGenerator < Rails::Generators::Base class_option :auto_run_migrations, type: :boolean, default: false source_root File.expand_path("templates", __dir__) def self.exit_on_failure? true end def add_migrations run "bin/rails railties:install:migrations FROM=solidus_inter" end def run_migrations run_migrations = options[:auto_run_migrations] || ["", "y", "Y"].include?(ask("Would you like to run the migrations now? [Y/n]")) # rubocop:disable Layout/LineLength if run_migrations run "bin/rails db:migrate" else puts "Skipping bin/rails db:migrate, don't forget to run it!" # rubocop:disable Rails/Output end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems