Sha256: dd9751a61666e0bf41fcff0debc500ca2310f7ad6dd732b7cda956799d879166

Contents?: true

Size: 845 Bytes

Versions: 108

Compression:

Stored size: 845 Bytes

Contents

require 'rails/generators'

module Tramway
  module Core
    module Generators
      class InstallGenerator < ::Rails::Generators::Base
        source_root File.expand_path('../templates', __FILE__)

        def run_other_generators
          generate 'audited:install'
        end

        def self.next_migration_number(path)
          next_migration_number = current_migration_number(path) + 1
          ActiveRecord::Migration.next_migration_number next_migration_number
        end

        def copy_initializer
          copy_file "/#{File.dirname __dir__}/generators/templates/initializers/simple_form.rb", 'config/initializers/simple_form.rb'
          copy_file "/#{File.dirname __dir__}/generators/templates/initializers/simple_form_bootstrap.rb", 'config/initializers/simple_form_bootstrap.rb'
        end
      end
    end
  end
end

Version data entries

108 entries across 80 versions & 1 rubygems

Version Path
tramway-core-1.13.1.1 lib/tramway/core/generators/install_generator.rb
tramway-core-1.13.1 lib/tramway/core/generators/install_generator.rb
tramway-core-1.13.0.2 lib/tramway/core/generators/install_generator.rb
tramway-core-1.13.0.1 lib/tramway/core/generators/install_generator.rb
tramway-core-1.13 lib/tramway/core/generators/install_generator.rb
tramway-core-1.12.1 lib/tramway/core/generators/install_generator.rb
tramway-core-1.12.0.2 lib/tramway/core/generators/install_generator.rb
tramway-core-1.12.0.1 lib/tramway/core/generators/install_generator.rb
tramway-core-1.12 lib/tramway/core/generators/install_generator.rb
tramway-core-1.11.2.1 lib/tramway/core/generators/install_generator.rb
tramway-core-1.11.2 lib/tramway/core/generators/install_generator.rb
tramway-core-1.11.1 lib/tramway/core/generators/install_generator.rb
tramway-core-1.11 lib/tramway/core/generators/install_generator.rb
tramway-core-1.10.3.1 lib/tramway/core/generators/install_generator.rb
tramway-core-1.10.3 lib/tramway/core/generators/install_generator.rb
tramway-core-1.10.2.3 lib/tramway/core/generators/install_generator.rb
tramway-core-1.10.2.2 lib/tramway/core/generators/install_generator.rb
tramway-core-1.10.2.1 lib/tramway/core/generators/install_generator.rb
tramway-core-1.10.2 lib/tramway/core/generators/install_generator.rb
tramway-core-1.10.1 lib/tramway/core/generators/install_generator.rb