Skip to content

Commit afd096e

Browse files
Deprecate cpl (#203)
1 parent e8552a3 commit afd096e

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

cpl.gemspec

+4
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,8 @@ 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 `cpflow` " \
43+
"and will no longer be supported. " \
44+
"Please switch to `shakaflow` as soon as possible."
4145
end

lib/cpl.rb

+11
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,24 @@ 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 `cpflow` " \
77+
"and will no longer be supported. " \
78+
"Please switch to `cpflow` as soon as possible.")
79+
end
80+
7081
def self.check_cpln_version # rubocop:disable Metrics/MethodLength
7182
return if @checked_cpln_version
7283

0 commit comments

Comments
 (0)