Skip to content

Commit

Permalink
Dropped support for Ruby <2.7. (#6)
Browse files Browse the repository at this point in the history
Signed-off-by: Hermann Mayer <hermann.mayer92@gmail.com>
  • Loading branch information
Jack12816 authored Jul 8, 2024
1 parent 72eacdf commit 638c5d1
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 18 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
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ['2.5', '2.7']
rails: ['5.2']
ruby: ['2.7']
rails: ['5.2', '6.1']
env:
BUNDLE_GEMFILE: 'gemfiles/rails_${{ matrix.rails }}.gemfile'
steps:
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/pkg/
/spec/reports/
/tmp/
/log/
/spec/dummy/tmp
/spec/dummy/log
/vendor/
Expand Down
2 changes: 1 addition & 1 deletion .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
4 changes: 4 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
appraise 'rails-5.2' do
gem 'railties', '~> 5.2.0'
end

appraise 'rails-6.1' do
gem 'railties', '~> 6.1.0'
end
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
### next

* Moved the development dependencies from the gemspec to the Gemfile (#5)
* Dropped support for Ruby <2.7 (#6)

### 3.5.0

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 <hermann.mayer@hausgold.de>

# 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
4 changes: 3 additions & 1 deletion config/docker/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions conversejs.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,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 'railties', '>= 5.2'
spec.add_runtime_dependency 'railties', '>= 5.2', '< 7.0'
end
21 changes: 21 additions & 0 deletions gemfiles/rails_6.1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal", "~> 2.4"
gem "bundler", "~> 2.3"
gem "countless", "~> 1.1"
gem "guard-rspec", "~> 4.7"
gem "rails", ">= 5.2"
gem "rake", "~> 13.0"
gem "rspec", "~> 3.12"
gem "rspec-rails", "~> 5.1"
gem "rubocop", "~> 1.28"
gem "rubocop-rails", "~> 2.14"
gem "rubocop-rspec", "~> 2.10"
gem "simplecov", ">= 0.22"
gem "yard", ">= 0.9.28"
gem "yard-activesupport-concern", ">= 0.0.1"
gem "railties", "~> 6.1.0"

gemspec path: "../"
2 changes: 1 addition & 1 deletion spec/conversejs_spec.rb → spec/conversejs/rails_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

it 'converse.js javascript file is in the expected version' do
get '/assets/converse.js'
assert_match(/Version: 3\.3\.4/, response.body)
expect(response.body).to match(/Version: 3\.3\.4/)
end
end
end
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

# Load fixtures from the engine
if ActiveSupport::TestCase.method_defined?(:fixture_path=)
ActiveSupport::TestCase.fixture_path = \
ActiveSupport::TestCase.fixture_path =
File.expand_path('fixtures', __dir__)
end

Expand Down

0 comments on commit 638c5d1

Please sign in to comment.