Sha256: 1e14e7fb181efd88dac5e42a0fc57ea461319e4fa30a17d148d8f5b74a58c391

Contents?: true

Size: 930 Bytes

Versions: 19

Compression:

Stored size: 930 Bytes

Contents

require 'active_fedora/rake_support'

namespace :hydra do
  desc "Start a solr, fedora and rails instance"
  task :server do
    with_server(ENV['RAILS_ENV'] || 'development') do
      puts "Fedora: #{ActiveFedora.config.credentials[:url]}"
      puts "Solr..: #{ActiveFedora.solr_config[:url]}"
      begin
        if ENV['SKIP_RAILS']
          puts "^C to exit"
          sleep
        else
          # If HOST specified, bind to that IP with -b
          server_options = " -b #{ENV['HOST']}" if ENV['HOST']
          IO.popen("rails server#{server_options}") do |io|
            io.each do |line|
              puts line
            end
          end
        end
      rescue Interrupt
        puts "Stopping server"
      end
    end
  end

  desc "Start solr and fedora instances for tests"
  task :test_server do
    ENV['RAILS_ENV'] = 'test'
    ENV['SKIP_RAILS'] = 'true'
    Rake::Task['hydra:server'].invoke
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
hydra-core-13.0.0 lib/tasks/hydra.rake
hydra-core-12.1.0 lib/tasks/hydra.rake
hydra-core-12.0.2 lib/tasks/hydra.rake
hydra-core-11.0.7 lib/tasks/hydra.rake
hydra-core-12.0.1 lib/tasks/hydra.rake
hydra-core-11.0.6 lib/tasks/hydra.rake
hydra-core-11.0.5 lib/tasks/hydra.rake
hydra-core-11.0.4 lib/tasks/hydra.rake
hydra-core-12.0.0 lib/tasks/hydra.rake
hydra-core-11.0.1 lib/tasks/hydra.rake
hydra-core-11.0.0 lib/tasks/hydra.rake
hydra-core-11.0.0.rc2 lib/tasks/hydra.rake
hydra-core-10.7.0 lib/tasks/hydra.rake
hydra-core-10.6.2 lib/tasks/hydra.rake
hydra-core-10.6.1 lib/tasks/hydra.rake
hydra-core-10.6.0 lib/tasks/hydra.rake
hydra-core-10.5.1 lib/tasks/hydra.rake
hydra-core-11.0.0.rc1 lib/tasks/hydra.rake
hydra-core-10.5.0 lib/tasks/hydra.rake