Skip to content
代码片段 群组 项目
提交 d311427b 编辑于 作者: Gabriel Mazetto's avatar Gabriel Mazetto
浏览文件

Extract default commands settings

上级 12505b9d
No related branches found
No related tags found
1 合并请求!2419Fix TanukiBot spec relying on outdated code
# frozen_string_literal: true
module Gitlab
module Backup
module Cli
module Commands
autoload :Command, 'gitlab/backup/cli/commands/command'
end
end
end
end
# frozen_string_literal: true
module Gitlab
module Backup
module Cli
module Commands
class Command < Thor
def self.exit_on_failure? = true
# Define the command basename instead of relying on $PROGRAM_NAME
# This ensures the output is the same even inside RSpec
def self.basename = 'gitlab-backup-cli'
end
end
end
end
end
......@@ -9,18 +9,14 @@ module Cli
#
# This supersedes the previous backup rake files and will be
# the default interface to handle backups
class Runner < Thor
def self.exit_on_failure?
true
end
class Runner < Commands::Command
package_name 'GitLab Backup CLI'
map %w[--version -v] => :version
desc 'version', 'Display the version information'
def version
puts "GitLab Backup CLI (#{VERSION})" # rubocop:disable Rails/Output -- CLI output
end
end
end
end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册