diff --git a/CHANGELOG.md b/CHANGELOG.md index c4e35d4..f0668f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## [Unreleased] ### Fixed * Support Ruby 3.4, Rails 8.0 +* Fix ruby 3.4 frozen string literal warnings ## 2.4.2 / 2025-03-23 * fix link with icon button style diff --git a/app/helpers/ndr_error/errors_helper.rb b/app/helpers/ndr_error/errors_helper.rb index 79ded8a..aad9433 100644 --- a/app/helpers/ndr_error/errors_helper.rb +++ b/app/helpers/ndr_error/errors_helper.rb @@ -11,7 +11,7 @@ def highlighted_trace_for(error) error.backtrace.map do |line| css_classes = 'trace-item' - css_classes << ' stack-only' unless highlighting.include?(line) + css_classes += ' stack-only' unless highlighting.include?(line) content_tag(:span, line, class: css_classes) end @@ -59,7 +59,7 @@ def downstream_fingerprint_link(print) def ticket_link_for(fingerprint, small = false) # rubocop:disable Style/OptionalBooleanParameter text = bootstrap_icon_tag('asterisk', :bi) + ' View ticket' # rubocop:disable Style/StringConcatenation css = 'btn btn-outline-secondary' - css << ' btn-xs' if small + css += ' btn-xs' if small url = fingerprint.ticket_url link_to(text, /^http/i =~ url ? url : "http://#{url}", class: css) @@ -87,7 +87,7 @@ def purge_button_for(fingerprint) def previous_button_for(error) css = 'btn btn-outline-secondary' - css << ' disabled' if error.nil? + css += ' disabled' if error.nil? text = bootstrap_icon_tag('chevron-left', :bi) path = error.nil? ? '#' : error_fingerprint_path(error.error_fingerprint, log_id: error) @@ -96,7 +96,7 @@ def previous_button_for(error) def next_button_for(error) css = 'btn btn-outline-secondary' - css << ' disabled' if error.nil? + css += ' disabled' if error.nil? text = bootstrap_icon_tag('chevron-right', :bi) path = error.nil? ? '#' : error_fingerprint_path(error.error_fingerprint, log_id: error) diff --git a/ndr_error.gemspec b/ndr_error.gemspec index ecc62c2..3eb4556 100644 --- a/ndr_error.gemspec +++ b/ndr_error.gemspec @@ -45,6 +45,13 @@ Gem::Specification.new do |s| # https://bugs.ruby-lang.org/issues/19371 s.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 + s.add_development_dependency 'sass-embedded', '~> 1.75.0' if RUBY_VERSION.start_with?('3.1') # rubocop:disable Gemspec/RubyVersionGlobalsUsage + s.add_development_dependency 'mocha' s.add_development_dependency 'test-unit', '~> 3.0'