Sha256: 945c2725499d8af7919fd3ee06412170713a3f53d50b694da59022b8d515954a

Contents?: true

Size: 527 Bytes

Versions: 24

Compression:

Stored size: 527 Bytes

Contents

class EnjuLibrary::SetupGenerator < Rails::Generators::Base
  source_root File.expand_path('../templates', __FILE__)
  argument :file, :type => :string, :default => "all"

  def copy_setup_files
    directory("db/fixtures", "db/fixtures/enju_library")
    return if file == 'fixture'
    inject_into_file 'app/controllers/application_controller.rb',
      "  include EnjuLibrary::Controller\n", after: "include EnjuLeaf::Controller\n"
    append_to_file("app/models/user.rb", "Item.include(EnjuLibrary::EnjuItem)\n")
  end
end

Version data entries

24 entries across 22 versions & 2 rubygems

Version Path
enju_library-0.3.6 lib/generators/enju_library/setup/setup_generator.rb
enju_library-0.4.0.beta.4 lib/generators/enju_library/setup/setup_generator.rb
enju_library-0.4.0.beta.3 lib/generators/enju_library/setup/setup_generator.rb
enju_library-0.4.0.beta.2 lib/generators/enju_library/setup/setup_generator.rb
enju_library-0.4.0.beta.1 lib/generators/enju_library/setup/setup_generator.rb
enju_library-0.3.5 lib/generators/enju_library/setup/setup_generator.rb
enju_library-0.3.4 lib/generators/enju_library/setup/setup_generator.rb
enju_library-0.3.3 lib/generators/enju_library/setup/setup_generator.rb
enju_library-0.3.2 lib/generators/enju_library/setup/setup_generator.rb
enju_library-0.3.1 lib/generators/enju_library/setup/setup_generator.rb
enju_library-0.3.0 lib/generators/enju_library/setup/setup_generator.rb
enju_library-0.3.0.rc.1 lib/generators/enju_library/setup/setup_generator.rb
enju_library-0.3.0.beta.2 lib/generators/enju_library/setup/setup_generator.rb
enju_library-0.2.5 lib/generators/enju_library/setup/setup_generator.rb
enju_library-0.2.4 lib/generators/enju_library/setup/setup_generator.rb
enju_library-0.2.3 lib/generators/enju_library/setup/setup_generator.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_library-0.2.2/lib/generators/enju_library/setup/setup_generator.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/bundler/gems/enju_library-d36f415e177e/lib/generators/enju_library/setup/setup_generator.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_library-0.2.1/lib/generators/enju_library/setup/setup_generator.rb
enju_library-0.2.2 lib/generators/enju_library/setup/setup_generator.rb