diff --git a/.github/workflows/run_tests_CI.yml b/.github/workflows/run_tests_CI.yml index 0601712..3584e8a 100644 --- a/.github/workflows/run_tests_CI.yml +++ b/.github/workflows/run_tests_CI.yml @@ -11,7 +11,7 @@ jobs: - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7 + ruby-version: 3.0.1 bundler-cache: true - name: Run tests run: bundle exec rspec diff --git a/CHANGELOG.md b/CHANGELOG.md index 44bad84..c57a924 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 1.1.0 + +* Ruby 3 compatibility + - Update aws-sdk to v3 and only install service specific aws-sdk-kinesis + # 1.0.1 * Made compatible down to Ruby 2.0.0 diff --git a/Dockerfile b/Dockerfile index f0f072a..bbbc809 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.7-slim +FROM ruby:3.1-slim WORKDIR /app diff --git a/lib/zoo_stream/kinesis_publisher.rb b/lib/zoo_stream/kinesis_publisher.rb index 6846ddb..7af62c7 100644 --- a/lib/zoo_stream/kinesis_publisher.rb +++ b/lib/zoo_stream/kinesis_publisher.rb @@ -1,4 +1,4 @@ -require 'aws-sdk' +require 'aws-sdk-kinesis' module ZooStream class KinesisPublisher @@ -11,7 +11,7 @@ def initialize(stream_name: ENV.fetch("ZOO_STREAM_KINESIS_STREAM_NAME"), client: def publish(event, shard_by: nil) raise ArgumentError, "Must specify shard_by" unless shard_by - + client.put_record( stream_name: stream_name, partition_key: shard_by, diff --git a/lib/zoo_stream/version.rb b/lib/zoo_stream/version.rb index fe6b62f..2869bd8 100644 --- a/lib/zoo_stream/version.rb +++ b/lib/zoo_stream/version.rb @@ -1,3 +1,3 @@ module ZooStream - VERSION = "1.0.1" + VERSION = "1.1.0" end diff --git a/zoo_stream.gemspec b/zoo_stream.gemspec index 93275dc..9274282 100644 --- a/zoo_stream.gemspec +++ b/zoo_stream.gemspec @@ -19,7 +19,7 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - spec.add_dependency 'aws-sdk' + spec.add_dependency 'aws-sdk-kinesis', '~> 1' spec.add_development_dependency 'bundler', '~> 2.2' spec.add_development_dependency 'rake'