AppleSystemStatus

Apple System Status scraping library

Build Status Code Climate Test Coverage Coverage Status Dependency Status

Requirements

Installation

Add this line to your application's Gemfile:

gem 'apple_system_status'

And then execute:

$ bundle

Or install it yourself as:

$ gem install apple_system_status

Usage (via. ruby)

crawler = AppleSystemStatus::Crawler.new

# English
pp crawler.perform

{:title=>"System Status as of 12:51 AM JST",
 :services=>
  [{:title=>"App Store",
    :description=>"No Issues: App Store",
    :status=>"allgood"},
   {:title=>"iCloud Account & Sign In",
    :description=>"No Issues: iCloud Account & Sign In",
    :status=>"allgood"},
   # ...
]}

# Japanese
pp crawler.perform("jp")

{:title=>"00:53 JST 時点のシステム状況",
 :services=>
  [{:title=>"App Store", :description=>"問題なし: App Store", :status=>"allgood"},
   {:title=>"iCloud ストレージアップグレード",
    :description=>"問題なし: iCloud ストレージアップグレード",
    :status=>"allgood"},
   {:title=>"iTunes Store",
    :description=>"問題なし: iTunes Store",
    :status=>"allgood"},
   # ...
]}

Usage (via. shell)

$ apple_system_status help
Commands:
  apple_system_status fetch           # Fetch apple system status
  apple_system_status help [COMMAND]  # Describe available commands or one specific command
  apple_system_status version         # Show apple_system_status version

$ apple_system_status help fetch
Usage:
  apple_system_status fetch

Options:
  [--country=COUNTRY]  # country code. (ex. jp, ca, fr)
                       # Default: us
  [--title=TITLE]      # If specified, narrow the service title
  [--format=FORMAT]    # output format. (ex. plain, json)
                       # Default: plain

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake rspec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment. Run bundle exec apple_system_status to use the gem in this directory, ignoring other installed copies of this gem.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/sue445/apple_system_status.

License

The gem is available as open source under the terms of the MIT License.