Skip to content

Commit

Permalink
v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
timrogers committed Jun 26, 2019
1 parent ef12116 commit 9d0d106
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v1.3.0 (26 June 2019)

* Expose the time zone that an airport is located in with `#tz_name` (@gabebw)

# v1.2.0 (11 March 2018)

* Drop support for Ruby 2.2, which has reached end-of-life and no longer receives security updates (@timrogers)
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,21 @@ It's based on data from [OpenFlights](http://openflights.org), with a bit of mas
Install the gem by adding it to your Gemfile:

```ruby
gem 'airports', '~> 1.2.0'
gem 'airports', '~> 1.3.0'
```

You can then look up an airport by its IATA code (e.g. `LHR` for London Heathrow) using `Airports.find_by_iata_code`, which returns an object with a bunch of accessors like `name` and `city`:

```ruby
Airports.find_by_iata_code("LHR")
=> #<Airports::Airport:0x007fd9a1bbd550 @name="Heathrow", @city="London", @country="United Kingdom", @iata="LHR", @icao="EGLL", @latitude="51.4775", @longitude="-0.461389", @altitude="83", @timezone="0", @dst="E">
=> #<Airports::Airport:0x00007fdbd1df68d0 @name="London Heathrow Airport", @city="London", @country="United Kingdom", @iata="LHR", @icao="EGLL", @latitude="51.4706", @longitude="-0.461941", @altitude="83", @timezone="0", @dst="E", @tz_name="Europe/London">
```

You can also look up an airport by its ICAO code.

```ruby
Airports.find_by_iata_code("KCRG")
=> #<Airports::Airport:0x00007fb548bea898 @altitude="41", @city="Jacksonville",
@country="United States", @dst="\\N", @iata="CRG", @icao="KCRG",
@latitude="30.3362998962", @longitude="-81.51439666750001", @name="Jacksonville
Executive at Craig Airport", @timezone="\\N">
Airports.find_by_icao_code("KCRG")
=> #<Airports::Airport:0x00007fdbd1d955d0 @name="Jacksonville Executive at Craig Airport", @city="Jacksonville", @country="United States", @iata="CRG", @icao="KCRG", @latitude="30.3362998962", @longitude="-81.51439666750001", @altitude="41", @timezone="\\N", @dst="\\N", @tz_name="\\N">
```

A couple of other methods provide access to aggregate data.
Expand Down
2 changes: 1 addition & 1 deletion lib/airports/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Airports
VERSION = "1.2.0".freeze
VERSION = "1.3.0".freeze
end

0 comments on commit 9d0d106

Please sign in to comment.