sunspot_connector 0.1.0 → 0.2.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: 70ce93e9fc78e66aa18b04945a82783f52ae2c6ffbc3d25536126e52c82008d7
4
- data.tar.gz: fda318228db0bc148cf1bfd22cf06ad80cf28c232b24c62e44be1c2159f2249b
3
+ metadata.gz: 849d766ff02615e73e08e2d8f5cbfdacd49f09ffa1ab326a4ce24b6afeab644b
4
+ data.tar.gz: f09fc0e9473900752e0149ce2a15a83b8c85e83229c026fb19d8d50f18f0ec44
5
5
  SHA512:
6
- metadata.gz: 7759326385e9f18f65c5fbf4d7afe16f89140b1fb3f36917ed72c0b3b198f5663f297def3f974a84ae162e2f242247b0911c4efbd50fd19e27bef5db21ebaacb
7
- data.tar.gz: 9889a1defa5c1257f46f20871f3ed2e500ea4fe090705711c7312af81631f53df7525b9660cfa4469d3fd92792302e95562b834567f76411bd407fed2960cab7
6
+ metadata.gz: fb1a652d18ef310a7dd6d964edf27dc9eee09ac798bceaeb89aa61a4d5091a95997489a1e9cbc1744f5f6b7e3099bab160b71715d4103fbbdc5da40b46cec162
7
+ data.tar.gz: 6dbf3546ceae6f92c4696d7ff31cfe0c3953f014cdb7d4f086127fcc79f5c2e90ea040a8b29496171993a8b790dd9c0e2e375c8d77ac5e7b0663ee03c7e23a98
data/Gemfile.lock CHANGED
@@ -1,50 +1,51 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sunspot_connector (0.1.0)
4
+ sunspot_connector (0.2.0)
5
5
  faraday (~> 1.0)
6
+ rsolr (~> 2.0)
6
7
  sunspot_rails (~> 2.0)
7
8
 
8
9
  GEM
9
10
  remote: https://rubygems.org/
10
11
  specs:
11
- actioncable (5.2.4.4)
12
- actionpack (= 5.2.4.4)
12
+ actioncable (5.2.4.5)
13
+ actionpack (= 5.2.4.5)
13
14
  nio4r (~> 2.0)
14
15
  websocket-driver (>= 0.6.1)
15
- actionmailer (5.2.4.4)
16
- actionpack (= 5.2.4.4)
17
- actionview (= 5.2.4.4)
18
- activejob (= 5.2.4.4)
16
+ actionmailer (5.2.4.5)
17
+ actionpack (= 5.2.4.5)
18
+ actionview (= 5.2.4.5)
19
+ activejob (= 5.2.4.5)
19
20
  mail (~> 2.5, >= 2.5.4)
20
21
  rails-dom-testing (~> 2.0)
21
- actionpack (5.2.4.4)
22
- actionview (= 5.2.4.4)
23
- activesupport (= 5.2.4.4)
22
+ actionpack (5.2.4.5)
23
+ actionview (= 5.2.4.5)
24
+ activesupport (= 5.2.4.5)
24
25
  rack (~> 2.0, >= 2.0.8)
25
26
  rack-test (>= 0.6.3)
26
27
  rails-dom-testing (~> 2.0)
27
28
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
28
- actionview (5.2.4.4)
29
- activesupport (= 5.2.4.4)
29
+ actionview (5.2.4.5)
30
+ activesupport (= 5.2.4.5)
30
31
  builder (~> 3.1)
31
32
  erubi (~> 1.4)
32
33
  rails-dom-testing (~> 2.0)
33
34
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
- activejob (5.2.4.4)
35
- activesupport (= 5.2.4.4)
35
+ activejob (5.2.4.5)
36
+ activesupport (= 5.2.4.5)
36
37
  globalid (>= 0.3.6)
37
- activemodel (5.2.4.4)
38
- activesupport (= 5.2.4.4)
39
- activerecord (5.2.4.4)
40
- activemodel (= 5.2.4.4)
41
- activesupport (= 5.2.4.4)
38
+ activemodel (5.2.4.5)
39
+ activesupport (= 5.2.4.5)
40
+ activerecord (5.2.4.5)
41
+ activemodel (= 5.2.4.5)
42
+ activesupport (= 5.2.4.5)
42
43
  arel (>= 9.0)
43
- activestorage (5.2.4.4)
44
- actionpack (= 5.2.4.4)
45
- activerecord (= 5.2.4.4)
44
+ activestorage (5.2.4.5)
45
+ actionpack (= 5.2.4.5)
46
+ activerecord (= 5.2.4.5)
46
47
  marcel (~> 0.3.1)
47
- activesupport (5.2.4.4)
48
+ activesupport (5.2.4.5)
48
49
  concurrent-ruby (~> 1.0, >= 1.0.2)
49
50
  i18n (>= 0.7, < 2)
50
51
  minitest (~> 5.1)
@@ -62,7 +63,7 @@ GEM
62
63
  faraday-net_http (1.0.1)
63
64
  globalid (0.4.2)
64
65
  activesupport (>= 4.2.0)
65
- i18n (1.8.7)
66
+ i18n (1.8.9)
66
67
  concurrent-ruby (~> 1.0)
67
68
  loofah (2.9.0)
68
69
  crass (~> 1.0.2)
@@ -76,7 +77,7 @@ GEM
76
77
  mini_mime (1.0.2)
77
78
  minitest (5.14.3)
78
79
  multipart-post (2.1.1)
79
- nio4r (2.5.4)
80
+ nio4r (2.5.5)
80
81
  nokogiri (1.11.1-x86_64-darwin)
81
82
  racc (~> 1.4)
82
83
  pr_geohash (1.0.0)
@@ -84,27 +85,27 @@ GEM
84
85
  rack (2.2.3)
85
86
  rack-test (1.1.0)
86
87
  rack (>= 1.0, < 3)
87
- rails (5.2.4.4)
88
- actioncable (= 5.2.4.4)
89
- actionmailer (= 5.2.4.4)
90
- actionpack (= 5.2.4.4)
91
- actionview (= 5.2.4.4)
92
- activejob (= 5.2.4.4)
93
- activemodel (= 5.2.4.4)
94
- activerecord (= 5.2.4.4)
95
- activestorage (= 5.2.4.4)
96
- activesupport (= 5.2.4.4)
88
+ rails (5.2.4.5)
89
+ actioncable (= 5.2.4.5)
90
+ actionmailer (= 5.2.4.5)
91
+ actionpack (= 5.2.4.5)
92
+ actionview (= 5.2.4.5)
93
+ activejob (= 5.2.4.5)
94
+ activemodel (= 5.2.4.5)
95
+ activerecord (= 5.2.4.5)
96
+ activestorage (= 5.2.4.5)
97
+ activesupport (= 5.2.4.5)
97
98
  bundler (>= 1.3.0)
98
- railties (= 5.2.4.4)
99
+ railties (= 5.2.4.5)
99
100
  sprockets-rails (>= 2.0.0)
100
101
  rails-dom-testing (2.0.3)
101
102
  activesupport (>= 4.2.0)
102
103
  nokogiri (>= 1.6)
103
104
  rails-html-sanitizer (1.3.0)
104
105
  loofah (~> 2.3)
105
- railties (5.2.4.4)
106
- actionpack (= 5.2.4.4)
107
- activesupport (= 5.2.4.4)
106
+ railties (5.2.4.5)
107
+ actionpack (= 5.2.4.5)
108
+ activesupport (= 5.2.4.5)
108
109
  method_source
109
110
  rake (>= 0.8.7)
110
111
  thor (>= 0.19.0, < 2.0)
data/README.md CHANGED
@@ -1,32 +1,33 @@
1
1
  # SunspotConnector
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/sunspot_connector`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Ever wanted to override the default HTTP client used in RSolr? I have, and now you can too. If you put
4
+ Solr behind a reverse proxy that supports gzip you'll need additional headers and a better HTTP client
5
+ than the default to allow that. This gem provides hooks to make those changes. It also sets a keep-alive
6
+ header by default which can provide some nice performance improvements if you make a lot of small requests
7
+ and switch to a faraday adapter that supports it.
4
8
 
5
9
  ## Installation
6
10
 
7
- Add this line to your application's Gemfile:
8
-
9
11
  ```ruby
10
12
  gem 'sunspot_connector'
11
- ```
12
-
13
- And then execute:
14
-
15
- $ bundle install
16
-
17
- Or install it yourself as:
18
13
 
19
- $ gem install sunspot_connector
20
-
21
- ## Development
14
+ # Optionally add a new faraday adapter
15
+ gem 'em-synchrony', '~> 1.0'
16
+ gem 'em-http-request', '~> 1.0'
17
+ ```
22
18
 
23
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
19
+ In your Rails config:
24
20
 
25
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
21
+ ```ruby
22
+ solr_override = SunspotConnector::Config.new
23
+ solr_override.headers = { 'Accept-Encoding' => 'gzip,deflate' } # send some extra headers with every request
24
+ solr_override.adapter = :em_synchrony # override the default http connector, any faraday adapter should do
25
+ config.solr_connection_overrides = solr_override
26
+ ```
26
27
 
27
28
  ## Contributing
28
29
 
29
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/sunspot_connector.
30
+ Bug reports and pull requests are welcome on GitHub at https://github.com/mlh758/sunspot_connector.
30
31
 
31
32
 
32
33
  ## License
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  require 'rsolr'
3
+ require 'faraday'
3
4
  module SunspotConnector
4
5
  class Connection
5
6
  def initialize(config = Config.new)
@@ -1,3 +1,3 @@
1
1
  module SunspotConnector
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -27,4 +27,5 @@ Gem::Specification.new do |spec|
27
27
 
28
28
  spec.add_dependency 'sunspot_rails', '~> 2.0'
29
29
  spec.add_dependency 'faraday', '~> 1.0'
30
+ spec.add_dependency 'rsolr', '~> 2.0'
30
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sunspot_connector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Harris
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-16 00:00:00.000000000 Z
11
+ date: 2021-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sunspot_rails
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rsolr
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.0'
41
55
  description:
42
56
  email:
43
57
  - mike.harris@cerner.com