From 4f515ba2a76ef9832a6a3a76d3d0a5c406d4e987 Mon Sep 17 00:00:00 2001 From: Eduardo Navarro Date: Tue, 9 Jul 2019 16:45:27 +0200 Subject: [PATCH 1/2] Use require_or_load also with Rails 5 In ed37e9e6a9 require_or_load was used again for Rails 3 and 4. This commit uses it also for Rails 5, as it was working before. --- lib/thinking_sphinx/configuration.rb | 2 +- spec/thinking_sphinx/configuration_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/thinking_sphinx/configuration.rb b/lib/thinking_sphinx/configuration.rb index aef61fd62..38704353f 100644 --- a/lib/thinking_sphinx/configuration.rb +++ b/lib/thinking_sphinx/configuration.rb @@ -98,7 +98,7 @@ def preload_indices end def preload_index(file) - if ActiveRecord::VERSION::MAJOR < 5 + if ActiveRecord::VERSION::MAJOR <= 5 ActiveSupport::Dependencies.require_or_load file else load file diff --git a/spec/thinking_sphinx/configuration_spec.rb b/spec/thinking_sphinx/configuration_spec.rb index ff68653af..79c4c076b 100644 --- a/spec/thinking_sphinx/configuration_spec.rb +++ b/spec/thinking_sphinx/configuration_spec.rb @@ -4,7 +4,7 @@ describe ThinkingSphinx::Configuration do let(:config) { ThinkingSphinx::Configuration.instance } - let(:use_load?) { ActiveRecord::VERSION::MAJOR >= 5 } + let(:use_load?) { ActiveRecord::VERSION::MAJOR > 5 } let(:loading_object) { use_load? ? config : ActiveSupport::Dependencies } let(:loading_method) { use_load? ? :load : :require_or_load } From def004234fcad4ac1a5794aa9b5403af932783b3 Mon Sep 17 00:00:00 2001 From: Pat Allan Date: Wed, 10 Jul 2019 12:19:53 +1000 Subject: [PATCH 2/2] 4.3.2 --- CHANGELOG.markdown | 8 ++++++++ README.textile | 2 +- thinking-sphinx.gemspec | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown index b6de5bf19..31377e7e6 100644 --- a/CHANGELOG.markdown +++ b/CHANGELOG.markdown @@ -2,6 +2,14 @@ All notable changes to this project (at least, from v3.0.0 onwards) are documented in this file. +## 4.3.2 - 2019-07-10 + +[Release Notes](https://github.com/pat/thinking-sphinx/releases/tag/v4.3.2) + +### Fixed + +* Reverted loading change behaviour from v4.3.1 for Rails v5 ([Eduardo J.](https://github.com/eduardoj) in [#1138](https://github.com/pat/thinking-sphinx/pull/1138)). + ## 4.3.1 - 2019-06-27 [Release Notes](https://github.com/pat/thinking-sphinx/releases/tag/v4.3.1) diff --git a/README.textile b/README.textile index 12e1a0a28..372ec7710 100644 --- a/README.textile +++ b/README.textile @@ -1,6 +1,6 @@ h1. Thinking Sphinx -Thinking Sphinx is a library for connecting ActiveRecord to the Sphinx full-text search tool, and integrates closely with Rails (but also works with other Ruby web frameworks). The current release is v4.3.1. +Thinking Sphinx is a library for connecting ActiveRecord to the Sphinx full-text search tool, and integrates closely with Rails (but also works with other Ruby web frameworks). The current release is v4.3.2. h2. Upgrading diff --git a/thinking-sphinx.gemspec b/thinking-sphinx.gemspec index 3fbf14bae..e3e9afa6f 100644 --- a/thinking-sphinx.gemspec +++ b/thinking-sphinx.gemspec @@ -5,7 +5,7 @@ $:.push File.expand_path('../lib', __FILE__) Gem::Specification.new do |s| s.name = 'thinking-sphinx' - s.version = '4.3.1' + s.version = '4.3.2' s.platform = Gem::Platform::RUBY s.authors = ["Pat Allan"] s.email = ["pat@freelancing-gods.com"]