0.0
No release in over 3 years
Low commit activity in last 3 years
Pulls and returns as a string the latest VATSIM metar for a particular station (ICAO code).
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0
~> 0

Runtime

~> 0
 Project Readme

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