diff --git a/.travis.yml b/.travis.yml index 323d3a097..1194ab1e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,8 +19,8 @@ before_install: - export PATH=$PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH - ./script/install_codeclimate.sh - ./script/install_linters.sh - # Force Travis to use Elastic Search 2.4.0 - ./script/install_elasticsearch.sh + - RAILS_ENV=test bundle exec rake search:create script: - set -e - > diff --git a/lib/tasks/search.rake b/lib/tasks/search.rake new file mode 100644 index 000000000..00e377688 --- /dev/null +++ b/lib/tasks/search.rake @@ -0,0 +1,7 @@ + +namespace :search do + desc "Create elastic search index" + task create: :environment do + Crop.__elasticsearch__.create_index! force: true + end +end