Class: CronForGithub::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/cron_for_github/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/cron_for_github/cli.rb', line 5

def self.exit_on_failure?
  true
end

Instance Method Details

#clearObject



21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/cron_for_github/cli.rb', line 21

def clear
  setup_logger(options)

  params = {
    slug: options[:slug],
    namespace: options[:namespace]
  }
  Ping.new.clear(params)
rescue StandardError => e
  suggest_messages(options)
  raise e
end

#pingObject



40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/cron_for_github/cli.rb', line 40

def ping
  setup_logger(options)

  params = {
    slug: options[:slug],
    namespace: options[:namespace],
    base: options[:base]
  }
  Ping.new.ping(params)
rescue StandardError => e
  suggest_messages(options)
  raise e
end

#versionObject



12
13
14
# File 'lib/cron_for_github/cli.rb', line 12

def version
  puts "CronForGithub version #{::CronForGithub::VERSION}"
end