regenerate gems, pin sqlite3 (we can upgrade it after we upgrade rails), and fix some upgrade errors

This commit is contained in:
Andrew Brown 2025-05-01 10:59:17 -07:00
parent e27eb12ae4
commit fa2b53327c
7 changed files with 1553 additions and 1042 deletions

View File

@ -114,7 +114,7 @@ gem 'binding_of_caller' # see has_changelog.rb
group :test, :development do
gem 'pry'
gem 'sqlite3'
gem 'sqlite3', '~> 1.4'
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]

File diff suppressed because it is too large Load Diff

View File

@ -5,6 +5,11 @@ class CacheAttributeWordCountJob < ApplicationJob
attribute_id = args.shift
attribute = Attribute.find_by(id: attribute_id)
# If the attribute has been deleted since this job was enqueued, just bail
if attribute.nil?
return
end
# If we have a blank/null value, ezpz 0 words
if attribute.nil? || attribute.value.nil? || attribute.value.blank?
attribute.update_column(:word_count_cache, 0)

View File

@ -13,7 +13,7 @@ class PageCollection < ApplicationRecord
has_one_attached :header_image, dependent: :destroy
validates :header_image, attached: false,
content_type: {
in: ['image/png', 'image/jpg', 'image/jpeg', 'image/gif'],
in: ['image/png', 'image/jpeg', 'image/gif'],
message: 'must be a PNG, JPG, JPEG, or GIF'
},
dimension: {

View File

@ -97,7 +97,7 @@ class User < ApplicationRecord
has_one_attached :avatar
validates :avatar, attached: false,
content_type: {
in: ['image/png', 'image/jpg', 'image/jpeg', 'image/gif'],
in: ['image/png', 'image/jpeg', 'image/gif'],
message: 'must be a PNG, JPG, JPEG, or GIF'
},
dimension: {

View File

@ -7,6 +7,7 @@ require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)
require_relative "../config/boot"
require "bundler/setup"
require "webpacker"

View File

@ -1,4 +1,5 @@
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
require "logger" # Fix concurrent-ruby removing logger dependency which Rails itself does not have
require 'bundler/setup' # Set up gems listed in the Gemfile.
# require 'bootsnap/setup' # Speed up boot time by caching expensive operations.