Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Vatsim Metar

A Ruby gem which pulls and displays the latest VATSIM metar for a particular station (ICAO code).

Build Status Gemnasium Gem Version Code Climate

Compatibility

Ruby 2.0 or higher

Installation

Add this line to your application's Gemfile:

gem 'vatsim_metar'

And then execute:

$ bundle

Or install it yourself as:

$ gem install vatsim_metar

Usage

The .metar method can be applied to a string (or variable containing a string), representing a valid ICAO code. Like this:

"EGLL".metar # => "EGLL 291750Z 22016KT 9999 SCT023 SCT032 18/13 Q1005"

airport = "EGLL"
airport.metar # => "EGLL 291750Z 22016KT 9999 SCT023 SCT032 18/13 Q1005"

The input ICAO code is not case sensitive, so the following should work as well:

"kjfk".metar # => "KJFK 291751Z 24016KT 10SM FEW180 SCT250 32/21 A2968 RMK AO2 SLP049 T03170211 10322 20222 58008"

airport = "kjfk"
airport.metar # => "KJFK 291751Z 24016KT 10SM FEW180 SCT250 32/21 A2968 RMK AO2 SLP049 T03170211 10322 20222 58008"

Technicalities

This library augments the default Ruby String class with a method named .metar. It returns a string, containing the latest Vatsim METAR. The data is obtained via curl from Vatsim's web API, hence the curb dependency.

Changelog

v. 0.2.4 - 8 January 2017

  • dependcies update

v. 0.2.2 - 31 August 2013

  • added timeout limit
  • added connection failure rescue
  • check for METAR validity
  • dependency update

v. 0.1.0 - 26 February 2013

  • added Ruby 2.0 support

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Make sure all tests pass!
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request

Credits

Copyright © 2017 Svilen Vassilev

If you find my work useful or time-saving, you can buy me a cup of coffee:

Bitcoin: 1FtY5KnFcC7QDQCNwoXErQCtx8z9hdTWcD

Dogecoin: DE9Tb4ge4YM7rAFFwKNAQo2mEUfiEC9xRQ

Released under the MIT LICENSE

About

Ruby Gem for pulling current Vatsim weather

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.