Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ git_source(:github) do |repo_name|
"https://github.com/#{repo_name}.git"
end

gem 'rails', '~> 7.1.6'
gem "mutex_m", "~> 0.3.0"
gem "csv", "~> 3.3"
Comment on lines +9 to +10
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These gems were part of Ruby in previous versions but they won't be for ruby 3.4+. I'm adding them to the gemfile to remove a couple of warnings:

/home/jlledom/.asdf/installs/ruby/3.3.1/lib/ruby/gems/3.3.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32: warning: /home/jlledom/.asdf/installs/ruby/3.3.1/lib/ruby/3.3.0/mutex_m.rb was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add mutex_m to your Gemfile or gemspec.
/home/jlledom/.asdf/installs/ruby/3.3.1/lib/ruby/gems/3.3.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32: warning: /home/jlledom/.asdf/installs/ruby/3.3.1/lib/ruby/3.3.0/csv.rb was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add csv to your Gemfile or gemspec. Also contact author of license_finder-7.0.1 to add csv into its gemspec.


gem 'rails', '~> 7.2.3'
gem 'zeitwerk', '~> 2.6.18' # keep zeitwerk 2.6 until Ruby is 3.2 or higher
gem 'pg', '~> 1.6.2'

Expand Down
167 changes: 82 additions & 85 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,85 +9,79 @@ GEM
remote: https://rubygems.org/
specs:
3scale-api (1.4.0)
actioncable (7.1.6)
actionpack (= 7.1.6)
activesupport (= 7.1.6)
actioncable (7.2.3)
actionpack (= 7.2.3)
activesupport (= 7.2.3)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.6)
actionpack (= 7.1.6)
activejob (= 7.1.6)
activerecord (= 7.1.6)
activestorage (= 7.1.6)
activesupport (= 7.1.6)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.6)
actionpack (= 7.1.6)
actionview (= 7.1.6)
activejob (= 7.1.6)
activesupport (= 7.1.6)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
actionmailbox (7.2.3)
actionpack (= 7.2.3)
activejob (= 7.2.3)
activerecord (= 7.2.3)
activestorage (= 7.2.3)
activesupport (= 7.2.3)
mail (>= 2.8.0)
actionmailer (7.2.3)
actionpack (= 7.2.3)
actionview (= 7.2.3)
activejob (= 7.2.3)
activesupport (= 7.2.3)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
actionpack (7.1.6)
actionview (= 7.1.6)
activesupport (= 7.1.6)
actionpack (7.2.3)
actionview (= 7.2.3)
activesupport (= 7.2.3)
cgi
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack (>= 2.2.4, < 3.3)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.6)
actionpack (= 7.1.6)
activerecord (= 7.1.6)
activestorage (= 7.1.6)
activesupport (= 7.1.6)
useragent (~> 0.16)
actiontext (7.2.3)
actionpack (= 7.2.3)
activerecord (= 7.2.3)
activestorage (= 7.2.3)
activesupport (= 7.2.3)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.6)
activesupport (= 7.1.6)
actionview (7.2.3)
activesupport (= 7.2.3)
builder (~> 3.1)
cgi
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.6)
activesupport (= 7.1.6)
activejob (7.2.3)
activesupport (= 7.2.3)
globalid (>= 0.3.6)
activemodel (7.1.6)
activesupport (= 7.1.6)
activerecord (7.1.6)
activemodel (= 7.1.6)
activesupport (= 7.1.6)
activemodel (7.2.3)
activesupport (= 7.2.3)
activerecord (7.2.3)
activemodel (= 7.2.3)
activesupport (= 7.2.3)
timeout (>= 0.4.0)
activestorage (7.1.6)
actionpack (= 7.1.6)
activejob (= 7.1.6)
activerecord (= 7.1.6)
activesupport (= 7.1.6)
activestorage (7.2.3)
actionpack (= 7.2.3)
activejob (= 7.2.3)
activerecord (= 7.2.3)
activesupport (= 7.2.3)
marcel (~> 1.0)
activesupport (7.1.6)
activesupport (7.2.3)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
concurrent-ruby (~> 1.0, >= 1.3.1)
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)
tzinfo (~> 2.0, >= 2.0.5)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
ansi (1.5.0)
Expand All @@ -103,16 +97,17 @@ GEM
concurrent-ruby (~> 1.0)
builder (3.3.0)
byebug (12.0.0)
cgi (0.5.0)
cgi (0.5.1)
codecov (0.4.3)
simplecov (>= 0.15, < 0.22)
coderay (1.1.3)
concurrent-ruby (1.3.5)
connection_pool (2.5.4)
concurrent-ruby (1.3.6)
connection_pool (3.0.2)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some gems I updated switched to new major versions. From the top of my head they were:

  • minitest
  • connection_pool
  • rdoc
  • erb

For all of them, I looked for breaking changes and I found most of them released new majors because they raised their minimal ruby version to 3.2. I didn't see anything really breaking for us.

The only one I couldn't update was minitest, because the 6.x branch doesn't support rails < 8.1. This is the issue I hit: minitest/minitest#1059

So we are trapped in minitest 5.x until we upgrade Rails to 8.1

crack (0.4.5)
rexml
crass (1.0.6)
date (3.5.0)
csv (3.3.5)
date (3.5.1)
debug_inspector (1.2.0)
docile (1.3.5)
drb (2.2.3)
Expand Down Expand Up @@ -142,8 +137,7 @@ GEM
dry-inflector (~> 1.0)
dry-logic (~> 1.4)
zeitwerk (~> 2.6)
erb (4.0.4)
cgi (>= 0.3.3)
erb (6.0.1)
erubi (1.13.1)
excon (0.112.0)
faraday (1.3.0)
Expand All @@ -154,12 +148,12 @@ GEM
globalid (1.3.0)
activesupport (>= 6.1)
hashdiff (1.2.1)
i18n (1.14.7)
i18n (1.14.8)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
interception (0.5)
io-console (0.8.1)
irb (1.15.3)
io-console (0.8.2)
irb (1.16.0)
pp (>= 0.6.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
Expand Down Expand Up @@ -193,7 +187,7 @@ GEM
activesupport (>= 4)
railties (>= 4)
request_store (~> 1.0)
loofah (2.24.1)
loofah (2.25.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.9.0)
Expand Down Expand Up @@ -222,7 +216,7 @@ GEM
mustermann (2.0.2)
ruby2_keywords (~> 0.0.1)
mutex_m (0.3.0)
net-imap (0.5.12)
net-imap (0.6.2)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -232,7 +226,7 @@ GEM
net-smtp (0.5.1)
net-protocol
nio4r (2.7.5)
nokogiri (1.18.10)
nokogiri (1.19.0)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
oauth2 (1.4.7)
Expand Down Expand Up @@ -266,7 +260,7 @@ GEM
pry-stack_explorer (0.6.1)
binding_of_caller (~> 1.0)
pry (~> 0.13)
psych (5.2.6)
psych (5.3.1)
date
stringio
public_suffix (4.0.6)
Expand All @@ -287,40 +281,40 @@ GEM
rackup (1.0.1)
rack (< 3)
webrick
rails (7.1.6)
actioncable (= 7.1.6)
actionmailbox (= 7.1.6)
actionmailer (= 7.1.6)
actionpack (= 7.1.6)
actiontext (= 7.1.6)
actionview (= 7.1.6)
activejob (= 7.1.6)
activemodel (= 7.1.6)
activerecord (= 7.1.6)
activestorage (= 7.1.6)
activesupport (= 7.1.6)
rails (7.2.3)
actioncable (= 7.2.3)
actionmailbox (= 7.2.3)
actionmailer (= 7.2.3)
actionpack (= 7.2.3)
actiontext (= 7.2.3)
actionview (= 7.2.3)
activejob (= 7.2.3)
activemodel (= 7.2.3)
activerecord (= 7.2.3)
activestorage (= 7.2.3)
activesupport (= 7.2.3)
bundler (>= 1.15.0)
railties (= 7.1.6)
railties (= 7.2.3)
rails-dom-testing (2.3.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.2)
loofah (~> 2.21)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
railties (7.1.6)
actionpack (= 7.1.6)
activesupport (= 7.1.6)
railties (7.2.3)
actionpack (= 7.2.3)
activesupport (= 7.2.3)
cgi
irb
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
tsort (>= 0.2)
zeitwerk (~> 2.6)
rainbow (3.1.1)
rake (13.3.1)
rdoc (6.15.1)
rdoc (7.1.0)
erb
psych (>= 4.0.0)
tsort
Expand Down Expand Up @@ -374,25 +368,26 @@ GEM
rack (~> 2.2)
rack-protection (= 2.2.3)
tilt (~> 2.0)
stringio (3.1.8)
thor (1.4.0)
stringio (3.2.0)
thor (1.5.0)
tilt (2.0.11)
timeout (0.4.4)
timeout (0.6.0)
tomlrb (2.0.3)
tsort (0.2.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (3.2.0)
unicode-emoji (~> 4.1)
unicode-emoji (4.1.0)
useragent (0.16.11)
validate_url (1.0.15)
activemodel (>= 3.0.0)
public_suffix
webmock (3.11.2)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webrick (1.8.2)
webrick (1.9.2)
websocket-driver (0.8.0)
base64
websocket-extensions (>= 0.1.0)
Expand Down Expand Up @@ -426,13 +421,15 @@ DEPENDENCIES
bootsnap (>= 1.4.4)
bugsnag
codecov
csv (~> 3.3)
httpclient!
k8s-ruby
license_finder (~> 7.0.1)
lograge
message_bus
minitest-reporters
minitest-stub-const
mutex_m (~> 0.3.0)
oauth2
pg (~> 1.6.2)
prometheus-client (~> 2.1.0)
Expand All @@ -443,7 +440,7 @@ DEPENDENCIES
puma (~> 5.2)
que (~> 2.4.1)
que-web
rails (~> 7.1.6)
rails (~> 7.2.3)
responders (~> 3.0.1)
rubocop
rubocop-performance
Expand Down
2 changes: 1 addition & 1 deletion app/models/integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Integration < ApplicationRecord
belongs_to :model
has_many :integration_states, dependent: :destroy

enum state: %i[active disabled].index_with{ |status| status.to_s }
enum :state, %i[active disabled].index_with{ |status| status.to_s }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in rails: rails/rails@439298e


def self.tenant_or_model(tenant, model)
by_tenant = where(tenant: tenant, model_id: nil)
Expand Down
1 change: 1 addition & 0 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ require "fileutils"

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

def system!(*args)
system(*args, exception: true)
Expand Down
11 changes: 9 additions & 2 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
module Zync
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 7.1
config.load_defaults 7.2

# Please, add to the `ignore` list any other `lib` subdirectories that do
# not contain `.rb` files, or that should not be reloaded or eager loaded.
# Common ones are `templates`, `generators`, or `middleware`, for example.
# config.autoload_lib(ignore: %w(tasks puma generators prometheus que))
# config.autoload_lib(ignore: %w(assets tasks puma generators prometheus que))

# Que needs :sql because of advanced PostgreSQL features
config.active_record.schema_format = :sql
Expand All @@ -41,6 +41,13 @@ class Application < Rails::Application

config.active_job.queue_adapter = :que

# This rails setting changed several time for the last Rails version
# https://github.com/rails/rails/blob/6f39910d26eb590cb214a0fce5858fe0d7ddfff8/activejob/CHANGELOG.md?plain=1#L48-L58
#
# For Rails 7.2, set it to `:always`: https://github.com/que-rb/que/issues/430
# For Rails 8.0+, Remove it
config.active_job.enqueue_after_transaction_commit = :always

begin
que = config_for(:que)&.deep_symbolize_keys

Expand Down
Loading