Skip to content

Commit

Permalink
Revert "misc: Update rails to v7.2 (#2894)"
Browse files Browse the repository at this point in the history
This reverts commit 779bf30.
  • Loading branch information
rsempe authored Feb 24, 2025
1 parent 779bf30 commit 6c7309b
Show file tree
Hide file tree
Showing 14 changed files with 125 additions and 121 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ gem "bootsnap", require: false
gem "clockwork", require: false
gem "parallel"
gem "puma", "~> 6.5"
gem "rails", "~> 7.2"
gem "rails", "~> 7.1.5.1"
gem "redis"
gem "sidekiq"
gem "sidekiq-throttled", "1.4.0" # '1.5.0' was losing some jobs
Expand All @@ -34,10 +34,10 @@ gem "discard", "~> 1.2"
gem "kaminari-activerecord"
gem "paper_trail"
gem "pg"
gem "strong_migrations"
gem "ransack"
gem "scenic"
gem "with_advisory_lock"
gem "strong_migrations"

# Currencies, Countries, Timezones...
gem "bigdecimal"
Expand Down
150 changes: 78 additions & 72 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -38,46 +38,51 @@ GEM
specs:
aasm (5.5.0)
concurrent-ruby (~> 1.0)
actioncable (7.2.2)
actionpack (= 7.2.2)
activesupport (= 7.2.2)
actioncable (7.1.5.1)
actionpack (= 7.1.5.1)
activesupport (= 7.1.5.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.2.2)
actionpack (= 7.2.2)
activejob (= 7.2.2)
activerecord (= 7.2.2)
activestorage (= 7.2.2)
activesupport (= 7.2.2)
mail (>= 2.8.0)
actionmailer (7.2.2)
actionpack (= 7.2.2)
actionview (= 7.2.2)
activejob (= 7.2.2)
activesupport (= 7.2.2)
mail (>= 2.8.0)
actionmailbox (7.1.5.1)
actionpack (= 7.1.5.1)
activejob (= 7.1.5.1)
activerecord (= 7.1.5.1)
activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.5.1)
actionpack (= 7.1.5.1)
actionview (= 7.1.5.1)
activejob (= 7.1.5.1)
activesupport (= 7.1.5.1)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
actionpack (7.2.2)
actionview (= 7.2.2)
activesupport (= 7.2.2)
actionpack (7.1.5.1)
actionview (= 7.1.5.1)
activesupport (= 7.1.5.1)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4, < 3.2)
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
actiontext (7.2.2)
actionpack (= 7.2.2)
activerecord (= 7.2.2)
activestorage (= 7.2.2)
activesupport (= 7.2.2)
actiontext (7.1.5.1)
actionpack (= 7.1.5.1)
activerecord (= 7.1.5.1)
activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.2.2)
activesupport (= 7.2.2)
actionview (7.1.5.1)
activesupport (= 7.1.5.1)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
Expand All @@ -88,40 +93,40 @@ GEM
activestorage (>= 6.1.4)
activesupport (>= 6.1.4)
marcel (>= 1.0.3)
activejob (7.2.2)
activesupport (= 7.2.2)
activejob (7.1.5.1)
activesupport (= 7.1.5.1)
globalid (>= 0.3.6)
activejob-traceable (0.4.2)
activejob
activesupport
activejob-uniqueness (0.4.0)
activejob (>= 4.2, < 8.1)
redlock (>= 2.0, < 3)
activemodel (7.2.2)
activesupport (= 7.2.2)
activerecord (7.2.2)
activemodel (= 7.2.2)
activesupport (= 7.2.2)
activemodel (7.1.5.1)
activesupport (= 7.1.5.1)
activerecord (7.1.5.1)
activemodel (= 7.1.5.1)
activesupport (= 7.1.5.1)
timeout (>= 0.4.0)
activestorage (7.2.2)
actionpack (= 7.2.2)
activejob (= 7.2.2)
activerecord (= 7.2.2)
activesupport (= 7.2.2)
activestorage (7.1.5.1)
actionpack (= 7.1.5.1)
activejob (= 7.1.5.1)
activerecord (= 7.1.5.1)
activesupport (= 7.1.5.1)
marcel (~> 1.0)
activesupport (7.2.2)
activesupport (7.1.5.1)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
tzinfo (~> 2.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
adyen-ruby-api-library (7.3.1)
Expand Down Expand Up @@ -637,7 +642,7 @@ GEM
opentelemetry-semantic_conventions (1.10.1)
opentelemetry-api (~> 1.0)
os (1.1.4)
paper_trail (16.0.0)
paper_trail (15.1.0)
activerecord (>= 6.1)
request_store (~> 1.4)
parallel (1.26.3)
Expand All @@ -649,35 +654,36 @@ GEM
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
psych (5.2.0)
psych (5.1.2)
stringio
public_suffix (5.1.1)
puma (6.5.0)
nio4r (~> 2.0)
racc (1.8.1)
rack (3.1.8)
rack (2.2.11)
rack-cors (1.1.1)
rack (>= 2.0.0)
rack-session (2.0.0)
rack (>= 3.0.0)
rack-session (1.0.2)
rack (< 3)
rack-test (2.1.0)
rack (>= 1.3)
rackup (2.2.1)
rack (>= 3)
rails (7.2.2)
actioncable (= 7.2.2)
actionmailbox (= 7.2.2)
actionmailer (= 7.2.2)
actionpack (= 7.2.2)
actiontext (= 7.2.2)
actionview (= 7.2.2)
activejob (= 7.2.2)
activemodel (= 7.2.2)
activerecord (= 7.2.2)
activestorage (= 7.2.2)
activesupport (= 7.2.2)
rackup (1.0.1)
rack (< 3)
webrick
rails (7.1.5.1)
actioncable (= 7.1.5.1)
actionmailbox (= 7.1.5.1)
actionmailer (= 7.1.5.1)
actionpack (= 7.1.5.1)
actiontext (= 7.1.5.1)
actionview (= 7.1.5.1)
activejob (= 7.1.5.1)
activemodel (= 7.1.5.1)
activerecord (= 7.1.5.1)
activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
bundler (>= 1.15.0)
railties (= 7.2.2)
railties (= 7.1.5.1)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
Expand All @@ -688,10 +694,10 @@ GEM
rails-i18n (7.0.10)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
railties (7.2.2)
actionpack (= 7.2.2)
activesupport (= 7.2.2)
irb (~> 1.13)
railties (7.1.5.1)
actionpack (= 7.1.5.1)
activesupport (= 7.1.5.1)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
Expand All @@ -700,7 +706,7 @@ GEM
rake (13.2.1)
rake-compiler (1.2.9)
rake
ransack (4.2.1)
ransack (4.1.1)
activerecord (>= 6.1.5)
activesupport (>= 6.1.5)
i18n
Expand All @@ -710,7 +716,7 @@ GEM
rb_sys (0.9.108)
rbs (3.6.1)
logger
rdoc (6.8.1)
rdoc (6.7.0)
psych (>= 4.0.0)
redis (5.3.0)
redis-client (>= 0.22.0)
Expand Down Expand Up @@ -896,7 +902,6 @@ GEM
unaccent (0.4.0)
unicode-display_width (2.6.0)
uniform_notifier (1.16.0)
useragent (0.16.10)
valvat (2.0.1)
rexml (>= 3.3.6, < 4.0.0)
version_gem (1.1.4)
Expand All @@ -908,14 +913,15 @@ GEM
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webrick (1.8.2)
websocket-driver (0.7.7)
base64
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
with_advisory_lock (5.1.0)
activerecord (>= 6.1)
zeitwerk (>= 2.6)
zeitwerk (2.7.1)
zeitwerk (2.6.18)

PLATFORMS
aarch64-linux
Expand Down Expand Up @@ -986,7 +992,7 @@ DEPENDENCIES
pg
puma (~> 6.5)
rack-cors
rails (~> 7.2)
rails (~> 7.1.5.1)
ransack
redis
rspec-graphql_matchers
Expand Down
2 changes: 0 additions & 2 deletions app/models/charge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ class Charge < ApplicationRecord
REGROUPING_PAID_FEES_OPTIONS = %i[invoice].freeze

enum :charge_model, CHARGE_MODELS

attribute :regroup_paid_fees, :integer
enum :regroup_paid_fees, REGROUPING_PAID_FEES_OPTIONS

validate :validate_amount, if: -> { standard? }
Expand Down
2 changes: 1 addition & 1 deletion bin/setup
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env ruby
require "fileutils"

# path to your application root.
APP_ROOT = File.expand_path("..", __dir__)
APP_NAME = "lago-api"

def system!(*args)
system(*args, exception: true)
Expand Down
5 changes: 1 addition & 4 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@

module LagoApi
class Application < Rails::Application
config.load_defaults 7.2

# Disable YJIT as we are not ready yet
config.yjit = false
config.load_defaults(7.1)

# TODO: Should be turned to false
config.add_autoload_paths_to_load_path = true
Expand Down
11 changes: 3 additions & 8 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@
config.cache_store = :redis_cache_store, {url: ENV["LAGO_REDIS_CACHE_URL"], db: 3}

if Rails.root.join("tmp/caching-dev.txt").exist?
config.cache_store = :memory_store
config.public_file_server.headers = {
"Cache-Control" => "public, max-age=#{2.days.to_i}"
}
else
config.action_controller.perform_caching = false
config.cache_store = :null_store
end

config.active_storage.service = if ENV["LAGO_USE_AWS_S3"].present? && ENV["LAGO_USE_AWS_S3"] == "true"
Expand All @@ -49,21 +47,18 @@
config.active_support.disallowed_deprecation_warnings = []
config.active_record.migration_error = :page_load
config.active_record.verbose_query_logs = true
config.active_job.verbose_enqueue_logs = true

config.logger = ActiveSupport::Logger.new($stdout)
.tap { |logger| logger.formatter = ::Logger::Formatter.new }
.then { |logger| ActiveSupport::TaggedLogging.new(logger) }
logger = ActiveSupport::Logger.new($stdout)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)

config.action_view.annotate_rendered_view_with_filenames = true
config.action_controller.raise_on_missing_callback_actions = true

config.hosts << "api.lago.dev"
config.hosts << "api"

config.license_url = "http://license:3000"

config.action_mailer.perform_caching = false
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
Expand Down
Loading

0 comments on commit 6c7309b

Please sign in to comment.