Sha256: e170187c760d7f7a7d9884a0acabe9b5407797057e5e600ebeba3ff9f86508ed

Contents?: true

Size: 715 Bytes

Versions: 13

Compression:

Stored size: 715 Bytes

Contents

require "thor"
require "apple_system_status"

module AppleSystemStatus
  class CLI < Thor
    desc "fetch", "Fetch apple system status"
    option :country, desc: "country code. (e.g. jp, ca, fr)", default: "us"
    option :title,   desc: "If specified, narrow the service title"
    option :format,  desc: "output format. (e.g. plain, json)", default: "plain"
    def fetch
      response = AppleSystemStatus::Crawler.perform(
        country: options[:country],
        title:   options[:title],
      )
      puts AppleSystemStatus.format_response(response, options[:format])
    end

    desc "version", "Show apple_system_status version"
    def version
      puts AppleSystemStatus::VERSION
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
apple_system_status-4.0.0 lib/apple_system_status/cli.rb
apple_system_status-3.0.1 lib/apple_system_status/cli.rb
apple_system_status-3.0.0 lib/apple_system_status/cli.rb
apple_system_status-2.0.0 lib/apple_system_status/cli.rb
apple_system_status-1.0.4 lib/apple_system_status/cli.rb
apple_system_status-1.0.3 lib/apple_system_status/cli.rb
apple_system_status-1.0.2 lib/apple_system_status/cli.rb
apple_system_status-1.0.1 lib/apple_system_status/cli.rb
apple_system_status-1.0.0 lib/apple_system_status/cli.rb
apple_system_status-0.3.2 lib/apple_system_status/cli.rb
apple_system_status-0.3.1 lib/apple_system_status/cli.rb
apple_system_status-0.3.0 lib/apple_system_status/cli.rb
apple_system_status-0.2.0 lib/apple_system_status/cli.rb