bundler/lib/bundler/vendor/thor/lib/thor/rake_compat.rb in rubygems-update-3.4.21 vs bundler/lib/bundler/vendor/thor/lib/thor/rake_compat.rb in rubygems-update-3.4.22
- old
+ new
@@ -39,11 +39,11 @@
alias rake_namespace namespace
def task(*)
task = super
- if klass = Bundler::Thor::RakeCompat.rake_classes.last # rubocop:disable AssignmentInCondition
+ if klass = Bundler::Thor::RakeCompat.rake_classes.last # rubocop:disable Lint/AssignmentInCondition
non_namespaced_name = task.name.split(":").last
description = non_namespaced_name
description << task.arg_names.map { |n| n.to_s.upcase }.join(" ")
description.strip!
@@ -57,10 +57,10 @@
task
end
def namespace(name)
- if klass = Bundler::Thor::RakeCompat.rake_classes.last # rubocop:disable AssignmentInCondition
+ if klass = Bundler::Thor::RakeCompat.rake_classes.last # rubocop:disable Lint/AssignmentInCondition
const_name = Bundler::Thor::Util.camel_case(name.to_s).to_sym
klass.const_set(const_name, Class.new(Bundler::Thor))
new_klass = klass.const_get(const_name)
Bundler::Thor::RakeCompat.rake_classes << new_klass
end