Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@4c56a21280b36d862b5fc31348f463d60bdc55d5 # ruby/setup-ruby@v1 see https://github.com/ruby/setup-ruby/tree/v1
with:
ruby-version: 3.0
ruby-version: 4.0
- name: Install dependencies
run: bundle install
- name: Run RuboCop against BASE..HEAD changes
run: bundle exec rake rubocop:diff origin/${GITHUB_BASE_REF#*/}

23 changes: 4 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,20 @@ jobs:
fail-fast: false
matrix:
ruby-version:
- '3.0'
- '3.1'
- '3.2'
- '3.3'
- '3.4'
- '4.0'
gemfile:
- gemfiles/Gemfile.rails61
- gemfiles/Gemfile.rails70
- gemfiles/Gemfile.rails71
- gemfiles/Gemfile.rails72
- gemfiles/Gemfile.rails80
- gemfiles/Gemfile.rails81
exclude:
# rails 6.1 requires ruby < 3.4
- ruby-version: '3.4'
gemfile: 'gemfiles/Gemfile.rails61'
# rails 7.0 requires ruby >= 2.7, < 3.4
# rails 8.1 requires ruby >= 3.2
# https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html
- ruby-version: '3.4'
gemfile: 'gemfiles/Gemfile.rails70'
# rails 7.2 requires ruby >= 3.1
# https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html
- ruby-version: '3.0'
gemfile: 'gemfiles/Gemfile.rails72'
# rails 8.0 requires ruby >= 3.2
# https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html
- ruby-version: '3.0'
gemfile: 'gemfiles/Gemfile.rails80'
- ruby-version: '3.1'
gemfile: 'gemfiles/Gemfile.rails80'
gemfile: 'gemfiles/Gemfile.rails81'

name: Ruby ${{ matrix.ruby-version }} / Bundle ${{ matrix.gemfile }}

Expand Down
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## [Unreleased]
* no unreleased changes *
### Fixed
* Support Rails 8.1, Ruby 4.0

## 5.0.4 / 2025-10-22
### Fixed
Expand Down
12 changes: 0 additions & 12 deletions gemfiles/Gemfile.rails61

This file was deleted.

12 changes: 0 additions & 12 deletions gemfiles/Gemfile.rails70

This file was deleted.

5 changes: 5 additions & 0 deletions gemfiles/Gemfile.rails81
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source 'https://rubygems.org'

gemspec path: '..'

gem 'rails', '~> 8.1.0'
26 changes: 4 additions & 22 deletions ndr_ui.gemspec
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
$LOAD_PATH.push File.expand_path('lib', __dir__)
require 'ndr_ui/version'

unless Gem::Version.new(Gem::VERSION) >= Gem::Version.new('3.0.2')
# See https://github.com/rubygems/rubygems/pull/2516 for details
raise 'Please update RubyGems to at least 3.0.2 - lower versions build a broken ndr_ui.gem!'
end

# We list development dependencies for all Rails versions here.
# Rails version-specific dependencies can go in the relevant Gemfile.
# rubocop:disable Gemspec/DevelopmentDependencies
Expand All @@ -21,14 +16,14 @@ Gem::Specification.new do |spec|
spec.license = 'MIT'

spec.files = Dir['{app,config,lib,vendor}/**/*', 'CHANGELOG.md', 'CODE_OF_CONDUCT.md',
'LICENSE.txt', 'Rakefile', 'README.md'] - ['.travis.yml']
'LICENSE.txt', 'Rakefile', 'README.md']

spec.required_ruby_version = '>= 3.0.0'
spec.required_ruby_version = '>= 3.2.0'

spec.add_dependency 'bootstrap', '~> 5.3.3'
spec.add_dependency 'dartsass-sprockets'
spec.add_dependency 'jquery-rails', '~> 4.6'
spec.add_dependency 'rails', '>= 6.1', '< 8.1'
spec.add_dependency 'rails', '>= 7.1', '< 8.2'
spec.add_dependency 'sprockets', '>= 4.0'
spec.add_dependency 'sprockets-rails', '>= 3.0.0'

Expand All @@ -37,21 +32,8 @@ Gem::Specification.new do |spec|
# cf. gemfiles/Gemfile.rails70
spec.add_development_dependency 'sqlite3'

# Workaround build issue on GitHub Actions with ruby <= 3.1 when installing sass-embedded
# gem version 1.81.0: NoMethodError: undefined method `parse' for #<Psych::Parser...>
# https://bugs.ruby-lang.org/issues/19371
spec.add_development_dependency 'psych', '< 5'

# Workaround build issue on GitHub Actions with ruby <= 3.1 when installing sass-embedded
# Versions 1.77.0 and above require ruby >= 3.2 for packaged x86_64-linux binaries
# but say they're compatible with ruby 3.1.
# 1.76.0 has a bug that was fixed in 1.77.1, which we can't use yet.
# https://github.com/sass/dart-sass/issues/2239
spec.add_development_dependency 'sass-embedded', '~> 1.75.0' if RUBY_VERSION.start_with?('3.1') # rubocop:disable Gemspec/RubyVersionGlobalsUsage

spec.add_development_dependency 'mocha', '~> 2.0'
spec.add_development_dependency 'mocha', '~> 3.0'
spec.add_development_dependency 'ndr_dev_support', '>= 6.0'
spec.add_development_dependency 'net-smtp'
spec.add_development_dependency 'pry'
spec.add_development_dependency 'puma'
spec.add_development_dependency 'rake'
Expand Down
10 changes: 5 additions & 5 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

# Load fixtures from the engine
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
ActiveSupport::TestCase.fixture_path = File.expand_path('../fixtures', __FILE__)
ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
ActiveSupport::TestCase.fixtures :all
end
fixtures_dir = File.expand_path('fixtures', __dir__)
ActiveSupport::TestCase.fixture_paths << fixtures_dir # Rails >= 7.1
ActionDispatch::IntegrationTest.fixture_paths << fixtures_dir
ActiveSupport::TestCase.file_fixture_path = "#{fixtures_dir}/files"
ActiveSupport::TestCase.fixtures :all

# Include all capybara + poltergeist config
ENV['INTEGRATION_DRIVER'] ||= 'chrome_headless'
Expand Down