Skip to content

Commit

Permalink
squash
Browse files Browse the repository at this point in the history
  • Loading branch information
m-zielinski committed Sep 27, 2024
1 parent 81ae1f1 commit 7785a58
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ end
def migrate
# TODO: Figure out if there is any other possibility that can/should be
# passed here as the second argument for the migration context
if ActiveRecord.version > "7.1"
if ActiveRecord.version > '7.1'
ActiveRecord::MigrationContext.new('spec/dummy/db/migrate').migrate
else
ActiveRecord::MigrationContext.new('spec/dummy/db/migrate', ActiveRecord::SchemaMigration).migrate
Expand Down
3 changes: 2 additions & 1 deletion lib/apartment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
require 'forwardable'
require 'active_record'
require 'apartment/tenant'
require 'apartment/deprecation'

require_relative 'apartment/log_subscriber'
require_relative 'apartment/active_record/connection_handling'
Expand Down Expand Up @@ -47,7 +48,7 @@ def tenants_with_config
end

def tld_length=(_)
Apartment::Deprecation.warn('`config.tld_length` have no effect because it was removed in https://github.com/influitive/apartment/pull/309')
Apartment::DEPRECATOR.warn('`config.tld_length` have no effect because it was removed in https://github.com/influitive/apartment/pull/309')
end

def db_config_for(tenant)
Expand Down
6 changes: 1 addition & 5 deletions lib/apartment/deprecation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,5 @@
require 'active_support/deprecation'

module Apartment
module Deprecation
def self.warn(message)
ActiveSupport::Deprecation.warn message
end
end
DEPRECATOR = ActiveSupport::Deprecation.new(Apartment::VERSION, 'Apartment')
end
1 change: 1 addition & 0 deletions ros-apartment.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Gem::Specification.new do |s|
s.required_ruby_version = '>= 3.1', '<= 3.4'

s.add_dependency 'activerecord', '>= 6.1.0', '<= 8.1'
s.add_dependency 'activesupport', '>= 6.1.0'
s.add_dependency 'parallel', '< 2.0'
s.add_dependency 'public_suffix', '>= 2.0.5', '<= 6.0.1'
s.add_dependency 'rack', '>= 1.3.6', '< 4.0'
Expand Down

0 comments on commit 7785a58

Please sign in to comment.