From 22db593d335e24fdce485365b885ec0c71becb5f Mon Sep 17 00:00:00 2001 From: Hermann Mayer Date: Fri, 5 Jul 2024 18:49:16 +0200 Subject: [PATCH] Dropped support for Ruby <2.7. Signed-off-by: Hermann Mayer --- .github/workflows/documentation.yml | 4 ++-- .github/workflows/release.yml | 6 +++--- .github/workflows/test.yml | 4 ++-- .gitignore | 1 + .rubocop.yml | 2 +- CHANGELOG.md | 3 ++- Dockerfile | 6 +++--- Makefile | 2 +- alarmable.gemspec | 2 +- config/docker/.bashrc | 4 +++- 10 files changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index a6d8ed8..8894b15 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7cf61fb..363bb30 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ec15349..6f9e5fd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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' @@ -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 diff --git a/.gitignore b/.gitignore index 0dd81e4..d194b86 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ /pkg/ /spec/reports/ /tmp/ +/log/ /vendor/ /gemfiles/vendor/ *.gemfile.lock diff --git a/.rubocop.yml b/.rubocop.yml index cd81854..512dd6f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -12,7 +12,7 @@ AllCops: NewCops: enable SuggestExtensions: false DisplayCopNames: true - TargetRubyVersion: 2.5 + TargetRubyVersion: 2.7 TargetRailsVersion: 5.2 Exclude: - bin/**/* diff --git a/CHANGELOG.md b/CHANGELOG.md index 6319497..dbcad89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ ### next -* Moved the development dependencies from the gemspec to the Gemfile (#6) * Upgraded to PostgreSQL 15.2 and Redis 7.0 (#5) +* Moved the development dependencies from the gemspec to the Gemfile (#6) +* Dropped support for Ruby <2.7 (#7) ### 1.1.0 diff --git a/Dockerfile b/Dockerfile index def923e..13ccce4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -FROM hausgold/ruby:2.5 +FROM hausgold/ruby:2.7 MAINTAINER Hermann Mayer # 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 && \ @@ -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 && \ diff --git a/Makefile b/Makefile index 5f94152..fe106b9 100644 --- a/Makefile +++ b/Makefile @@ -120,7 +120,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 diff --git a/alarmable.gemspec b/alarmable.gemspec index 508cb11..5babc31 100644 --- a/alarmable.gemspec +++ b/alarmable.gemspec @@ -34,7 +34,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_dependency 'activejob', '>= 5.2' spec.add_dependency 'activejob-cancel', '~> 0.3' diff --git a/config/docker/.bashrc b/config/docker/.bashrc index 6884dc6..4942fcf 100644 --- a/config/docker/.bashrc +++ b/config/docker/.bashrc @@ -16,7 +16,9 @@ sudo sed -i 's/autostart=.*/autostart=false/g' /etc/supervisor/conf.d/* sudo supervisord >/dev/null 2>&1 & # Wait for supervisord -while ! supervisorctl status >/dev/null 2>&1; do sleep 1; done +while ! (sudo supervisorctl status | grep avahi) >/dev/null 2>&1; do + sleep 1 +done # Boot the mDNS stack echo '# Start the mDNS stack'