Last active
October 4, 2017 15:22
-
-
Save tadyjp/c5afbd85fd00e6f91d3deba7c20a38c1 to your computer and use it in GitHub Desktop.
Revisions
-
tadyjp revised this gist
Oct 4, 2017 . No changes.There are no files selected for viewing
-
tadyjp revised this gist
Oct 4, 2017 . No changes.There are no files selected for viewing
-
tadyjp revised this gist
Oct 4, 2017 . No changes.There are no files selected for viewing
-
tadyjp revised this gist
Oct 4, 2017 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ if Net::HTTP::HAVE_ZLIB env.request_headers['Accept-Encoding'] ||= 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3' end -
tadyjp revised this gist
Oct 4, 2017 . No changes.There are no files selected for viewing
-
tadyjp revised this gist
Oct 4, 2017 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ # This middleware is NOT necessary when these adapters are used: # - net_http on Ruby 1.9+ # - net_http_persistent on Ruby 2.0+ # - em_http -
tadyjp revised this gist
Oct 4, 2017 . 1 changed file with 11 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ elasticsearch (5.0.0) elasticsearch-api (5.0.0) elasticsearch-transport (5.0.0) elasticsearch-dsl (0.1.4) elasticsearch-model (0.1.9) elasticsearch-rails (0.1.9) elasticsearch-transport (5.0.0) faraday (0.9.2) faraday_middleware (0.12.2) faraday_middleware-aws-signers-v4 (0.1.5) -
tadyjp revised this gist
Oct 4, 2017 . No changes.There are no files selected for viewing
-
tadyjp created this gist
Oct 4, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ ... gem 'faraday_middleware' ... This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ Elasticsearch::Model.client = Elasticsearch::Client.new( host: ENV.fetch('ELASTICSEARCH_ENDPOINT'), port: 80 ) do |faraday| faraday.use FaradayMiddleware::Gzip # ここを追加 faraday.request :aws_signers_v4, credentials: Aws::Credentials.new(ENV.fetch('AWS_KEY_ID'), ENV.fetch('AWS_ACCESS_KEY')), service_name: 'es', region: 'ap-northeast-1' faraday.adapter Faraday.default_adapter end This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ MultiJson::ParseError: unexpected character at line 1, column 1 [parse.c:664]