Skip to content

Commit d97c531

Browse files
authored
Merge pull request #396 from 3scale/ruby33
THREESCALE-11161 upgrade to ruby 3.3
2 parents bed3c1a + 084f903 commit d97c531

File tree

6 files changed

+20
-15
lines changed

6 files changed

+20
-15
lines changed

.circleci/config.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ attach-to-workspace: &attach-to-workspace
1414
at: /home/circleci
1515

1616
ruby-cache-key: &ruby-cache-key
17-
asdf-ruby-3.0.2-v1
17+
asdf-ruby-3.3.1-v1
1818

1919
bundle-cache-key: &bundle-cache-key
2020
bundle-{{ .Environment.CACHE_VERSION }}-{{ checksum "Gemfile.lock" }}
@@ -60,7 +60,7 @@ commands:
6060
keys:
6161
- *ruby-cache-key
6262
- run:
63-
name: Install Ruby 3.0.2
63+
name: Install Ruby 3.3
6464
command: |
6565
cd $HOME
6666
if [ ! -d ".asdf" ]; then
@@ -69,8 +69,8 @@ commands:
6969
echo '. "$HOME/.asdf/asdf.sh"' > ~/.bashrc
7070
source .bashrc
7171
asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git
72-
asdf install ruby 3.0.2
73-
echo 'ruby 3.0.2' > $HOME/project/.tool-versions
72+
asdf install ruby 3.3.1
73+
echo 'ruby 3.3.1' > $HOME/project/.tool-versions
7474
- save_cache:
7575
paths:
7676
- ../.asdf

.tool-versions.sample

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby 3.0.2
1+
ruby 3.3.1

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ gem 'falcon', '~> 0.35'
7070
gem 'webrick', '~> 1.8'
7171

7272

73-
gem 'dotenv', '~> 2.8.1'
73+
gem 'dotenv'

Gemfile.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ GEM
8181
daemons (1.2.4)
8282
diff-lcs (1.5.1)
8383
docile (1.1.5)
84-
dotenv (2.8.1)
84+
dotenv (3.1.2)
8585
drb (2.2.1)
8686
dry-initializer (3.0.3)
8787
falcon (0.42.3)
@@ -133,7 +133,7 @@ GEM
133133
nokogiri (1.16.5)
134134
mini_portile2 (~> 2.8.2)
135135
racc (~> 1.4)
136-
openssl (3.1.0)
136+
openssl (3.2.0)
137137
pkg-config (1.1.9)
138138
power_assert (2.0.3)
139139
process-metrics (0.2.1)
@@ -269,7 +269,7 @@ DEPENDENCIES
269269
builder (= 3.2.3)
270270
codeclimate-test-reporter (~> 0.6.0)
271271
daemons (= 1.2.4)
272-
dotenv (~> 2.8.1)
272+
dotenv
273273
falcon (~> 0.35)
274274
gli (~> 2.16.1)
275275
hiredis-client

lib/3scale/dotenv.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# If doesn't exist, try to load .env.test
66
def env_file
77
file = ".env.#{ENV['RACK_ENV']}"
8-
File.exists?(file) ? file : '.env.test'
8+
File.exist?(file) ? file : '.env.test'
99
end
1010

1111
begin

test/unit/storage_async_test.rb

+10-5
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def test_tls_no_client_certificate
251251
config_obj = {
252252
url: 'rediss://localhost:46379',
253253
ssl_params: {
254-
ca_file: File.expand_path(File.join(__FILE__, '..', '..', '..', 'script', 'config', 'ca-root-cert.pem'))
254+
ca_file: create_ca(:rsa).path
255255
}
256256
}
257257
storage = StorageAsync::Client.send :new, Storage::Helpers.config_with(config_obj)
@@ -308,11 +308,16 @@ def test_acl_tls
308308

309309
private
310310

311+
def create_ca(alg)
312+
Tempfile.new('ca-root-cert.pem').tap do |ca_cert_file|
313+
ca_cert_file.write(create_cert(create_key(alg)).to_pem)
314+
ca_cert_file.flush
315+
ca_cert_file.close
316+
end
317+
end
318+
311319
def create_certs(alg)
312-
ca_cert_file = Tempfile.new('ca-root-cert.pem')
313-
ca_cert_file.write(create_cert.to_pem)
314-
ca_cert_file.flush
315-
ca_cert_file.close
320+
ca_cert_file = create_ca(alg)
316321

317322
key = create_key alg
318323
key_file = Tempfile.new("redis-#{alg}.pem")

0 commit comments

Comments
 (0)