From 4ae9ca0fc25f1cbf863a214a5786b1aae91c61d7 Mon Sep 17 00:00:00 2001 From: Matt Muller <mamuller@amazon.com> Date: Mon, 16 Sep 2024 12:41:36 -0400 Subject: [PATCH] Rubocop + disable jruby 9.2 and arm64 --- .github/workflows/ci.yml | 2 ++ gems/aws-crt/lib/aws-crt/errors.rb | 2 +- gems/aws-crt/lib/aws-crt/native.rb | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 22aaa3d..33d7f06 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,6 +85,8 @@ jobs: ruby: 2.5 - arch: arm64 ruby: 2.6 + - arch: arm64 + ruby: jruby-9.2 # Some macos runners are x64, some are arm64, see: https://github.com/actions/runner-images#available-images runs-on: ${{ matrix.arch == 'x64' && 'macos-14-large' || 'macos-14' }} steps: diff --git a/gems/aws-crt/lib/aws-crt/errors.rb b/gems/aws-crt/lib/aws-crt/errors.rb index 2a40c66..8be46b1 100644 --- a/gems/aws-crt/lib/aws-crt/errors.rb +++ b/gems/aws-crt/lib/aws-crt/errors.rb @@ -52,7 +52,7 @@ def self.error_class(error_name) # This requires filtering non-safe characters from the constant # name and ensuring it begins with an uppercase letter. def self.error_class_constant(error_name) - error_name.to_s.gsub(/AWS_ERROR_/, '').split('_').map(&:capitalize).join + error_name.to_s.gsub('AWS_ERROR_', '').split('_').map(&:capitalize).join end def self.add_error_constant(constant) diff --git a/gems/aws-crt/lib/aws-crt/native.rb b/gems/aws-crt/lib/aws-crt/native.rb index 56afc51..9d42b6f 100644 --- a/gems/aws-crt/lib/aws-crt/native.rb +++ b/gems/aws-crt/lib/aws-crt/native.rb @@ -76,7 +76,7 @@ def self.array_to_native(array) # = false) # 3. Creates a bang method that does not do automatic error checking. def self.attach_function(c_name, params, returns, options = {}) - ruby_name = c_name.to_s.sub(/aws_crt_/, '').to_sym + ruby_name = c_name.to_s.sub('aws_crt_', '').to_sym raise_errors = options.fetch(:raise, true) options.delete(:raise) unless raise_errors