Sha256: b113981ff1dac3d5a9371e6ece661e818feb7b83b846af775eb4853fd9361bb7

Contents?: true

Size: 1.26 KB

Versions: 10

Compression:

Stored size: 1.26 KB

Contents

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

  def quick_install
    environment = ENV['RAILS_ENV'] || 'development'
    gsub_file 'config/schedule.rb', /^set :environment, :development$/,
      "set :environment, :#{environment}"
    rake("enju_leaf_engine:install:migrations")
    rake("enju_biblio_engine:install:migrations")
    rake("enju_library_engine:install:migrations")
    if !ENV['ENJU_SKIP_CONFIG']
      generate("enju_biblio:setup")
      generate("enju_library:setup")
      generate("enju_circulation:setup")
      generate("enju_subject:setup")
    end
    rake("db:migrate", env: environment)
    rake("enju_leaf:setup", env: environment)
    rake("enju_circulation:setup", env: environment)
    rake("enju_subject:setup", env: environment)
    rake("assets:precompile", env: environment) if environment == 'production'
    rake("db:seed", env: environment)
    if !ENV['ENJU_SKIP_SOLR']
      if ENV['OS'] == 'Windows_NT'
        rake("sunspot:solr:run", env: environment)
      else
        rake("sunspot:solr:start", env: environment)
        sleep 5
        rake("environment sunspot:reindex", env: environment)
        rake("sunspot:solr:stop", env: environment)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
enju_leaf-1.2.0.beta.1 lib/generators/enju_leaf/quick_install/quick_install_generator.rb
enju_leaf-1.1.4 lib/generators/enju_leaf/quick_install/quick_install_generator.rb
enju_leaf-1.1.3 lib/generators/enju_leaf/quick_install/quick_install_generator.rb
enju_leaf-1.1.2 lib/generators/enju_leaf/quick_install/quick_install_generator.rb
enju_leaf-1.1.1 lib/generators/enju_leaf/quick_install/quick_install_generator.rb
enju_leaf-1.1.0 lib/generators/enju_leaf/quick_install/quick_install_generator.rb
enju_leaf-1.1.0.rc22 lib/generators/enju_leaf/quick_install/quick_install_generator.rb
enju_leaf-1.1.0.rc21 lib/generators/enju_leaf/quick_install/quick_install_generator.rb
enju_leaf-1.1.0.rc20 lib/generators/enju_leaf/quick_install/quick_install_generator.rb
enju_leaf-1.1.0.rc19 lib/generators/enju_leaf/quick_install/quick_install_generator.rb