Sha256: 9cf3fd91945b50b50127b9d6d9198051a90bfc637d5181f45b1933e2f42260ea

Contents?: true

Size: 706 Bytes

Versions: 15

Compression:

Stored size: 706 Bytes

Contents

class EnjuCirculation::SetupGenerator < Rails::Generators::Base
  source_root File.expand_path('../templates', __FILE__)

  def copy_setup_files
    directory("db/fixtures", "db/fixtures/enju_circulation")
    rake("enju_circulation_engine:install:migrations")
    generate("enju_event:setup")
    generate("enju_message:setup")
    inject_into_file 'app/controllers/application_controller.rb',
      "  enju_circulation\n", :after => "enju_library\n"
    inject_into_file 'app/models/user.rb',
      "  enju_circulation_user_model\n", :after => "enju_leaf_user_model\n"
    append_to_file("config/schedule.rb", File.open(File.expand_path('../templates', __FILE__) + '/config/schedule.rb').read)
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
enju_circulation-0.1.0.pre35 lib/generators/enju_circulation/setup/setup_generator.rb
enju_circulation-0.1.0.pre34 lib/generators/enju_circulation/setup/setup_generator.rb
enju_circulation-0.1.0.pre33 lib/generators/enju_circulation/setup/setup_generator.rb
enju_circulation-0.1.0.pre32 lib/generators/enju_circulation/setup/setup_generator.rb
enju_circulation-0.1.0.pre31 lib/generators/enju_circulation/setup/setup_generator.rb
enju_circulation-0.1.0.pre30 lib/generators/enju_circulation/setup/setup_generator.rb
enju_circulation-0.1.0.pre29 lib/generators/enju_circulation/setup/setup_generator.rb
enju_circulation-0.1.0.pre28 lib/generators/enju_circulation/setup/setup_generator.rb
enju_circulation-0.1.0.pre27 lib/generators/enju_circulation/setup/setup_generator.rb
enju_circulation-0.1.0.pre26 lib/generators/enju_circulation/setup/setup_generator.rb
enju_circulation-0.1.0.pre25 lib/generators/enju_circulation/setup/setup_generator.rb
enju_circulation-0.1.0.pre24 lib/generators/enju_circulation/setup/setup_generator.rb
enju_circulation-0.1.0.pre23 lib/generators/enju_circulation/setup/setup_generator.rb
enju_circulation-0.1.0.pre22 lib/generators/enju_circulation/setup/setup_generator.rb
enju_circulation-0.1.0.pre21 lib/generators/enju_circulation/setup/setup_generator.rb