Skip to content

Commit

Permalink
WIP: try to fix ci for ruby under 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
seanaery committed Nov 7, 2024
1 parent 28e45fb commit 406069b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/generators/trln_argon/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,14 @@ def update_assets_manifest
say_status('info', '============================', :magenta)
say_status('info', 'Updating the assets manifest', :magenta)
say_status('info', '============================', :magenta)

prepend_to_file 'app/assets/config/manifest.js', "//= link trln_argon_manifest.js\n"
prepend_to_file 'app/assets/config/manifest.js', "//= link blacklight/manifest.js\n"

return unless Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3.1')

# return unless Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3.1')
return if IO.read('app/assets/javascripts/application.js').include?('trln_argon')
append_to_file 'app/assets/config/manifest.js', "//= link application.js\n"
end
end

def install_stylesheet
copy_file 'trln_argon.scss', 'app/assets/stylesheets/trln_argon.scss'
Expand Down
2 changes: 2 additions & 0 deletions trln_argon.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,15 @@ Gem::Specification.new do |s|

s.add_dependency 'dartsass-sprockets', '< 3.1.0'
s.add_dependency 'sass-embedded', '<= 1.69.5'
s.add_dependency 'uri', '< 1.0'
s.add_dependency 'dartsass-ruby', '>= 3.0.2'

# Ruby 3.1
# =================
elsif Gem::Requirement.new('< 3.2').satisfied_by?(Gem::Version.new(RUBY_VERSION))
s.add_dependency 'dartsass-sprockets'
s.add_dependency 'sass-embedded', '<= 1.70'
s.add_dependency 'uri', '< 1.0'

# Ruby 3.2+
# =================
Expand Down

0 comments on commit 406069b

Please sign in to comment.