Skip to content

Commit

Permalink
Dropped support for Ruby <2.7.
Browse files Browse the repository at this point in the history
Signed-off-by: Hermann Mayer <[email protected]>
  • Loading branch information
Jack12816 committed Jul 3, 2024
1 parent 9da0ff2 commit b541f29
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
- name: Install the correct Ruby version
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.5
ruby-version: 2.7
bundler-cache: true
rubygems: '3.3.26'
rubygems: '3.4.22'

- name: Prepare the virtual environment
uses: hausgold/actions/ci@master
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install Ruby 2.5
- name: Install Ruby 2.7
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.5
ruby-version: 2.7
bundler-cache: true
rubygems: '3.3.26'
rubygems: '3.4.22'

- name: Prepare the virtual environment
uses: hausgold/actions/ci@master
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ['2.5', '2.7']
ruby: ['2.7']
rails: ['5.2']
env:
BUNDLE_GEMFILE: 'gemfiles/rails_${{ matrix.rails }}.gemfile'
Expand All @@ -30,7 +30,7 @@ jobs:
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
rubygems: '3.3.26'
rubygems: '3.4.22'

- name: Prepare the virtual environment
uses: hausgold/actions/ci@master
Expand Down
8 changes: 1 addition & 7 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ AllCops:
NewCops: enable
SuggestExtensions: false
DisplayCopNames: true
TargetRubyVersion: 2.5
TargetRubyVersion: 2.7
TargetRailsVersion: 5.2
Exclude:
- bin/**/*
Expand Down Expand Up @@ -65,9 +65,3 @@ RSpec/FilePath:
# Because we just implemented the ActiveRecord API.
Rails/SkipsModelValidations:
Enabled: false

# Because Rubocop does not respect the `TargetRubyVersion: 2.5` for this cop,
# so it converts to `then` which is not yet available on Ruby 2.5 which causes
# `NoMethodError` errors. NOTE: Remove when Ruby 2.5 support is dropped.
Style/ObjectThen:
Enabled: false
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
### next

* Dropped support for Ruby <2.7 (#38)
* Moved the schema file validation into the retry block for parallel execution
(#36)
(#37)
* Updated the [Kafka Playground](./doc/kafka-playground) to the latest
Apache Kafka (3.7) and Schema Registry (7.6) versions (#35)

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM hausgold/ruby:2.5
FROM hausgold/ruby:2.7
MAINTAINER Hermann Mayer <[email protected]>

# Update system gem
RUN gem update --system '3.3.26'
RUN gem update --system '3.4.22'

# Install system packages and the latest bundler
RUN apt-get update -yqqq && \
Expand All @@ -11,7 +11,7 @@ RUN apt-get update -yqqq && \
ca-certificates \
bash-completion inotify-tools && \
echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && /usr/sbin/locale-gen && \
gem install bundler -v '~> 2.3.0' --no-document --no-prerelease
gem install bundler -v '~> 2.4.22' --no-document --no-prerelease

# Add new web user
RUN mkdir /app && \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ test-style: \
test-style-ruby:
# Run the static code analyzer (rubocop)
@$(call run-shell,$(BUNDLE) exec $(RUBOCOP) -a \
|| ($(TEST) $$($(RUBY_VERSION)) != '2.5' && true))
|| ($(TEST) $$($(RUBY_VERSION)) != '2.7' && true))

clean:
# Clean the dependencies
Expand Down
6 changes: 3 additions & 3 deletions doc/kafka-playground/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM hausgold/ruby:2.5
FROM hausgold/ruby:2.7
MAINTAINER Hermann Mayer <[email protected]>

# Update system gem
RUN gem update --system '3.3.26'
RUN gem update --system '3.4.22'

# Add backports repository
RUN echo 'deb http://archive.debian.org/debian buster-backports main' \
Expand All @@ -18,7 +18,7 @@ RUN apt-get update -yqqq && \
ca-certificates jq curl cmake \
bash-completion inotify-tools && \
echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && /usr/sbin/locale-gen && \
gem install bundler -v '~> 2.3.0' --no-document --no-prerelease
gem install bundler -v '~> 2.4.22' --no-document --no-prerelease

# Install kcat (formerly known as kafkacat)
RUN curl -sL https://github.com/edenhill/kcat/archive/refs/tags/1.7.0.tar.gz \
Expand Down
2 changes: 1 addition & 1 deletion doc/kafka-playground/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ working Apache Kafka setup which includes the following:
* [Lenses.io Schema Registry
UI](https://github.com/lensesio/schema-registry-ui), you can access it via
mDNS at http://schema-registry-ui.playground.local
* A Ruby 2.5 enabled playground container with configured Rimless support
* A Ruby 2.7 enabled playground container with configured Rimless support

## Examples

Expand Down
2 changes: 1 addition & 1 deletion doc/kafka-playground/config/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# (Avahi, libnss[-mdns]). The default resolver of +Resolv+ does not include the
# mDNS stack so we have to reconfigure it here for local usage only.
#
# See: https://docs.ruby-lang.org/en/2.5.0/Resolv.html
# See: https://docs.ruby-lang.org/en/2.7.0/Resolv.html
require 'resolv'
Resolv::DefaultResolver.replace_resolvers(
[
Expand Down
2 changes: 1 addition & 1 deletion rimless.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']

spec.required_ruby_version = '>= 2.5'
spec.required_ruby_version = '>= 2.7'

spec.add_runtime_dependency 'activesupport', '>= 5.2'
spec.add_runtime_dependency 'avro_turf', '~> 0.11.0'
Expand Down

0 comments on commit b541f29

Please sign in to comment.