Sha256: 1a2e8a8a277eb06982cf7faaf943ee45abe6cfdec88c792eea6bd9666504730b

Contents?: true

Size: 575 Bytes

Versions: 17

Compression:

Stored size: 575 Bytes

Contents

class PapermillGenerator < Rails::Generator::NamedBase
  attr_accessor :class_name, :migration_name
  
  def initialize(args, options = {})
    super
    @class_name = args[0]
  end
  
  def manifest
    @migration_name = file_name.camelize
    FileUtils.cp_r(
      Dir[File.join(File.dirname(__FILE__), '../../public')],
      File.join(RAILS_ROOT),
      :verbose => true
    )

    record do |m|
      # Migration creation
      m.migration_template "migrate/papermill_migration.rb.erb", "db/migrate", :migration_file_name => migration_name.underscore
    end
  end 
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
BBenezech-papermill-0.2.0 generators/papermill/papermill_generator.rb
BBenezech-papermill-0.2.1 generators/papermill/papermill_generator.rb
BBenezech-papermill-0.2.2 generators/papermill/papermill_generator.rb
BBenezech-papermill-0.3.0 generators/papermill/papermill_generator.rb
BBenezech-papermill-0.4.0 generators/papermill/papermill_generator.rb
BBenezech-papermill-0.4.1 generators/papermill/papermill_generator.rb
BBenezech-papermill-0.5.0 generators/papermill/papermill_generator.rb
BBenezech-papermill-0.5.2 generators/papermill/papermill_generator.rb
BBenezech-papermill-0.5.4 generators/papermill/papermill_generator.rb
papermill-0.9.0 generators/papermill/papermill_generator.rb
papermill-0.8.0 generators/papermill/papermill_generator.rb
papermill-0.7.0 generators/papermill/papermill_generator.rb
papermill-0.6.1 generators/papermill/papermill_generator.rb
papermill-0.6.0 generators/papermill/papermill_generator.rb
papermill-0.5.8 generators/papermill/papermill_generator.rb
papermill-0.5.7 generators/papermill/papermill_generator.rb
BBenezech-papermill-0.5.5 generators/papermill/papermill_generator.rb