deimos-ruby 1.24.1 → 1.24.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9f5a1b17f598db05ccd6c5086c3f7f34607c3272d15ba425a9a9af3d61fa6d2
4
- data.tar.gz: 1324ecd619446398b84ce822f47ea73ffd7a7dfaed8d2b5a226194cda45ed86b
3
+ metadata.gz: f2be475993ca3cec87d78682f7724b973f5aadb885612f98d5978169da2932bf
4
+ data.tar.gz: 5ab0f052676184f800965bf68aebecac80583d1da2f38561a305e5f5b57a68c9
5
5
  SHA512:
6
- metadata.gz: 2a0e0fb2113acce5735ca3812a7dc3e5e5898880de2f81f406a5a68252c13a6ac9ca91b5906a0392ba5609db936c4c29c13458b5e2fefd18e0671738dafb5f0d
7
- data.tar.gz: aa8104d7be9d74cf778decee10f73b4284ebb042772406efd6c24ec484331a1119495902d39e6e5b088a01503920658d01d24d0cdb537fbeef06cd645f02b43d
6
+ metadata.gz: 918a363d9994537a221ccc6d00131c75a97f36c8cf89bdda47e0a6e6770b36fd1c3b07e5177d0ef284494020d90dd9081bc9d40ec41f4dc8bbe45e9c4165ea1f
7
+ data.tar.gz: 60d316ef05ce427234e366e32f44addd7188adb45345b025bfb9fd21f339d0c579f317f1e55db20185b9f5f825af3226c27cb53d5e9336ec805200d2a9ce5bd9
@@ -19,10 +19,10 @@ jobs:
19
19
  steps:
20
20
  - uses: actions/checkout@v3
21
21
 
22
- - name: Set up Ruby 2.7
22
+ - name: Set up Ruby 3.3
23
23
  uses: ruby/setup-ruby@v1
24
24
  with:
25
- ruby-version: 2.7
25
+ ruby-version: 3.3
26
26
  bundler-cache: true
27
27
 
28
28
  - name: Bundle install
@@ -36,7 +36,7 @@ jobs:
36
36
  strategy:
37
37
  fail-fast: false
38
38
  matrix:
39
- ruby: [ '2.6', '2.7', '3.0', '3.1' ]
39
+ ruby: [ '2.7', '3.0', '3.1', '3.2', '3.3' ]
40
40
 
41
41
  steps:
42
42
  - uses: actions/checkout@v3
data/.ruby-version CHANGED
@@ -1,2 +1 @@
1
- 2.7.0
2
-
1
+ 3.2.2
data/CHANGELOG.md CHANGED
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## UNRELEASED
9
9
 
10
+ # 1.24.2 - 2024-05-01
11
+ - Fix: Deprecation notice with Rails 7.
12
+
10
13
  # 1.24.1 - 2024-03-26
11
14
  - Fix: ActiveRecordConsumer batch consumption was not working with the trilogy adapter.
12
15
 
@@ -6,6 +6,11 @@ module Deimos
6
6
  self.table_name = 'kafka_topic_info'
7
7
 
8
8
  class << self
9
+
10
+ def quote_time(time)
11
+ time.respond_to?(:to_fs) ? time.to_fs(:db) : time.to_s(:db)
12
+ end
13
+
9
14
  # Lock a topic for the given ID. Returns whether the lock was successful.
10
15
  # @param topic [String]
11
16
  # @param lock_id [String]
@@ -22,9 +27,9 @@ module Deimos
22
27
  qtopic = self.connection.quote(topic)
23
28
  qlock_id = self.connection.quote(lock_id)
24
29
  qtable = self.connection.quote_table_name('kafka_topic_info')
25
- qnow = self.connection.quote(Time.zone.now.to_s(:db))
30
+ qnow = self.connection.quote(quote_time(Time.zone.now))
26
31
  qfalse = self.connection.quoted_false
27
- qtime = self.connection.quote(1.minute.ago.to_s(:db))
32
+ qtime = self.connection.quote(quote_time(1.minute.ago))
28
33
 
29
34
  # If a record is marked as error and less than 1 minute old,
30
35
  # we don't want to pick it up even if not currently locked because
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Deimos
4
- VERSION = '1.24.1'
4
+ VERSION = '1.24.2'
5
5
  end
data/spec/spec_helper.rb CHANGED
@@ -14,6 +14,8 @@ require 'handlers/my_batch_consumer'
14
14
  require 'handlers/my_consumer'
15
15
  require 'rspec/rails'
16
16
  require 'rspec/snapshot'
17
+ require "trilogy_adapter/connection"
18
+ ActiveRecord::Base.public_send :extend, TrilogyAdapter::Connection
17
19
  Dir['./spec/schemas/**/*.rb'].sort.each { |f| require f }
18
20
 
19
21
  # Constants used for consumer specs
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deimos-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.24.1
4
+ version: 1.24.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Orner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-26 00:00:00.000000000 Z
11
+ date: 2024-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avro_turf
@@ -415,7 +415,6 @@ executables:
415
415
  extensions: []
416
416
  extra_rdoc_files: []
417
417
  files:
418
- - ".circleci/config.yml"
419
418
  - ".github/workflows/ci.yml"
420
419
  - ".gitignore"
421
420
  - ".gitmodules"
data/.circleci/config.yml DELETED
@@ -1,83 +0,0 @@
1
- defaults: &defaults
2
- parallelism: 1
3
- working_directory: ~/workspace
4
- docker:
5
- - image: ruby:2.6
6
- environment:
7
- RAILS_ENV: test
8
- DB_HOST_IP: 127.0.0.1
9
- version: 2.1
10
- jobs:
11
- build:
12
- <<: *defaults
13
- steps:
14
- - checkout
15
-
16
- # Restore bundle cache & npm cache
17
- - restore_cache:
18
- key: 'rails-{{ checksum "Gemfile.lock" }}'
19
-
20
- # Bundle install dependencies in /tmp/
21
- # so Dockerfile does not copy them since
22
- # its base image is different than CircleCI
23
- - run:
24
- name: Install bundler
25
- command: gem install bundler:2.1.4
26
- - run:
27
- name: Bundle install
28
- command: bundle install --path vendor/bundle --jobs=4 --retry=3
29
-
30
- # Store bundle cache
31
- - save_cache:
32
- key: 'rails-{{ checksum "Gemfile.lock" }}'
33
- paths:
34
- - ~/workspace/vendor/bundle
35
-
36
- - persist_to_workspace:
37
- root: ~/workspace
38
- paths:
39
- - .
40
-
41
- lint:
42
- <<: *defaults
43
- steps:
44
- - attach_workspace:
45
- at: ~/workspace
46
- - run:
47
- name: Install bundler
48
- command: gem install bundler:2.1.4
49
- - run:
50
- name: Point bundle to vendor/bundle
51
- command: bundle --path vendor/bundle
52
- - run: bundle exec rubocop --display-only-fail-level-offenses --fail-level C
53
-
54
- test-rspec:
55
- <<: *defaults
56
- steps:
57
- - attach_workspace:
58
- at: ~/workspace
59
- - run:
60
- name: Install bundler
61
- command: gem install bundler:2.1.4
62
- - run:
63
- name: Point bundle to vendor/bundle
64
- command: bundle --path vendor/bundle
65
- - run: mkdir result
66
- - run:
67
- name: Running rspec
68
- command: bundle exec rspec --format progress --format RspecJunitFormatter -o result/rspec.xml
69
- when: always
70
- - store_test_results:
71
- path: ~/workspace/result
72
-
73
- workflows:
74
- version: 2
75
- build-and-test:
76
- jobs:
77
- - build
78
- - test-rspec:
79
- requires:
80
- - build
81
- - lint:
82
- requires:
83
- - build