Rakefile in blacklight-spotlight-3.0.0.alpha.2 vs Rakefile in blacklight-spotlight-3.0.0.alpha.3
- old
+ new
@@ -32,11 +32,11 @@
task ci: ['engine_cart:generate'] do
ENV['environment'] = 'test'
SolrWrapper.wrap(port: '8983') do |solr|
- solr.with_collection(name: 'blacklight-core', dir: File.join(File.expand_path(File.dirname(__FILE__)), 'solr_conf', 'conf')) do
+ solr.with_collection(name: 'blacklight-core', dir: File.join(__dir__, 'solr_conf', 'conf')) do
within_test_app do
system 'bundle install'
system 'bundle exec rake db:migrate'
end
@@ -60,11 +60,11 @@
desc 'Start the test application for Spotlight'
task :server do
Rake::Task['engine_cart:generate'].invoke
SolrWrapper.wrap(port: '8983') do |solr|
- solr.with_collection(name: 'blacklight-core', dir: File.join(File.expand_path(File.dirname(__FILE__)), 'solr_conf', 'conf')) do
+ solr.with_collection(name: 'blacklight-core', dir: File.join(__dir__, 'solr_conf', 'conf')) do
within_test_app do
unless File.exist? '.initialized'
system 'bundle exec rake spotlight:initialize'
system 'bundle exec rake spotlight_test:solr:seed'
File.open('.initialized', 'w') {}
@@ -88,11 +88,11 @@
version = "_#{Gem.loaded_specs['rails'].version}_" if Gem.loaded_specs['rails']
Bundler.with_clean_env do
IO.popen({ 'SPOTLIGHT_GEM' => File.dirname(__FILE__) },
['rails', version, 'new', 'internal', '--skip-spring', '-m', template_path] +
- [err: [:child, :out]]) do |io|
+ [err: %i[child out]]) do |io|
IO.copy_stream(io, $stderr)
_, exit_status = Process.wait2(io.pid)
raise 'Failed to generate spotlight' if exit_status.nonzero?
@@ -114,6 +114,6 @@
end
end
end
end
-task default: [:rubocop, :ci]
+task default: %i[rubocop ci]