sunspot_rails 2.2.6 → 2.2.7
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 +4 -4
- data/gemfiles/rails-3.0.0 +1 -1
- data/gemfiles/rails-3.1.0 +1 -1
- data/gemfiles/rails-3.2.0 +1 -1
- data/gemfiles/rails-4.0.0 +2 -2
- data/gemfiles/rails-4.1.0 +2 -2
- data/gemfiles/rails-4.2.0 +2 -2
- data/gemfiles/rails-5.0 +20 -0
- data/lib/sunspot/rails/request_lifecycle.rb +3 -1
- data/lib/sunspot/rails/solr_instrumentation.rb +2 -2
- data/lib/sunspot/rails/solr_logging.rb +2 -7
- data/spec/rails_template/config/initializers/rails_5_override.rb +1 -0
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c73686a623e0b8085e678093d6d80a94a65f988
|
4
|
+
data.tar.gz: 218687305e166d54d3e5240be43cde53c8487abd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb98a7c070f2ca26b62911ca89011bb84f9ac02aa67a6a63f11021a3825d52e65a4956ad647563b82f14ebdc953486a7fd9b58bb40a78643dc3155fb5ebd3339
|
7
|
+
data.tar.gz: 98c9d8a7acc171cda06429a97eaa6a9ca0874a26c8bb923cd1008b69926d88b0ca882ce847f2df51bf425787fa622909db25095da39fa1cd4c5afc9f3062d320
|
data/gemfiles/rails-3.0.0
CHANGED
data/gemfiles/rails-3.1.0
CHANGED
data/gemfiles/rails-3.2.0
CHANGED
data/gemfiles/rails-4.0.0
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
source 'http://rubygems.org'
|
2
2
|
|
3
3
|
gem 'rails', '~> 4.0.0'
|
4
|
-
if
|
4
|
+
if RUBY_VERSION < '2.0'
|
5
5
|
gem 'mime-types', '~> 2.99.0'
|
6
6
|
end
|
7
7
|
|
@@ -17,7 +17,7 @@ group :test do
|
|
17
17
|
end
|
18
18
|
|
19
19
|
group :postgres do
|
20
|
-
gem 'pg'
|
20
|
+
gem 'pg', '~> 0.18.4'
|
21
21
|
end
|
22
22
|
|
23
23
|
group :sqlite do
|
data/gemfiles/rails-4.1.0
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
source 'http://rubygems.org'
|
2
2
|
|
3
3
|
gem 'rails', '~> 4.1.0'
|
4
|
-
if
|
4
|
+
if RUBY_VERSION < '2.0'
|
5
5
|
gem 'mime-types', '~> 2.99.0'
|
6
6
|
end
|
7
7
|
|
@@ -16,7 +16,7 @@ group :test do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
group :postgres do
|
19
|
-
gem 'pg'
|
19
|
+
gem 'pg', '~> 0.18.4'
|
20
20
|
end
|
21
21
|
|
22
22
|
group :sqlite do
|
data/gemfiles/rails-4.2.0
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
source 'http://rubygems.org'
|
2
2
|
|
3
3
|
gem 'rails', '~> 4.2.0'
|
4
|
-
if
|
4
|
+
if RUBY_VERSION < '2.0'
|
5
5
|
gem 'mime-types', '~> 2.99.0'
|
6
6
|
end
|
7
7
|
|
@@ -16,7 +16,7 @@ group :test do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
group :postgres do
|
19
|
-
gem 'pg'
|
19
|
+
gem 'pg', '~> 0.18.4'
|
20
20
|
end
|
21
21
|
|
22
22
|
group :sqlite do
|
data/gemfiles/rails-5.0
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
source 'http://rubygems.org'
|
2
|
+
|
3
|
+
gem 'rails', '~> 5.0'
|
4
|
+
gem 'sunspot', :path => File.expand_path('../../../sunspot', __FILE__)
|
5
|
+
gem 'sunspot_solr', :path => File.expand_path('../../../sunspot_solr', __FILE__)
|
6
|
+
gem 'sunspot_rails', :path => File.expand_path('../..', __FILE__)
|
7
|
+
|
8
|
+
group :test do
|
9
|
+
gem 'protected_attributes_continued'
|
10
|
+
gem 'rspec-rails', '~> 2.14.0'
|
11
|
+
gem 'progress_bar', '~> 1.0.5', require: false
|
12
|
+
end
|
13
|
+
|
14
|
+
group :postgres do
|
15
|
+
gem 'pg', '~> 0.18.4'
|
16
|
+
end
|
17
|
+
|
18
|
+
group :sqlite do
|
19
|
+
gem 'sqlite3', '~> 1.3.7'
|
20
|
+
end
|
@@ -20,8 +20,10 @@ module Sunspot #:nodoc:
|
|
20
20
|
# this case, since after_filter uses the inheritable_attribute
|
21
21
|
# structure, the already-loaded subclasses don't get the filters. So,
|
22
22
|
# the below ensures that all loaded controllers have the filter.
|
23
|
+
callback = ::Rails::VERSION::MAJOR > 3 ? :after_action : :after_filter
|
24
|
+
|
23
25
|
loaded_controllers.each do |controller|
|
24
|
-
controller.
|
26
|
+
controller.send(callback) do
|
25
27
|
if Sunspot::Rails.configuration.auto_commit_after_request?
|
26
28
|
Sunspot.commit_if_dirty
|
27
29
|
elsif Sunspot::Rails.configuration.auto_commit_after_delete_request?
|
@@ -4,10 +4,10 @@ module Sunspot
|
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
|
6
6
|
included do
|
7
|
-
|
7
|
+
alias_method :send_and_receive_without_as_instrumentation, :send_and_receive
|
8
|
+
alias_method :send_and_receive, :send_and_receive_with_as_instrumentation
|
8
9
|
end
|
9
10
|
|
10
|
-
|
11
11
|
def send_and_receive_with_as_instrumentation(path, opts)
|
12
12
|
parameters = (opts[:params] || {})
|
13
13
|
parameters.merge!(opts[:data]) if opts[:data].is_a? Hash
|
@@ -2,12 +2,6 @@ module Sunspot
|
|
2
2
|
module Rails
|
3
3
|
module SolrLogging
|
4
4
|
|
5
|
-
class <<self
|
6
|
-
def included(base)
|
7
|
-
base.alias_method_chain :execute, :rails_logging
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
5
|
COMMIT = %r{<commit/>}
|
12
6
|
|
13
7
|
def execute_with_rails_logging(client, request_context)
|
@@ -17,7 +11,6 @@ module Sunspot
|
|
17
11
|
action = "Commit"
|
18
12
|
body = ""
|
19
13
|
end
|
20
|
-
body = body[0, 800] + '...' if body.length > 800
|
21
14
|
|
22
15
|
# Make request and log.
|
23
16
|
response = nil
|
@@ -56,4 +49,6 @@ end
|
|
56
49
|
|
57
50
|
RSolr::Connection.module_eval do
|
58
51
|
include Sunspot::Rails::SolrLogging
|
52
|
+
alias_method :execute_without_rails_logging, :execute
|
53
|
+
alias_method :execute, :execute_with_rails_logging
|
59
54
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
Rails.application.config.active_record.belongs_to_required_by_default = false if Rails::VERSION::MAJOR == 5
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sunspot_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mat Brown
|
@@ -26,7 +26,7 @@ authors:
|
|
26
26
|
autorequire:
|
27
27
|
bindir: bin
|
28
28
|
cert_chain: []
|
29
|
-
date: 2016-
|
29
|
+
date: 2016-10-26 00:00:00.000000000 Z
|
30
30
|
dependencies:
|
31
31
|
- !ruby/object:Gem::Dependency
|
32
32
|
name: rails
|
@@ -48,14 +48,14 @@ dependencies:
|
|
48
48
|
requirements:
|
49
49
|
- - '='
|
50
50
|
- !ruby/object:Gem::Version
|
51
|
-
version: 2.2.
|
51
|
+
version: 2.2.7
|
52
52
|
type: :runtime
|
53
53
|
prerelease: false
|
54
54
|
version_requirements: !ruby/object:Gem::Requirement
|
55
55
|
requirements:
|
56
56
|
- - '='
|
57
57
|
- !ruby/object:Gem::Version
|
58
|
-
version: 2.2.
|
58
|
+
version: 2.2.7
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: nokogiri
|
61
61
|
requirement: !ruby/object:Gem::Requirement
|
@@ -129,6 +129,7 @@ files:
|
|
129
129
|
- gemfiles/rails-4.0.0
|
130
130
|
- gemfiles/rails-4.1.0
|
131
131
|
- gemfiles/rails-4.2.0
|
132
|
+
- gemfiles/rails-5.0
|
132
133
|
- generators/sunspot/sunspot_generator.rb
|
133
134
|
- generators/sunspot/templates/sunspot.yml
|
134
135
|
- install.rb
|
@@ -166,6 +167,7 @@ files:
|
|
166
167
|
- spec/rails_template/app/models/post_with_only_some_attributes_triggering_reindex.rb
|
167
168
|
- spec/rails_template/app/models/rake_task_auto_load_test_model.rb
|
168
169
|
- spec/rails_template/config/database.yml
|
170
|
+
- spec/rails_template/config/initializers/rails_5_override.rb
|
169
171
|
- spec/rails_template/config/routes.rb
|
170
172
|
- spec/rails_template/config/sunspot.yml
|
171
173
|
- spec/rails_template/db/schema.rb
|
@@ -226,6 +228,7 @@ test_files:
|
|
226
228
|
- spec/rails_template/app/models/post_with_only_some_attributes_triggering_reindex.rb
|
227
229
|
- spec/rails_template/app/models/rake_task_auto_load_test_model.rb
|
228
230
|
- spec/rails_template/config/database.yml
|
231
|
+
- spec/rails_template/config/initializers/rails_5_override.rb
|
229
232
|
- spec/rails_template/config/routes.rb
|
230
233
|
- spec/rails_template/config/sunspot.yml
|
231
234
|
- spec/rails_template/db/schema.rb
|