Compare commits

..

2 Commits

Author SHA1 Message Date
邱博亞 ae1fa38314 update Gemfile 2024-11-07 22:16:38 +08:00
邱博亞 f7638aa214 fix load engine error 2024-11-07 22:12:38 +08:00
3 changed files with 14 additions and 3 deletions

View File

@ -105,6 +105,10 @@ module Announcement
puts ['there_was_no_show_option_method',e] puts ['there_was_no_show_option_method',e]
end end
if File.basename($0) != 'rake' if File.basename($0) != 'rake'
gem_root = Announcement::Engine.root
require File.join(gem_root, 'app/models/bulletin_feed')
require File.join(gem_root, 'app/models/bulletin_feed_cache')
require File.join(gem_root, 'app/models/anns_cache')
begin begin
avoid_page_cache AnnsCache avoid_page_cache AnnsCache
avoid_page_cache BulletinFeedCache avoid_page_cache BulletinFeedCache

View File

@ -7,10 +7,9 @@ module Announcement
require File.join(gem_root, 'app/models/bulletin') require File.join(gem_root, 'app/models/bulletin')
require File.join(gem_root, 'app/models/bulletin_feed') require File.join(gem_root, 'app/models/bulletin_feed')
require File.join(gem_root, 'app/models/bulletin_feed_cache') require File.join(gem_root, 'app/models/bulletin_feed_cache')
require File.join(gem_root, 'app/models/anns_cache')
require File.join(Announcement::Engine.root, 'app/models/anns_cache') setting = AnnouncementSetting.first || AnnouncementSetting.create
setting = AnnouncementSetting.first
if !setting.migrate_flag.include?("v1") if !setting.migrate_flag.include?("v1")
Bulletin.all.pluck(:id, :title).each do |id, title_translations| Bulletin.all.pluck(:id, :title).each do |id, title_translations|

View File

@ -211,13 +211,21 @@ else
gem 'rss' gem 'rss'
#parser #parser
if RUBY_VERSION.to_f >= 3.0 if RUBY_VERSION.to_f >= 3.0
if RUBY_VERSION.to_f >= 3.2
gem 'multi_xml'
else
gem 'multi_xml', '0.6.0'
end
gem 'public_suffix' gem 'public_suffix'
gem 'nokogiri', '~> 1.16', '>= 1.16.2' gem 'nokogiri', '~> 1.16', '>= 1.16.2'
gem 'json' gem 'json'
gem 'set'
else else
gem 'multi_xml', '0.6.0'
gem 'public_suffix', '5.0.5' gem 'public_suffix', '5.0.5'
gem 'nokogiri', '~> 1.8.5' gem 'nokogiri', '~> 1.8.5'
gem 'json', '2.6.1' gem 'json', '2.6.1'
gem 'set', '1.0.4'
end end
gem 'actionpack-page_caching' gem 'actionpack-page_caching'