Skip to content

Commit

Permalink
Add geoblacklight:server rake task for spinning up the internal test app
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Feb 20, 2015
1 parent 181d6d1 commit 9843acf
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,33 @@ namespace :geoblacklight do
system 'curl -o jetty/solr/blacklight-core/conf/schema.xml https://raw.githubusercontent.com/geoblacklight/geoblacklight-schema/master/conf/schema.xml'
system 'curl -o jetty/solr/blacklight-core/conf/solrconfig.xml https://raw.githubusercontent.com/geoblacklight/geoblacklight-schema/master/conf/solrconfig.xml'
end

task :server do
if File.exists? 'spec/internal'
within_test_app do
system "bundle update"
end
else
Rake::Task['engine_cart:generate'].invoke
end

unless File.exists? 'jetty'
Rake::Task['jetty:clean'].invoke
Rake::Task['geoblacklight:configure_jetty'].invoke
end

jetty_params = Jettywrapper.load_config
jetty_params[:startup_wait]= 60

Jettywrapper.wrap(jetty_params) do
within_test_app do
unless File.exists? '.initialized'
system "rake geoblacklight:solr:seed"
system 'rake geoblacklight:downloads:mkdir'
File.open('.initialized', "w") {}
end
system "bundle exec rails s"
end
end
end
end

0 comments on commit 9843acf

Please sign in to comment.