Sha256: a50fbeb4341ae52e2b1a58fa6a39c0b318d6de0df05709909a885cbf765bf3d2

Contents?: true

Size: 989 Bytes

Versions: 9

Compression:

Stored size: 989 Bytes

Contents

# frozen_string_literal: true

module BootstrapLeather
  # The methods in this class will be run in order
  class InstallGenerator < Rails::Generators::Base
    source_root File.expand_path('../templates', __FILE__)
    require File.expand_path('../../utils', __FILE__)
    include Generators::Utils
    include Rails::Generators::Migration

    def add_initializer
      output "You'll be wanting an initializer.  This is where you put your "\
        'configuration options.', :magenta
      template 'initializer.rb', 'config/initializers/bootstrap_leather.rb'
    end

    # def self.next_migration_number(dirname)
    #   if ActiveRecord::Base.timestamped_migrations
    #     if @prev_migration_nr
    #       @prev_migration_nr += 1
    #     else
    #       @prev_migration_nr = Time.now.utc.strftime('%Y%m%d%H%M%S').to_i
    #     end
    #     @prev_migration_nr.to_s
    #   else
    #     (current_migration_number(dirname) + 1).format('%.3d')
    #   end
    # end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
bootstrap_leather-0.10.13 lib/generators/bootstrap_leather/install/install_generator.rb
bootstrap_leather-0.10.11 lib/generators/bootstrap_leather/install/install_generator.rb
bootstrap_leather-0.10.10 lib/generators/bootstrap_leather/install/install_generator.rb
bootstrap_leather-0.10.9 lib/generators/bootstrap_leather/install/install_generator.rb
bootstrap_leather-0.10.8 lib/generators/bootstrap_leather/install/install_generator.rb
bootstrap_leather-0.10.7 lib/generators/bootstrap_leather/install/install_generator.rb
bootstrap_leather-0.10.6 lib/generators/bootstrap_leather/install/install_generator.rb
bootstrap_leather-0.10.5 lib/generators/bootstrap_leather/install/install_generator.rb
bootstrap_leather-0.10.4 lib/generators/bootstrap_leather/install/install_generator.rb