bin/commands/auth.rb in slack-ruby-client-2.0.0 vs bin/commands/auth.rb in slack-ruby-client-2.1.0
- old
+ new
@@ -1,22 +1,28 @@
# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake
-desc 'Auth methods.'
-command 'auth' do |g|
- g.desc 'Revokes a token.'
- g.long_desc %( Revokes a token. )
- g.command 'revoke' do |c|
- c.flag 'test', desc: 'Setting this parameter to 1 triggers a testing mode where the specified token will not actually be revoked.'
- c.action do |_global_options, options, _args|
- puts JSON.dump($client.auth_revoke(options))
- end
- end
+module Slack
+ module Cli
+ class App
+ desc 'Auth methods.'
+ command 'auth' do |g|
+ g.desc 'Revokes a token.'
+ g.long_desc %( Revokes a token. )
+ g.command 'revoke' do |c|
+ c.flag 'test', desc: 'Setting this parameter to 1 triggers a testing mode where the specified token will not actually be revoked.'
+ c.action do |_global_options, options, _args|
+ puts JSON.dump(@client.auth_revoke(options))
+ end
+ end
- g.desc 'Checks authentication & identity.'
- g.long_desc %( Checks authentication & identity. )
- g.command 'test' do |c|
- c.action do |_global_options, options, _args|
- puts JSON.dump($client.auth_test(options))
+ g.desc 'Checks authentication & identity.'
+ g.long_desc %( Checks authentication & identity. )
+ g.command 'test' do |c|
+ c.action do |_global_options, options, _args|
+ puts JSON.dump(@client.auth_test(options))
+ end
+ end
+ end
end
end
end