Skip to content

Commit

Permalink
wip: Allow Rails 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdeyen committed Sep 8, 2024
1 parent dbed496 commit d433577
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ source "https://rubygems.org"

gemspec

rails_version = ENV.fetch("RAILS_VERSION", "7.2")
gem "rails", "~> #{rails_version}.0"
rails_version = ENV.fetch("RAILS_VERSION", "8.0")
gem "rails", github: "rails/rails", branch: "main"

if ENV["DB"].nil? || ENV["DB"] == "sqlite"
gem "sqlite3", "~> 1.7.0"
gem "sqlite3", "~> 2.0.0"
end
if ENV["DB"] == "mysql" || ENV["DB"] == "mariadb"
gem "mysql2", "~> 0.5.1"
Expand Down
4 changes: 2 additions & 2 deletions alchemy_cms.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |gem|
activesupport
railties
].each do |rails_gem|
gem.add_runtime_dependency rails_gem, [">= 7.0", "< 7.3"]
gem.add_runtime_dependency rails_gem, [">= 7.0", "< 8.1"]
end

gem.add_runtime_dependency "active_model_serializers", ["~> 0.10.14"]
Expand All @@ -42,7 +42,7 @@ Gem::Specification.new do |gem|
gem.add_runtime_dependency "dragonfly_svg", ["~> 0.0.4"]
gem.add_runtime_dependency "gutentag", ["~> 2.2", ">= 2.2.1"]
gem.add_runtime_dependency "handlebars_assets", ["~> 0.23"]
gem.add_runtime_dependency "importmap-rails", ["~> 1.2", ">= 1.2.1"]
gem.add_runtime_dependency "importmap-rails", ["~> 2.0"]
gem.add_runtime_dependency "jquery-rails", ["~> 4.0", ">= 4.0.4"]
gem.add_runtime_dependency "kaminari", ["~> 1.1"]
gem.add_runtime_dependency "originator", ["~> 3.1"]
Expand Down
6 changes: 5 additions & 1 deletion lib/generators/alchemy/install/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ def copy_yml_files
def install_assets
copy_file "all.js", app_vendor_assets_path.join("javascripts", "alchemy", "admin", "all.js")
copy_file "custom.css", app_assets_path.join("stylesheets/alchemy/admin/custom.css")
append_to_file Rails.root.join("app/assets/config/manifest.js"), "//= link alchemy/admin/custom.css\n"
if File.exist?(Rails.root.join("app/assets/config/manifest.js"))
append_to_file Rails.root.join("app/assets/config/manifest.js"), "//= link alchemy/admin/custom.css\n"
else
create_file Rails.root.join("app/assets/config/manifest.js"), "//= link alchemy/admin/custom.css\n"
end
end

def copy_demo_views
Expand Down

0 comments on commit d433577

Please sign in to comment.