Sha256: 56f02da493bc35c2d5092f73cf0a602a66f6244fdcc25d8e6222e4102a2c7226

Contents?: true

Size: 1.02 KB

Versions: 23

Compression:

Stored size: 1.02 KB

Contents

module MyDashboard
  module Generators
    class InstallGenerator < ::Rails::Generators::Base

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

      desc 'Creates a MyDashboard initializer for your application.'

      def install
        route 'mount MyDashboard::Engine, at: MyDashboard.config.engine_path'
      end

      def copy_initializer
        template 'initializer.rb', 'config/initializers/my_dashboard.rb'
      end

      def copy_layout
        template 'layouts/dashboard.html.erb', 'app/views/layouts/my_dashboard/dashboard.html.erb'
      end

      def copy_dashboard
        template 'dashboards/sample.html.erb', 'app/views/my_dashboard/dashboards/sample.html.erb'
      end

      def copy_widget_manifests
        template 'widgets/index.css', 'app/assets/stylesheets/my_dashboard/widgets/index.css'
        template 'widgets/index.js', 'app/assets/javascripts/my_dashboard/widgets/index.js'
      end

      def copy_job
        template 'jobs/sample.rb', 'app/jobs/sample.rb'
      end

    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
my_dashboard-0.8.6 lib/generators/my_dashboard/install_generator.rb
my_dashboard-0.8.5 lib/generators/my_dashboard/install_generator.rb
my_dashboard-0.8.4 lib/generators/my_dashboard/install_generator.rb
my_dashboard-0.8.3 lib/generators/my_dashboard/install_generator.rb
my_dashboard-0.8.1 lib/generators/my_dashboard/install_generator.rb
my_dashboard-0.8.0 lib/generators/my_dashboard/install_generator.rb
my_dashboard-0.7.2 lib/generators/my_dashboard/install_generator.rb
my_dashboard-0.7.1 lib/generators/my_dashboard/install_generator.rb
my_dashboard-0.7.0 lib/generators/my_dashboard/install_generator.rb
my_dashboard-0.6.0 lib/generators/my_dashboard/install_generator.rb
my_dashboard-0.5.10 lib/generators/my_dashboard/install_generator.rb
my_dashboard-0.5.9 lib/generators/my_dashboard/install_generator.rb
my_dashboard-0.5.8 lib/generators/my_dashboard/install_generator.rb
my_dashboard-0.5.7 lib/generators/my_dashboard/install_generator.rb
my_dashboard-0.5.6 lib/generators/my_dashboard/install_generator.rb
my_dashboard-0.5.5 lib/generators/my_dashboard/install_generator.rb
my_dashboard-0.5.4 lib/generators/my_dashboard/install_generator.rb
my_dashboard-0.5.3 lib/generators/my_dashboard/install_generator.rb
my_dashboard-0.5.2 lib/generators/my_dashboard/install_generator.rb
my_dashboard-0.5.1 lib/generators/my_dashboard/install_generator.rb