elastic-transport 8.0.0 → 8.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/license.yml +2 -2
  3. data/.github/workflows/otel.yml +48 -0
  4. data/.github/workflows/tests.yml +45 -5
  5. data/.gitignore +1 -1
  6. data/CHANGELOG.md +131 -8
  7. data/CONTRIBUTING.md +64 -0
  8. data/Gemfile +10 -9
  9. data/Gemfile-faraday1.gemfile +40 -0
  10. data/README.md +7 -528
  11. data/Rakefile +48 -1
  12. data/elastic-transport.gemspec +6 -9
  13. data/lib/elastic/transport/client.rb +66 -45
  14. data/lib/elastic/transport/meta_header.rb +21 -12
  15. data/lib/elastic/transport/opentelemetry.rb +166 -0
  16. data/lib/elastic/transport/transport/base.rb +74 -54
  17. data/lib/elastic/transport/transport/errors.rb +2 -4
  18. data/lib/elastic/transport/transport/http/curb.rb +30 -26
  19. data/lib/elastic/transport/transport/http/faraday.rb +30 -27
  20. data/lib/elastic/transport/transport/http/manticore.rb +10 -4
  21. data/lib/elastic/transport/transport/response.rb +3 -3
  22. data/lib/elastic/transport/transport/serializer/multi_json.rb +3 -3
  23. data/lib/elastic/transport/transport/sniffer.rb +3 -1
  24. data/lib/elastic/transport/version.rb +1 -1
  25. data/lib/elastic/transport.rb +1 -0
  26. data/spec/elastic/transport/base_spec.rb +26 -25
  27. data/spec/elastic/transport/client_spec.rb +91 -18
  28. data/spec/elastic/transport/http/manticore_spec.rb +20 -2
  29. data/spec/elastic/transport/meta_header_spec.rb +26 -11
  30. data/spec/elastic/transport/opentelemetry_spec.rb +325 -0
  31. data/spec/elastic/transport/sniffer_spec.rb +18 -0
  32. data/spec/spec_helper.rb +16 -1
  33. data/test/integration/jruby_test.rb +1 -1
  34. data/test/integration/transport_test.rb +86 -40
  35. data/test/test_helper.rb +9 -6
  36. data/test/unit/adapters_test.rb +104 -0
  37. data/test/unit/connection_test.rb +35 -37
  38. data/test/unit/transport_base_test.rb +7 -8
  39. data/test/unit/transport_curb_test.rb +2 -3
  40. data/test/unit/transport_manticore_test.rb +1 -1
  41. metadata +23 -76
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fbf4a3586e25fe9a9bacee53636589bd2635970266f6938c3588547569b5c406
4
- data.tar.gz: 8d2d465485ecc3efd421089feb5f5fd8a81d036c2b77d8d3811e0c0ac8a13c0c
3
+ metadata.gz: 88698d9c25a84a6242bfb875623c2bca0bd9a0e5c40244272e88fe291b06a9e0
4
+ data.tar.gz: 90aff86e0a0f301908c888877d97a72ac926e9b5f7f48b23ad447813a729824d
5
5
  SHA512:
6
- metadata.gz: 392a3e7e09c0e59b424e0181eea6115fd4781928e51b1efde6450e56ac9099634071cbc8db95959b0adb6c48e961d2c76af3c8a434628012f22984922e05f025
7
- data.tar.gz: 8dafbedfbf736513077414861a494bd43bd21410b9c236c8f3b5e2cc8771dfcd9005ffdbf79ec574d819429ddc65fc1f11461194fc2c100d534185c6f4cebd30
6
+ metadata.gz: 3a235c8813516864b3b661790c56c9eeb6c8ee8b44a208d70a3309faca0075e9b45f25890be47d56ed29b845a70c5d3f6cd45c617592543993a0c6d788eb7211
7
+ data.tar.gz: 9cd571ba906d3e841f63f8bf3ea018820d0d9e2eddb9171f01785b6787df5ed19fecbeb0b05e494428af8853d2040c78c32f25a370c612d55a4a69ed77798682
@@ -4,10 +4,10 @@ jobs:
4
4
  build:
5
5
  runs-on: ubuntu-latest
6
6
  steps:
7
- - uses: actions/checkout@v2
7
+ - uses: actions/checkout@v4
8
8
  - uses: ruby/setup-ruby@v1
9
9
  with:
10
- ruby-version: 3
10
+ ruby-version: '3.4'
11
11
  - name: Check license headers
12
12
  run: |
13
13
  ruby ./.github/check_license_headers.rb
@@ -0,0 +1,48 @@
1
+ name: opentelemetry
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ pull_request:
7
+ branches:
8
+ - main
9
+ jobs:
10
+ test-otel:
11
+ name: 'Test Open Telemetry'
12
+ env:
13
+ TEST_ES_SERVER: http://localhost:9250
14
+ PORT: 9250
15
+ TEST_WITH_OTEL: true
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ ruby: ['3.4', 'jruby-9.4']
20
+ es_version: ['8.17.0-SNAPSHOT']
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ - name: Increase system limits
25
+ run: |
26
+ sudo swapoff -a
27
+ sudo sysctl -w vm.swappiness=1
28
+ sudo sysctl -w fs.file-max=262144
29
+ sudo sysctl -w vm.max_map_count=262144
30
+ - uses: elastic/elastic-github-actions/elasticsearch@master
31
+ with:
32
+ stack-version: ${{ matrix.es_version }}
33
+ security-enabled: false
34
+ - uses: ruby/setup-ruby@v1
35
+ with:
36
+ ruby-version: ${{ matrix.ruby }}
37
+ - name: Build and test with Rake
38
+ run: |
39
+ sudo apt-get update
40
+ sudo apt-get install libcurl4-openssl-dev
41
+ ruby -v
42
+ bundle install
43
+ - name: unit tests
44
+ run: bundle exec rake test:unit
45
+ - name: specs
46
+ run: bundle exec rake test:spec
47
+ - name: integration tests
48
+ run: bundle exec rake test:integration
@@ -7,17 +7,19 @@ on:
7
7
  branches:
8
8
  - main
9
9
  jobs:
10
- test-ruby:
10
+ test:
11
+ name: 'Main tests'
11
12
  env:
12
13
  TEST_ES_SERVER: http://localhost:9250
13
14
  PORT: 9250
14
15
  strategy:
15
16
  fail-fast: false
16
17
  matrix:
17
- ruby: [ '2.6', '2.7', '3.0', '3.1', 'jruby-9.3' ]
18
+ ruby: ['3.1', '3.2', '3.3', '3.4', 'jruby-9.3', 'jruby-9.4']
19
+ es_version: ['8.16.0-SNAPSHOT', '8.17.0-SNAPSHOT', '8.18.0-SNAPSHOT']
18
20
  runs-on: ubuntu-latest
19
21
  steps:
20
- - uses: actions/checkout@v2
22
+ - uses: actions/checkout@v4
21
23
  - name: Increase system limits
22
24
  run: |
23
25
  sudo swapoff -a
@@ -26,7 +28,8 @@ jobs:
26
28
  sudo sysctl -w vm.max_map_count=262144
27
29
  - uses: elastic/elastic-github-actions/elasticsearch@master
28
30
  with:
29
- stack-version: 8.0.0-SNAPSHOT
31
+ stack-version: ${{ matrix.es_version }}
32
+ security-enabled: false
30
33
  - uses: ruby/setup-ruby@v1
31
34
  with:
32
35
  ruby-version: ${{ matrix.ruby }}
@@ -42,4 +45,41 @@ jobs:
42
45
  run: bundle exec rake test:spec
43
46
  - name: integration tests
44
47
  run: bundle exec rake test:integration
45
-
48
+ test-faraday1:
49
+ name: 'Test Faraday 1'
50
+ env:
51
+ TEST_ES_SERVER: http://localhost:9250
52
+ PORT: 9250
53
+ strategy:
54
+ fail-fast: false
55
+ matrix:
56
+ ruby: ['3.0', '3.1', '3.2', '3.3', 'jruby-9.3']
57
+ es_version: ['8.16.0-SNAPSHOT']
58
+ runs-on: ubuntu-latest
59
+ steps:
60
+ - uses: actions/checkout@v4
61
+ - name: Increase system limits
62
+ run: |
63
+ sudo swapoff -a
64
+ sudo sysctl -w vm.swappiness=1
65
+ sudo sysctl -w fs.file-max=262144
66
+ sudo sysctl -w vm.max_map_count=262144
67
+ - uses: elastic/elastic-github-actions/elasticsearch@master
68
+ with:
69
+ stack-version: ${{ matrix.es_version }}
70
+ security-enabled: false
71
+ - uses: ruby/setup-ruby@v1
72
+ with:
73
+ ruby-version: ${{ matrix.ruby }}
74
+ - name: Build and test with Rake
75
+ run: |
76
+ sudo apt-get update
77
+ sudo apt-get install libcurl4-openssl-dev
78
+ ruby -v
79
+ BUNDLE_GEMFILE=./Gemfile-faraday1.gemfile bundle install
80
+ - name: faraday1 unit tests
81
+ run: BUNDLE_GEMFILE=./Gemfile-faraday1.gemfile bundle exec rake test:faraday1:unit
82
+ - name: specs
83
+ run: BUNDLE_GEMFILE=./Gemfile-faraday1.gemfile bundle exec rake test:faraday1:spec
84
+ - name: integration tests
85
+ run: BUNDLE_GEMFILE=./Gemfile-faraday1.gemfile bundle exec rake test:faraday1:integration
data/.gitignore CHANGED
@@ -5,7 +5,7 @@
5
5
  .bundle
6
6
  .config
7
7
  .yardoc
8
- Gemfile.lock
8
+ Gemfile*.lock
9
9
  InstalledFiles
10
10
  _yardoc
11
11
  coverage
data/CHANGELOG.md CHANGED
@@ -1,18 +1,141 @@
1
- ## 8.0.0.pre3
1
+ ## 8.4.0
2
2
 
3
- - Tested in Ruby 3.1, JRuby 9.3, drops Ruby 2.5 in test Matrix. Version 8.0.0.pre3 is being tested for Ruby (MRI) 2.6, 2.7, 3.0 and 3.1 and JRuby 9.3.
4
- - Updates Manticore implementation headers setup. When using the Manticore HTTP implementation, adding a custom `User-Agent` value in the headers on initialization would get overwritten. [Pull Request](https://github.com/elastic/elastic-transport-ruby/pull/22) - [Issue reported in elastic/elasticsearch-ruby#1684](https://github.com/elastic/elasticsearch-ruby/issues/1684).
3
+ - Adds support for **[Excon](https://github.com/excon/excon)** Faraday adapter. You can use the Excon adapter by setting it in when initializing an Elasticsearch client:
4
+
5
+ ```ruby
6
+ require 'faraday/excon'
7
+
8
+ Elasticsearch::Client.new(
9
+ host: host,
10
+ transport_options: transport_options,
11
+ adapter: :excon
12
+ )
13
+ ```
14
+
15
+ Excon may need some specific configuration for HTTPS/SSL. You may see certificate verification errors when trying to connect to Elastic. Excon has certificates bundled, but these can be customized:
16
+
17
+ ```ruby
18
+ Excon.defaults[:ssl_ca_path] = path_to_certs
19
+ ENV['SSL_CERT_DIR'] = path_to_certs
20
+ Excon.defaults[:ssl_ca_file] = path_to_file
21
+ ENV['SSL_CERT_FILE'] = path_to_file
22
+ Excon.defaults[:ssl_verify_callback] = callback
23
+ # (see OpenSSL::SSL::SSLContext#verify_callback)
24
+ Excon.defaults[:ssl_verify_peer] = false` # (less secure).
25
+ ```
26
+
27
+ - Adds support for **[Async::HTTP::Faraday](https://github.com/socketry/async-http-faraday)**. You can use the adapter by setting it when initializing an Elasticsearch client:
28
+ ```ruby
29
+ require 'async-http-faraday'
30
+
31
+ Elasticsearch::Client.new(
32
+ host: host,
33
+ adapter: :async_http
34
+ )
35
+ ```
36
+ - Minor refactors, styling fixes.
37
+
38
+ ## 8.3.5
39
+
40
+ - Small updates in source code documentation.
41
+ - Updates meta header for Elasticsearch Serverless.
42
+ - Fixes issues with ES_SERVERLESS_SERVICE_VERSION for backwards compatibility
43
+
44
+ ## 8.3.3, 8.3.4 (yanked)
45
+
46
+ - Yanked due to errors.
47
+
48
+ ## 8.3.2
49
+
50
+ - OpenTelemetry: In v8.3.0 and v8.3.1, the environment variable `OTEL_INSTRUMENTATION_ELASTICSEARCH_CAPTURE_SEARCH_QUERY` was available but is now deprecated in favor of `OTEL_RUBY_INSTRUMENTATION_ELASTICSEARCH_CAPTURE_SEARCH_QUERY`.
51
+
52
+ ## 8.3.1
53
+
54
+ Tested versions of Ruby: (MRI) 3.0, 3.1, 3.2, 3.3, JRuby 9.3 and JRuby 9.4
55
+
56
+ - Removes unneccessary `require 'base64'` found thanks to warning in Ruby 3.3. So this removes the warning too if you were using Ruby 3.3.
57
+
58
+ ## 8.3.0
59
+
60
+ Tested versions of Ruby: (MRI) 3.0, 3.1, 3.2, JRuby 9.3 and JRuby 9.4
61
+
62
+ This release adds native support for OpenTelemetry. Documentation will be added to [the official Transport documentation](https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/transport.html). Pull Request: [#54](https://github.com/elastic/elastic-transport-ruby/pull/54).
63
+
64
+ ## 8.2.4
65
+
66
+ Tested versions of Ruby: (MRI) 3.0, 3.1, 3.2, JRuby 9.3 and JRuby 9.4
67
+
68
+ - Fixes [#66](https://github.com/elastic/elastic-transport-ruby/issues/66) - Manticore transport unable to send custom headers with perform_request [Pull Request](https://github.com/elastic/elastic-transport-ruby/pull/69)
69
+ - Fixes [#67](https://github.com/elastic/elastic-transport-ruby/issues/67) - Float with many digits automatically becomes BigDecimal when using Oj. [Pull Request](https://github.com/elastic/elastic-transport-ruby/pull/68), thank you @kyoshidajp!
70
+
71
+ ## 8.2.3
72
+
73
+ Tested versions of Ruby: (MRI) 3.0, 3.1, 3.2, JRuby 9.3 and JRuby 9.4
74
+
75
+ - Fixes enforcing UTF-8 in Response body, causing an error when the string is frozen, particularly when using webmock. [issue #63](https://github.com/elastic/elastic-transport-ruby/issues/63)
5
76
 
6
- ## 8.0.0.pre2
77
+ ## 8.2.2
7
78
 
79
+ Tested versions of Ruby: (MRI) 3.0, 3.1, 3.2, JRuby 9.3 and JRuby 9.4
80
+
81
+ - Refactors `apply_headers` in base and manticore implementation: When passing in an object to the initializer, `apply_headers` would mutate this object and in certain conditions, this would raise `RuntimeError` in JRuby 9.3 and `ConcurrencyError` in JRuby 9.4. This update clones the options object instead.
82
+
83
+ ## 8.2.1
84
+
85
+ Tested versions of Ruby: (MRI) 2.7, 3.0, 3.1, 3.2, JRuby 9.3 and JRuby 9.4. Ruby 2.7's end of life is coming in a few days, so this'll probably be the last release to test for Ruby 2.7.
86
+
87
+ - Fixes parsing ipv4 addresses like `inet[/127.0.0.1:9200]` in sniffer, [issue #48](https://github.com/elastic/elastic-transport-ruby/issues/48). [Pull Request](https://github.com/elastic/elastic-transport-ruby/pull/49) by [@robbat2](https://github.com/robbat2), thank you!
88
+
89
+ ## 8.2.0
90
+
91
+ Tested versions of Ruby: (MRI) 2.7, 3.0, 3.1, 3.2, JRuby 9.3 and JRuby 9.4.
92
+
93
+ - Fixes [issue #44](https://github.com/elastic/elastic-transport-ruby/issues/44), raising `Elastic::Transport::Transport::Error` instead of `Faraday::ConnectionFailed` (or any other Faraday error class) when a host is unreachable.
94
+ - Removes development dependency on `ansi`, it hasn't been updated for years.
95
+ - Adds `rake console` task to run IRB with the Elastic transport client libraries loaded.
96
+ - General refactors, cleanup and updates in code for `base.rb` (The base class used by HTTP implementations Faraday, Manticore, Curb), `errors.rb`, `faraday.rb`, and more.
97
+
98
+ ## 8.1.0
99
+
100
+ Adds support for Faraday version 2. From [Faraday's Upgrading guide](https://github.com/lostisland/faraday/blob/main/UPGRADING.md#faraday-20), the main change is the adapters have moved:
101
+
102
+ > With this release, we've officially moved all adapters, except for the net_http one, out of Faraday. What that means, is that they won't be available out-of-the-box anymore, and you'll instead need to add them to your Gemfile.
103
+ > If you just use the default net_http adapter, then you don't need to do anything!
104
+ > Otherwise, add the corresponding adapter gem to your Gemfile (e.g. faraday-net_http_persistent). Then, simply require them after you require faraday.
105
+
106
+ We're now supporting Faraday v2 and Faraday v1. The adapters were removed as development dependency in the gemspec and added to the Gemfile. A new file `Gemfile-faraday1.gemfile` was added to run tests with version `1.x` of Faraday too.
107
+
108
+ These are the gems required for the different adapters with Faraday 2, instead of the libraries on which they were based:
109
+ ```
110
+ # HTTPCLient
111
+ 'faraday-httpclient'
112
+
113
+ # NetHTTPPersistent
114
+ 'faraday-net_http_persistent'
115
+
116
+ # Patron
117
+ 'faraday-patron'
118
+
119
+ # Typhoeus
120
+ 'faraday-typhoeus'
121
+ ```
122
+
123
+ If you're using Faraday 1, you shouldn't have to change anything, but please [submit an issue](https://github.com/elastic/elastic-transport-ruby/issues) if you encounter any issues.
124
+
125
+ ## 8.0.1
126
+
127
+ - Minor code cleanup
128
+ - Adds Elastic Transport service token, updates specs for meta header.
129
+
130
+ ## 8.0.0
131
+
132
+ - Library renamed from [`elasticsearch-transport`](https://github.com/elastic/elasticsearch-ruby/tree/7.x/elasticsearch-transport) to `elastic-transport` and promoted to its own repository.
8
133
  - Fixes tracing for Manticore [commit](https://github.com/elastic/elastic-transport-ruby/commit/98c81d19de4fee394f9c1a5079a1892ec951e0f9).
9
134
  - Implements CA Fingerprinting [pull request](https://github.com/elastic/elastic-transport-ruby/pull/13)
10
135
  - Adds `delay_on_retry` to wait between each failed connection, thanks @DinoPullerUqido! [commit](https://github.com/elastic/elastic-transport-ruby/commit/c2f8311409ca63a293588cb7eea5a0c672dbd436)
11
136
  - Fixes compression, thanks @johnnyshields! [commit](https://github.com/elastic/elastic-transport-ruby/commit/8b326d643f76f037075500e19bbe096b2c298099)
12
-
13
- ## 8.0.0.pre1
14
-
15
- - Library renamed from [`elasticsearch-transport`](https://github.com/elastic/elasticsearch-ruby/tree/7.x/elasticsearch-transport) to `elastic-transport` and promoted to its own repository.
137
+ - Tested in Ruby 3.1, JRuby 9.3, drops Ruby 2.5 in test Matrix. Version 8.0.0 tested for Ruby (MRI) 2.6, 2.7, 3.0 and 3.1 and JRuby 9.3.
138
+ - Updates Manticore implementation headers setup. When using the Manticore HTTP implementation, adding a custom `User-Agent` value in the headers on initialization would get overwritten. [Pull Request](https://github.com/elastic/elastic-transport-ruby/pull/22) - [Issue reported in elastic/elasticsearch-ruby#1684](https://github.com/elastic/elasticsearch-ruby/issues/1684).
16
139
 
17
140
  # Changes from elasticsearch-transport:
18
141
 
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,64 @@
1
+ # Contributing to Elasticsearch Transport Ruby
2
+
3
+
4
+ This guide assumes Ruby is already installed. We follow Ruby’s own maintenance policy and officially support all currently maintained versions per [Ruby Maintenance Branches](https://www.ruby-lang.org/en/downloads/branches/). So we can't guarantee the code works for versions of Ruby that have reached their end of life.
5
+
6
+ To work on the code, clone the project first:
7
+
8
+ ```
9
+ $ git clone git@github.com:elastic/elastic-transport-ruby.git
10
+ ```
11
+
12
+ And run `bundle install` to install dependencies.
13
+
14
+ # Tests
15
+
16
+ There are several test tasks in the Rakefile, you can check them with `rake -T` from the project's root directory.
17
+
18
+ ```bash
19
+ rake test:unit
20
+ rake test:spec
21
+ rake test:integration
22
+ ```
23
+
24
+ Use `COVERAGE=true` before running a test task to check coverage with Simplecov.
25
+
26
+ Github's pull requests and issues are used to communicate, send bug reports and code contributions. Bug fixes and features must be covered by unit tests.
27
+
28
+ You need an Elasticsearch cluster running for integration tests. The tests will use the default host `localhost:9200`, but you can change this value by setting the environment variables `TEST_ES_SERVER` or `ELASTICSEARCH_HOSTS`:
29
+
30
+ ```
31
+ $ TEST_ES_SERVER=host:port rake test:integration
32
+ ```
33
+
34
+ A rake task is included to launch an Elasticsearch cluster with Docker. You need to install docker on your system and then run:
35
+ ```bash
36
+ $ rake docker:start[VERSION]
37
+ ```
38
+
39
+ E.g.:
40
+ ```bash
41
+ $ rake docker:start[8.0.0-alpha1]
42
+ ```
43
+
44
+ You can find the available version in [Docker @ Elastic](https://www.docker.elastic.co/r/elasticsearch). You can also run Elasticsearch and Kibana locally with Docker with `start-local`:
45
+
46
+ ```bash
47
+ curl -fsSL https://elastic.co/start-local | sh
48
+ ```
49
+
50
+ This will run Elasticsearch in http://localhost:9200 and Kibana in http://localhost:5601. More information is available [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/run-elasticsearch-locally.html).
51
+
52
+ # Contributing
53
+
54
+ The process for contributing is:
55
+
56
+ 1. It is best to do your work in a separate Git branch. This makes it easier to synchronise your changes with [`rebase`](http://mislav.uniqpath.com/2013/02/merge-vs-rebase/).
57
+
58
+ 2. Make sure your changes don't break any existing tests, and that you add tests for both bugfixes and new functionality.
59
+
60
+ 3. **Sign the contributor license agreement.**
61
+ Please make sure you have signed the [Contributor License Agreement](https://www.elastic.co/contributor-agreement/). We are not asking you to assign copyright to us, but to give us the right to distribute your code without restriction. We ask this of all contributors in order to assure our users of the origin and continuing existence of the code. You only need to sign the CLA once.
62
+
63
+ 4. Submit a pull request.
64
+ Push your local changes to your forked copy of the repository and submit a pull request. In the pull request, describe what your changes do and mention the number of the issue where discussion has taken place, eg “Closes #123″.
data/Gemfile CHANGED
@@ -20,19 +20,20 @@ source 'https://rubygems.org'
20
20
  # Specify your gem's dependencies in elasticsearch-transport.gemspec
21
21
  gemspec
22
22
 
23
- if File.exist? File.expand_path('../elasticsearch-api/elasticsearch-api.gemspec', __dir__)
24
- gem 'elasticsearch-api', path: File.expand_path('../elasticsearch-api', __dir__), require: false
25
- end
26
-
27
- if File.exist? File.expand_path('../elasticsearch/elasticsearch.gemspec', __dir__)
28
- gem 'elasticsearch', path: File.expand_path('../elasticsearch', __dir__), require: false
29
- end
30
-
31
23
  group :development, :test do
32
- gem 'rspec'
24
+ gem 'faraday-excon'
25
+ gem 'faraday-httpclient'
26
+ gem 'faraday-net_http_persistent'
27
+ gem 'faraday-typhoeus'
28
+ gem 'mutex_m' if RUBY_VERSION >= '3.4'
29
+ gem 'opentelemetry-sdk', require: false if RUBY_VERSION >= '3.0'
33
30
  if defined?(JRUBY_VERSION)
34
31
  gem 'pry-nav'
35
32
  else
33
+ gem 'async-http-faraday'
34
+ gem 'faraday-patron'
35
+ gem 'oj'
36
36
  gem 'pry-byebug'
37
37
  end
38
+ gem 'rspec'
38
39
  end
@@ -0,0 +1,40 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ source 'https://rubygems.org'
19
+
20
+ # Usage:
21
+ #
22
+ # $ BUNDLE_GEMFILE=./Gemfile-faraday1.gemfile bundle install
23
+ # $ BUNDLE_GEMFILE=./Gemfile-faraday1.gemfile bundle exec rake test:faraday1:unit
24
+
25
+ gem 'faraday', '~> 1'
26
+ gemspec
27
+
28
+ group :development, :test do
29
+ gem 'httpclient'
30
+ gem 'net-http-persistent'
31
+ gem 'rspec'
32
+ gem 'typhoeus'
33
+ if defined?(JRUBY_VERSION)
34
+ gem 'pry-nav'
35
+ else
36
+ gem 'pry-byebug'
37
+ gem 'oj'
38
+ gem 'patron'
39
+ end
40
+ end