Skip to content

Commit

Permalink
feature: add ruby2.3 support and drop rails3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
isqad committed Apr 10, 2019
1 parent 89bec6b commit d00e4fc
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
9 changes: 9 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
matrix:
include:
- DOCKER_RUBY_VERSION: 2.2
RUBY_IMAGE_TAG: 2.2-latest

- DOCKER_RUBY_VERSION: 2.3
RUBY_IMAGE_TAG: 2.3-latest

build:
test:
image: abakpress/dind-testing
Expand Down Expand Up @@ -31,5 +39,6 @@ build:
pull: true
when:
event: push
branch: master
commands:
- release-gem
5 changes: 0 additions & 5 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
appraise 'rails3.2' do
gem 'rails', '~> 3.2.22'
gem 'strong_parameters'
end

appraise 'rails4.0' do
gem 'rails', '~> 4.0.13'
end
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ gem 'pg', '< 1'

# Specify your gem's dependencies in ts_customizer.gemspec
gemspec

if RUBY_VERSION < '2.3'
gem 'pry-byebug', '< 3.7.0', require: false
end
2 changes: 2 additions & 0 deletions lib/sphinx/integration/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def initialize(options = {})

@options = options
@options[:indexes] ||= []
@logger = options[:logger]

@indexes = ::ThinkingSphinx.
indexes.
Expand Down Expand Up @@ -68,6 +69,7 @@ def index
end
rescue StandardError => error
log_error(error)
raise
end

alias_method :reindex, :index
Expand Down
8 changes: 5 additions & 3 deletions spec/sphinx/integration/helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@

allow(adapter).to receive(:index).and_raise(StandardError.new("error message"))

expect_any_instance_of(::Logger).to receive(:error).with("error message")
expect(Sphinx::Integration[:di][:error_notificator]).to receive(:call).with("error message")
expect do
expect_any_instance_of(::Logger).to receive(:error).with("error message")
expect(Sphinx::Integration[:di][:error_notificator]).to receive(:call).with("error message")

helper.index
helper.index
end.to raise_error(StandardError)
end
end
end
Expand Down

0 comments on commit d00e4fc

Please sign in to comment.