Skip to content

Commit d460b49

Browse files
chore: deprecate cpl
1 parent 9ccea97 commit d460b49

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

cpl.gemspec

+3
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,7 @@ Gem::Specification.new do |spec|
3838
spec.executables = ["cpl"]
3939

4040
spec.metadata["rubygems_mfa_required"] = "true"
41+
42+
spec.post_install_message = "DEPRECATED: The `cpl` gem has been renamed to `cpf` and will no longer be supported. " \
43+
"Please switch to 'cpf' as soon as possible."
4144
end

lib/cpl.rb

+10
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,23 @@ class Cli < Thor # rubocop:disable Metrics/ClassLength
6060
def self.start(*args)
6161
ENV["CPLN_SKIP_UPDATE_CHECK"] = "true"
6262

63+
warn_deprecated_gem
6364
check_cpln_version
6465
check_cpl_version
6566
fix_help_option
6667

6768
super(*args)
6869
end
6970

71+
def self.warn_deprecated_gem
72+
return if @warned_deprecated_gem
73+
74+
@warned_deprecated_gem = true
75+
76+
::Shell.warn_deprecated("This gem has been renamed to 'cpf' and will no longer be supported. " \
77+
"Please switch to 'cpf' as soon as possible.")
78+
end
79+
7080
def self.check_cpln_version # rubocop:disable Metrics/MethodLength
7181
return if @checked_cpln_version
7282

0 commit comments

Comments
 (0)