Skip to content

Commit

Permalink
Added ElasticSearch 6 to travis
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Vetter committed Mar 15, 2018
1 parent bdf2436 commit 1ad6b58
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -16,3 +16,4 @@ test/tmp
test/version_tmp
tmp
gemfiles/*.lock
irb.rb
3 changes: 3 additions & 0 deletions .travis.yml
Expand Up @@ -13,9 +13,12 @@ env:
- ES_VERSION=1
- ES_VERSION=2
- ES_VERSION=5
- ES_VERSION=6

install:
- travis_retry bundle install
- sh -c "if [ '$ES_VERSION' = '6' ]; then (curl -s https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.2.tar.gz | tar xz -C /tmp); fi"
- sh -c "if [ '$ES_VERSION' = '6' ]; then /tmp/elasticsearch-6.2.2/bin/elasticsearch -d; fi"
- sh -c "if [ '$ES_VERSION' = '5' ]; then (curl -s https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.4.0.tar.gz | tar xz -C /tmp); fi"
- sh -c "if [ '$ES_VERSION' = '5' ]; then /tmp/elasticsearch-5.4.0/bin/elasticsearch -d; fi"
- sh -c "if [ '$ES_VERSION' = '2' ]; then (curl -s https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.4.1/elasticsearch-2.4.1.tar.gz | tar xz -C /tmp); fi"
Expand Down
7 changes: 0 additions & 7 deletions irb.rb

This file was deleted.

2 changes: 1 addition & 1 deletion lib/search_flip.rb
Expand Up @@ -76,7 +76,7 @@ def self.msearch(criterias)
# @return [SearchFlip::Response] The raw response

def self.aliases(payload)
SearchFlip::HTTPClient.headers(accept: "application/json").post("#{SearchFlip::Config[:base_url]}/_aliases", body: SearchFlip::JSON.generate(payload))
SearchFlip::HTTPClient.headers(accept: "application/json", content_type: "application/json").post("#{SearchFlip::Config[:base_url]}/_aliases", body: SearchFlip::JSON.generate(payload))
end
end

2 changes: 1 addition & 1 deletion test/test_helper.rb
Expand Up @@ -156,7 +156,7 @@ def self.mapping
{
test: {
properties: {
test_field: { type: "string" }
test_field: { type: "date" }
}
}
}
Expand Down

0 comments on commit 1ad6b58

Please sign in to comment.