diff --git a/CHANGELOG.md b/CHANGELOG.md index 73ebe433a..be5c362c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ - Fix a bug: missing asterisks on some required fields in profile_complete form - Fix a bug: public calendar won't show anything if the current date range include a reserved space availability (#151) - Fix a bug: invoices list is not shown by default in "manage invoices" section +- Fix a bug: unable to run rake fablab:es:* tasks due to an issue with gem faraday 0.16.x (was updated to 0.17) - Fix a security issue: fixed [CVE-2015-9284](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-9284) - [TODO DEPLOY] **IMPORTANT** Please read [postgres_upgrade.md](doc/postgres_upgrade.md) for instructions on upgrading PostgreSQL. - [TODO DEPLOY] `rake db:migrate` diff --git a/Gemfile.lock b/Gemfile.lock index 13398dd74..10797da1b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -159,7 +159,7 @@ GEM execjs (2.7.0) faker (1.4.3) i18n (~> 0.5) - faraday (0.16.2) + faraday (0.17) multipart-post (>= 1.2, < 3) ffi (1.9.24) figaro (1.1.0) diff --git a/config/initializers/elasticsearch.rb b/config/initializers/elasticsearch.rb index 1e6b9966e..d5321b59a 100644 --- a/config/initializers/elasticsearch.rb +++ b/config/initializers/elasticsearch.rb @@ -1,8 +1,10 @@ -if Rails.env.test? - client = Elasticsearch::Client.new host: "http://#{Rails.application.secrets.elaticsearch_host}:9200", log: false -else - client = Elasticsearch::Client.new host: "http://#{Rails.application.secrets.elaticsearch_host}:9200", log: true -end +# frozen_string_literal: true + +client = if Rails.env.test? + Elasticsearch::Client.new host: "http://#{Rails.application.secrets.elaticsearch_host}:9200", log: false + else + Elasticsearch::Client.new host: "http://#{Rails.application.secrets.elaticsearch_host}:9200", log: true + end Elasticsearch::Model.client = client Elasticsearch::Persistence.client = client diff --git a/lib/tasks/fablab/es.rake b/lib/tasks/fablab/es.rake index 1e4a3ca3c..16f3d4095 100644 --- a/lib/tasks/fablab/es.rake +++ b/lib/tasks/fablab/es.rake @@ -163,7 +163,6 @@ namespace :fablab do StatisticService.new.generate_statistic(start_date: i.day.ago.beginning_of_day, end_date: i.day.ago.end_of_day) end end - end end