Sha256: 416df811e231f3b19050b33759c7ea65a67dd24840b4b5f1a609a2b1df30b5cb

Contents?: true

Size: 696 Bytes

Versions: 14

Compression:

Stored size: 696 Bytes

Contents

# frozen_string_literal: true

module Cmor::Legal
  module Generators
    class InstallGenerator < Rails::Generators::Base
      desc "Generates the initializer"

      source_root File.expand_path("../templates", __FILE__)

      attr_reader :base_controller_class_name

      def initialize(*args)
        super
        @base_controller_class_name = ENV.fetch("BASE_CONTROLLER_CLASS_NAME") { "::ApplicationController" }
      end

      def generate_initializer
        template "initializer.rb", "config/initializers/cmor_legal.rb"
      end

      def generate_routes
        route File.read(File.join(File.expand_path("../templates", __FILE__), "routes.source"))
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
cmor_legal-0.0.60.pre lib/generators/cmor/legal/install/install_generator.rb
cmor_legal-0.0.59.pre lib/generators/cmor/legal/install/install_generator.rb
cmor_legal-0.0.58.pre lib/generators/cmor/legal/install/install_generator.rb
cmor_legal-0.0.57.pre lib/generators/cmor/legal/install/install_generator.rb
cmor_legal-0.0.56.pre lib/generators/cmor/legal/install/install_generator.rb
cmor_legal-0.0.55.pre lib/generators/cmor/legal/install/install_generator.rb
cmor_legal-0.0.54.pre lib/generators/cmor/legal/install/install_generator.rb
cmor_legal-0.0.53.pre lib/generators/cmor/legal/install/install_generator.rb
cmor_legal-0.0.52.pre lib/generators/cmor/legal/install/install_generator.rb
cmor_legal-0.0.51.pre lib/generators/cmor/legal/install/install_generator.rb
cmor_legal-0.0.50.pre lib/generators/cmor/legal/install/install_generator.rb
cmor_legal-0.0.49.pre lib/generators/cmor/legal/install/install_generator.rb
cmor_legal-0.0.48.pre lib/generators/cmor/legal/install/install_generator.rb
cmor_legal-0.0.45.pre lib/generators/cmor/legal/install/install_generator.rb