Skip to content

Commit 6f2053d

Browse files
dvisockasManuel Schönlaub
authored andcommitted
feat!: drops support for ruby < 3.2
This drops support for ruby versions unsupported by semian >= 0.23.0. feat: adds support for semian 0.24.x and 0.25.x feat: adds support for pg 1.6.x
1 parent 40df98a commit 6f2053d

File tree

9 files changed

+19
-19
lines changed

9 files changed

+19
-19
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ jobs:
4040
strategy:
4141
fail-fast: false
4242
matrix:
43-
ruby: ["2.7", "3.0", "3.1"]
44-
postgres: ["9.6", "10", "11", "12", "13"]
43+
ruby: ["3.2", "3.4"]
44+
postgres: ["9.6", "10", "11", "12", "13", "14", "15", "16", "17"]
4545
runs-on: ubuntu-latest
4646
container:
4747
image: ruby:${{ matrix.ruby }}

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ require:
55

66
AllCops:
77
NewCops: enable
8-
TargetRubyVersion: 2.7
8+
TargetRubyVersion: 3.2
99

1010
Metrics/MethodLength:
1111
Enabled: 50

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.2
1+
3.2.0

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG RUBY_VERSION=3.1.2
1+
ARG RUBY_VERSION=3.2.0
22
FROM ruby:${RUBY_VERSION} as base
33

44
# Avoid warnings by switching to noninteractive

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ gem 'rake', '~> 12.0'
99

1010
group :test do
1111
gem 'rspec', '~> 3.0'
12-
gem 'toxiproxy', '~> 2.0 '
12+
gem 'toxiproxy', '~> 2.0'
1313
end
1414

1515
group :lint do

lib/semian/pg.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ def marks_semian_circuits?
1515

1616
# This allows us to use semian as a drop-in replacement.
1717
class SemianError < PG::Error
18-
def initialize(semian_identifier, *args)
19-
super(*args)
18+
def initialize(semian_identifier, *)
19+
super(*)
2020
@semian_identifier = semian_identifier
2121
end
2222
end
@@ -81,7 +81,7 @@ def resource_exceptions
8181
[::PG::ConnectionBad, ::PG::QueryCanceled].freeze
8282
end
8383

84-
def async_connect_or_reset(*args)
84+
def async_connect_or_reset(*)
8585
acquire_semian_resource(adapter: :pg, scope: :connection) do
8686
super
8787
end
@@ -125,16 +125,16 @@ def with_resource_timeout(temp_timeout)
125125

126126
# The pg gem defines some necessary methods on class level, which is why we have to hook into them.
127127
module ClassMethods
128-
def connect_start(*args)
128+
def connect_start(*)
129129
conn = super
130-
conn.instance_variable_set(:@iopts, _iopts(*args))
130+
conn.instance_variable_set(:@iopts, _iopts(*))
131131
conn
132132
end
133133

134134
private
135135

136-
def _iopts(*args) # rubocop:disable Metrics/AbcSize
137-
option_string = parse_connect_args(*args)
136+
def _iopts(*) # rubocop:disable Metrics/AbcSize
137+
option_string = parse_connect_args(*)
138138
iopts = conninfo_parse(option_string).each_with_object({}) do |h, o|
139139
o[h[:keyword].to_sym] = h[:val] if h[:val]
140140
end

semian-postgres.gemspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ Gem::Specification.new do |spec|
1111

1212
spec.summary = 'Semian adapter for Postgres'
1313
spec.license = 'MIT'
14-
spec.required_ruby_version = Gem::Requirement.new('>=2.7.0')
14+
spec.required_ruby_version = Gem::Requirement.new('>=3.2.0')
1515

16-
spec.add_dependency 'pg', '~> 1.5.0'
17-
spec.add_dependency 'semian', %w[>=0.16.0 <0.23.0]
16+
spec.add_dependency 'pg', '>= 1.5.0', '< 1.7.0'
17+
spec.add_dependency 'semian', %w[>=0.16.0 <=0.25.4]
1818

1919
spec.metadata['homepage_uri'] = spec.homepage
2020
spec.metadata['source_code_uri'] = spec.homepage

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
PGHOST = ENV.fetch('PGHOST', 'localhost')
77
PGPORT = ENV.fetch('PGPORT', 5432)
88

9-
Dir['./spec/support/**/*.rb'].sort.each { |f| require f }
9+
Dir['./spec/support/**/*.rb'].each { |f| require f }
1010

1111
SEMIAN_OPTIONS = {
1212
name: :testing,

spec/support/background_helpers.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ module BackgroundHelpers
55

66
private
77

8-
def background(&block)
9-
thread = Thread.new(&block)
8+
def background(&)
9+
thread = Thread.new(&)
1010
thread.report_on_exception = false
1111
threads << thread
1212
thread.join(0.1)

0 commit comments

Comments
 (0)