Sha256: a10fb449f64890788ece8aacdda723f78dfb81ba66e7a47c8bcda3ed4772d6e4
Contents?: true
Size: 1002 Bytes
Versions: 12
Compression:
Stored size: 1002 Bytes
Contents
require 'rails/generators' require 'rails/generators/base' module Rack module DevMark class InstallGenerator < ::Rails::Generators::Base namespace 'rack:dev-mark:install' desc "Install rack-dev-mark." def insert_enable insert_into_file target_path, after: "< Rails::Application\n" do <<-EOS # Enable rack-dev-mark config.rack_dev_mark.enable = !Rails.env.production? # # Customize the env string (default Rails.env) # config.rack_dev_mark.env = 'foo' # # Customize themes if you want to do so # config.rack_dev_mark.theme = [:title, :github_fork_ribbon] # # Customize inserted place of the middleware if necessary. # You can use either `insert_before` or `insert_after` # config.rack_dev_mark.insert_before SomeOtherMiddleware # config.rack_dev_mark.insert_after SomeOtherMiddleware EOS end end private def target_path 'config/application.rb' end end end end
Version data entries
12 entries across 12 versions & 1 rubygems