From d8b3f90ff6f8a2d5fcee9480ad4891bd538f79a0 Mon Sep 17 00:00:00 2001 From: Lloyd Watkin Date: Thu, 20 Jun 2024 14:11:12 +0100 Subject: [PATCH] Fix Rubocop syntax warning (#23) * Fix Rubocop * No native password --- .github/workflows/ci.yml | 4 ++-- Gemfile.lock | 2 +- Rakefile | 2 ++ .../connection_adapters/janus_mysql_adapter_spec.rb | 6 ++++++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0568f6..dd5cf63 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,10 +37,10 @@ jobs: ruby-version: ${{ matrix.ruby }} bundler-cache: true - run: | - mysql -e "CREATE USER 'replica'@'%' IDENTIFIED WITH mysql_native_password BY 'replica_password';" -u root -p${{ env.MYSQL_PASSWORD || 'password' }} -h 127.0.0.1 + mysql -e "CREATE USER 'replica'@'%' IDENTIFIED BY 'replica_password';" -u root -p${{ env.MYSQL_PASSWORD || 'password' }} -h 127.0.0.1 mysql -e "GRANT SELECT ON test.* TO 'replica'@'%'" -u root -p${{ env.MYSQL_PASSWORD || 'password' }} -h 127.0.0.1 - mysql -e "CREATE USER 'primary'@'%' IDENTIFIED WITH mysql_native_password BY 'primary_password';" -u root -p${{ env.MYSQL_PASSWORD || 'password' }} -h 127.0.0.1 + mysql -e "CREATE USER 'primary'@'%' IDENTIFIED BY 'primary_password';" -u root -p${{ env.MYSQL_PASSWORD || 'password' }} -h 127.0.0.1 mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'primary'@'%';" -u root -p${{ env.MYSQL_PASSWORD || 'password' }} -h 127.0.0.1 mysql -e "FLUSH PRIVILEGES;" -u root -p${{ env.MYSQL_PASSWORD || 'password' }} -h 127.0.0.1 - run: | diff --git a/Gemfile.lock b/Gemfile.lock index 06bdbc8..6a9f28f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - janus-ar (0.15.1) + janus-ar (0.15.2) GEM remote: http://rubygems.org/ diff --git a/Rakefile b/Rakefile index c702cfc..7398a90 100644 --- a/Rakefile +++ b/Rakefile @@ -1 +1,3 @@ +# frozen_string_literal: true + require 'bundler/gem_tasks' diff --git a/spec/lib/active_record/connection_adapters/janus_mysql_adapter_spec.rb b/spec/lib/active_record/connection_adapters/janus_mysql_adapter_spec.rb index b38e038..8a826c8 100644 --- a/spec/lib/active_record/connection_adapters/janus_mysql_adapter_spec.rb +++ b/spec/lib/active_record/connection_adapters/janus_mysql_adapter_spec.rb @@ -11,6 +11,9 @@ 'username' => 'primary', 'password' => 'primary_password', 'host' => '127.0.0.1', + 'ssl' => true, + 'ssl_mode' => 'REQUIRED', + 'tls_min_version' => 3, } end let(:replica_config) do @@ -19,6 +22,9 @@ 'password' => 'replica_password', 'host' => '127.0.0.1', 'pool' => 500, + 'ssl' => true, + 'ssl_mode' => 'REQUIRED', + 'tls_min_version' => 3, } end let(:config) do