Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Rails 7 deprecation notice #215

Merged
merged 1 commit into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 0 additions & 83 deletions .circleci/config.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Ruby 2.7
- name: Set up Ruby 3.3
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.3
bundler-cache: true

- name: Bundle install
Expand All @@ -36,7 +36,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [ '2.6', '2.7', '3.0', '3.1' ]
ruby: [ '2.7', '3.0', '3.1', '3.2', '3.3' ]

steps:
- uses: actions/checkout@v3
Expand Down
3 changes: 1 addition & 2 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
2.7.0

3.2.2
9 changes: 7 additions & 2 deletions lib/deimos/kafka_topic_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ class KafkaTopicInfo < ActiveRecord::Base
self.table_name = 'kafka_topic_info'

class << self

def quote_time(time)
time.respond_to?(:to_fs) ? time.to_fs(:db) : time.to_s(:db)
end

# Lock a topic for the given ID. Returns whether the lock was successful.
# @param topic [String]
# @param lock_id [String]
Expand All @@ -22,9 +27,9 @@ def lock(topic, lock_id)
qtopic = self.connection.quote(topic)
qlock_id = self.connection.quote(lock_id)
qtable = self.connection.quote_table_name('kafka_topic_info')
qnow = self.connection.quote(Time.zone.now.to_s(:db))
qnow = self.connection.quote(quote_time(Time.zone.now))
qfalse = self.connection.quoted_false
qtime = self.connection.quote(1.minute.ago.to_s(:db))
qtime = self.connection.quote(quote_time(1.minute.ago))

# If a record is marked as error and less than 1 minute old,
# we don't want to pick it up even if not currently locked because
Expand Down
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
require 'handlers/my_consumer'
require 'rspec/rails'
require 'rspec/snapshot'
require "trilogy_adapter/connection"
ActiveRecord::Base.public_send :extend, TrilogyAdapter::Connection
Dir['./spec/schemas/**/*.rb'].sort.each { |f| require f }

# Constants used for consumer specs
Expand Down
Loading