Sha256: c8da4624bf2952bf7dbbcdc6a2b1dd06562613458273427cfaad8933f15fea5c

Contents?: true

Size: 970 Bytes

Versions: 85

Compression:

Stored size: 970 Bytes

Contents

require 'rails/generators'

module CmAdmin
  module Generators
    class InstallGenerator < Rails::Generators::Base
      source_root File.expand_path('templates', __dir__)

      def copy_initializer
        generate 'action_text:install'
        copy_file 'cm_admin_initializer.rb', 'config/initializers/zcm_admin.rb'
        copy_file 'custom.js', 'app/assets/javascripts/cm_admin/custom.js'
        copy_file 'custom.css', 'app/assets/stylesheets/cm_admin/custom.css'
        copy_file 'actiontext.scss', 'app/assets/stylesheets/cm_admin/actiontext.scss'
        remove_file 'app/assets/stylesheets/actiontext.scss'
        copy_file 'application_policy.rb', 'app/policies/application_policy.rb'
        route 'mount CmAdmin::Engine => "/admin"'
        generate 'migration', 'CreateFileImport associated_model_name:string added_by:references{polymorphic} error_report:jsonb completed_at:datetime status:integer'
        rake 'db:migrate'
      end
    end
  end
end

Version data entries

85 entries across 85 versions & 1 rubygems

Version Path
cm-admin-1.5.37 lib/generators/cm_admin/install_generator.rb
cm-admin-1.5.36 lib/generators/cm_admin/install_generator.rb
cm-admin-1.5.35 lib/generators/cm_admin/install_generator.rb
cm-admin-1.5.34 lib/generators/cm_admin/install_generator.rb
cm-admin-1.5.33 lib/generators/cm_admin/install_generator.rb
cm-admin-1.5.32 lib/generators/cm_admin/install_generator.rb
cm-admin-1.5.31 lib/generators/cm_admin/install_generator.rb
cm-admin-1.5.30 lib/generators/cm_admin/install_generator.rb
cm-admin-1.5.29 lib/generators/cm_admin/install_generator.rb
cm-admin-1.5.28 lib/generators/cm_admin/install_generator.rb
cm-admin-1.5.10 lib/generators/cm_admin/install_generator.rb
cm-admin-1.5.27 lib/generators/cm_admin/install_generator.rb
cm-admin-1.5.26 lib/generators/cm_admin/install_generator.rb
cm-admin-1.5.25 lib/generators/cm_admin/install_generator.rb
cm-admin-1.5.23 lib/generators/cm_admin/install_generator.rb
cm-admin-1.5.22 lib/generators/cm_admin/install_generator.rb
cm-admin-1.5.21 lib/generators/cm_admin/install_generator.rb
cm-admin-1.5.20 lib/generators/cm_admin/install_generator.rb
cm-admin-1.5.11 lib/generators/cm_admin/install_generator.rb
cm-admin-1.5.9 lib/generators/cm_admin/install_generator.rb