rsolr 2.4.0 → 2.5.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: def877722611e3004a0264d334d6807aade91d4af710c3b0846a9023cf44e620
4
- data.tar.gz: 9a5b3e5c1252fe6cb78669286f0a90449fbe923b9a6385a211f70ff6462b2a43
3
+ metadata.gz: f44e7e34b8e615204b49052907e322c46387d858f147b7e34bd4c53edf6b336e
4
+ data.tar.gz: b5ad262ba4b5777f18b817c529f9cb8768843972f394420a4798191f92a11b17
5
5
  SHA512:
6
- metadata.gz: a7d50dddb8b4408965f3c09b16a05f3306de7cde2f89f668a3e847f1e842b44f4e6372f43e7c2fa26ab4287d64c183a969721701ea54ce51716f8afc71126755
7
- data.tar.gz: 0137a6861afffa2cdd51effc56805997641943037bc65ef9170a9feef35c1675d14f80d318fb97b3b9e1c45971b71b69ebdc2ced1976c000296829580b9642f8
6
+ metadata.gz: c230788c63b34623fa05608af73c25c5c7bd6fbab106afc62c63b1347a688bf302d0b03323204b0efd047f01ddc2d957722cd5ed0f98553ec3974b7ed2653c79
7
+ data.tar.gz: 606324146e3acb8cb86c726a528550fefd0bd57fdebce977fc260c5a38caf4b1c5aeca7c3f23637dcf4bf04e8fbc196e60e4cc63f9827ee7e88af01e816ce3a4
@@ -11,7 +11,27 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  strategy:
13
13
  matrix:
14
- ruby: [jruby-9.2.20.0, 2.4, 2.5, 2.6, 2.7, 3.0]
14
+ ruby: [jruby-9.3.3.0, 2.7, '3.0', '3.1']
15
+ faraday: ['~> 0.17', '~> 1', '~>2']
16
+ steps:
17
+ - uses: actions/checkout@v2
18
+ - name: Set up Ruby
19
+ uses: ruby/setup-ruby@v1
20
+ with:
21
+ ruby-version: ${{ matrix.ruby }}
22
+ - name: Install dependencies
23
+ run: bundle install
24
+ env:
25
+ FARADAY_VERSION: ${{ matrix.faraday}}
26
+ - name: Run tests
27
+ run: bundle exec rake
28
+ env:
29
+ FARADAY_VERSION: ${{ matrix.faraday}}
30
+ legacy_tests:
31
+ runs-on: ubuntu-latest
32
+ strategy:
33
+ matrix:
34
+ ruby: [jruby-9.2.20.0, 2.4, 2.5, 2.6, 2.7]
15
35
  steps:
16
36
  - uses: actions/checkout@v2
17
37
  - name: Set up Ruby
data/Gemfile CHANGED
@@ -4,6 +4,10 @@ gemspec
4
4
 
5
5
  gem "builder", ">= 2.1.2"
6
6
 
7
- # HTTP.rb (used by solr_wrapper to download solr for integration testing) fails
8
- # to download the full contents of files (under jruby)?
9
- gem "http", '< 5', platforms: :jruby
7
+ if defined? JRUBY_VERSION
8
+ # HTTP.rb (used by solr_wrapper to download solr for integration testing) fails
9
+ # to download the full contents of files (under jruby)?
10
+ gem "http", '< 5', platforms: :jruby
11
+ end
12
+
13
+ gem 'faraday', ENV['FARADAY_VERSION'] if ENV['FARADAY_VERSION']
data/lib/rsolr/client.rb CHANGED
@@ -314,12 +314,22 @@ class RSolr::Client
314
314
  conn_opts[:request][:params_encoder] = Faraday::FlatParamsEncoder
315
315
 
316
316
  Faraday.new(conn_opts) do |conn|
317
- conn.basic_auth(uri.user, uri.password) if uri.user && uri.password
317
+ if uri.user && uri.password
318
+ case Faraday::VERSION
319
+ when /^0/
320
+ conn.basic_auth uri.user, uri.password
321
+ when /^1/
322
+ conn.request :basic_auth, uri.user, uri.password
323
+ else
324
+ conn.request :authorization, :basic_auth, uri.user, uri.password
325
+ end
326
+ end
327
+
318
328
  conn.response :raise_error
319
329
  conn.request :retry, max: options[:retry_after_limit], interval: 0.05,
320
330
  interval_randomness: 0.5, backoff_factor: 2,
321
331
  exceptions: ['Faraday::Error', 'Timeout::Error'] if options[:retry_503]
322
- conn.adapter options[:adapter] || Faraday.default_adapter
332
+ conn.adapter options[:adapter] || Faraday.default_adapter || :net_http
323
333
  end
324
334
  end
325
335
  end
data/lib/rsolr/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module RSolr
2
- VERSION = "2.4.0"
2
+ VERSION = "2.5.0"
3
3
 
4
4
  def self.version
5
5
  VERSION
data/rsolr.gemspec CHANGED
@@ -27,13 +27,13 @@ Gem::Specification.new do |s|
27
27
  s.test_files = `git ls-files -- {spec}/*`.split("\n")
28
28
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
29
29
  s.require_paths = ["lib"]
30
-
30
+
31
31
  s.required_ruby_version = '>= 1.9.3'
32
-
32
+
33
33
  s.requirements << 'Apache Solr'
34
34
 
35
35
  s.add_dependency 'builder', '>= 2.1.2'
36
- s.add_dependency 'faraday', '>= 0.9.0'
36
+ s.add_dependency 'faraday', '>= 0.9', '!= 2.0.0', '< 3'
37
37
 
38
38
  s.add_development_dependency 'activesupport'
39
39
  s.add_development_dependency 'nokogiri', '>= 1.4.0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsolr
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antoine Latter
@@ -29,7 +29,7 @@ authors:
29
29
  autorequire:
30
30
  bindir: bin
31
31
  cert_chain: []
32
- date: 2021-12-15 00:00:00.000000000 Z
32
+ date: 2022-02-11 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: builder
@@ -51,14 +51,26 @@ dependencies:
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 0.9.0
54
+ version: '0.9'
55
+ - - "!="
56
+ - !ruby/object:Gem::Version
57
+ version: 2.0.0
58
+ - - "<"
59
+ - !ruby/object:Gem::Version
60
+ version: '3'
55
61
  type: :runtime
56
62
  prerelease: false
57
63
  version_requirements: !ruby/object:Gem::Requirement
58
64
  requirements:
59
65
  - - ">="
60
66
  - !ruby/object:Gem::Version
61
- version: 0.9.0
67
+ version: '0.9'
68
+ - - "!="
69
+ - !ruby/object:Gem::Version
70
+ version: 2.0.0
71
+ - - "<"
72
+ - !ruby/object:Gem::Version
73
+ version: '3'
62
74
  - !ruby/object:Gem::Dependency
63
75
  name: activesupport
64
76
  requirement: !ruby/object:Gem::Requirement
@@ -225,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
237
  version: '0'
226
238
  requirements:
227
239
  - Apache Solr
228
- rubygems_version: 3.1.6
240
+ rubygems_version: 3.3.3
229
241
  signing_key:
230
242
  specification_version: 4
231
243
  summary: A Ruby client for Apache Solr