Skip to content

Commit

Permalink
Shim methods calls and print notice
Browse files Browse the repository at this point in the history
'NOTICE: The `config.on_new_version_available` option has been removed from the CableReady initializer. You can safetly remove this option from your initializer.'
  • Loading branch information
marcoroth committed Feb 14, 2023
1 parent c480b9d commit edf4bc8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 8 additions & 0 deletions lib/cable_ready/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ class Config
attr_accessor :on_failed_sanity_checks, :broadcast_job_queue, :precompile_assets
attr_writer :verifier_key

def on_new_version_available
warn "NOTICE: The `config.on_new_version_available` option has been removed from the CableReady initializer. You can safely remove this option from your initializer."
end

def on_new_version_available=(_)
warn "NOTICE: The `config.on_new_version_available` option has been removed from the CableReady initializer. You can safely remove this option from your initializer."
end

def initialize
super
@operation_names = Set.new(default_operation_names)
Expand Down
3 changes: 1 addition & 2 deletions lib/cable_ready/sanity_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ def check!
return if called_by_generate_config?
return if called_by_rake?

instance = new
instance.check_new_version_available
new
end

private
Expand Down

0 comments on commit edf4bc8

Please sign in to comment.