airports 1.6.0 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +13 -8
- data/.github/dependabot.yml +14 -0
- data/.rubocop.yml +4 -1
- data/.ruby-version +1 -0
- data/.tool-versions +1 -0
- data/CHANGELOG.md +17 -0
- data/Gemfile +9 -0
- data/README.md +5 -5
- data/Rakefile +3 -2
- data/airports.gemspec +2 -8
- data/data/airports.json +1 -1
- data/data/patches.dat +4 -0
- data/lib/airports/airport.rb +0 -2
- data/lib/airports/version.rb +1 -1
- data/lib/airports.rb +2 -4
- metadata +13 -93
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c107f552ae205c0dac335be39ec57dd7e01b8e26d03e90ddf0f8d4c40ada0df
|
4
|
+
data.tar.gz: 848b8803ba565347ad8db01f58543c50ad4309332989b2f8713c9d15bff70555
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cf239ebb74648fa12e19292babd9e920f7155889151216db5af9e47a802f58a8cd6a16b8751c06e2d0f4a2f303611c853692e0128371b63acccc5f0927fdc0f
|
7
|
+
data.tar.gz: '01639a5eee7240e16775769c2c77d18298fc5c0bc266f739b90d671f9d79cfe39af59b31a0cf1f33a69ce85f221cd7ac913d167805c4801cc766618a87bd8508'
|
data/.circleci/config.yml
CHANGED
@@ -28,22 +28,27 @@ references:
|
|
28
28
|
|
29
29
|
- run: bundle exec rubocop
|
30
30
|
jobs:
|
31
|
-
build-
|
31
|
+
build-ruby26:
|
32
32
|
docker:
|
33
|
-
- image: ruby:2.
|
33
|
+
- image: ruby:2.6
|
34
34
|
steps: *steps
|
35
|
-
build-
|
35
|
+
build-ruby27:
|
36
36
|
docker:
|
37
|
-
- image: ruby:2.
|
37
|
+
- image: ruby:2.7
|
38
38
|
steps: *steps
|
39
|
-
build-
|
39
|
+
build-ruby30:
|
40
40
|
docker:
|
41
|
-
- image: ruby:
|
41
|
+
- image: ruby:3.0
|
42
|
+
steps: *steps
|
43
|
+
build-ruby31:
|
44
|
+
docker:
|
45
|
+
- image: ruby:3.1
|
42
46
|
steps: *steps
|
43
47
|
workflows:
|
44
48
|
version: 2
|
45
49
|
tests:
|
46
50
|
jobs:
|
47
|
-
- build-ruby24
|
48
|
-
- build-ruby25
|
49
51
|
- build-ruby26
|
52
|
+
- build-ruby27
|
53
|
+
- build-ruby30
|
54
|
+
- build-ruby31
|
data/.rubocop.yml
CHANGED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.1.0
|
data/.tool-versions
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby 3.1.0
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
## v1.8.0 (13 March 2022)
|
2
|
+
|
3
|
+
* Add support for Ruby 3.1 (@timrogers)
|
4
|
+
* Fix the names of Ningbo (NGB) and Changsha (CSX) airports in China (@ratazzi)
|
5
|
+
|
6
|
+
# v1.7.0 (25 August 2021)
|
7
|
+
|
8
|
+
* Add support for Ruby 3.0 (@timrogers, with thanks to @kleinjm)
|
9
|
+
* Add Misrata Airport (`MRA`) in Libya (@timrogers, with thanks to @a21-kevin)
|
10
|
+
* Drop support for Ruby 2.4 and 2.5, which are no longer officially supported (@timrogers)
|
11
|
+
* Remove unnecessary dependencies from the gemspec, moving them to the `Gemfile` (@timrogers)
|
12
|
+
|
13
|
+
# v1.6.1 (9 May 2020)
|
14
|
+
|
15
|
+
* Add an entry for Berlin Brandenburg Airport (`BER`), which is missing from [OpenFlights](http://openflights.org) (@PavelWeSki)
|
16
|
+
* Update airport data with the latest from [OpenFlights](http://openflights.org)
|
17
|
+
|
1
18
|
# v1.6.0 (25 January 2020)
|
2
19
|
|
3
20
|
* Update airport data with the latest from [OpenFlights](http://openflights.org)
|
data/Gemfile
CHANGED
@@ -3,3 +3,12 @@
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
5
|
gemspec
|
6
|
+
|
7
|
+
gem "gc_ruboconfig", "~> 2.31.0"
|
8
|
+
gem "pry", "~> 0.14.1"
|
9
|
+
gem "rake", "~> 13.0"
|
10
|
+
gem "rspec", "~> 3.11.0"
|
11
|
+
gem "rspec-its", "~> 1.3.0"
|
12
|
+
gem "rspec_junit_formatter", "~> 0.5.1"
|
13
|
+
gem "rubocop", "~> 1.26.0"
|
14
|
+
gem "rubocop-rake", "~> 0.6.0", require: false
|
data/README.md
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
# Airports
|
2
2
|
|
3
|
-
[![Gem Version](https://badge.fury.io/rb/airports.svg)](http://badge.fury.io/rb/airports)
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/airports.svg)](http://badge.fury.io/rb/airports)
|
4
4
|
|
5
|
-
Airports gives you access to data on airports around the world.
|
5
|
+
Airports gives you access to data on airports around the world from your Ruby applications.
|
6
6
|
|
7
|
-
It's based on data from [OpenFlights](http://openflights.org), with a bit of massaging on the way (dropping airports without an IATA code, giving Doha its IATA code and adding
|
7
|
+
It's based on data from [OpenFlights](http://openflights.org), with a bit of massaging on the way (dropping airports without an IATA code, giving Doha its IATA code and adding `HYD` and `BER` which are missing entirely).
|
8
8
|
|
9
9
|
## Usage
|
10
10
|
|
11
11
|
Install the gem by adding it to your Gemfile:
|
12
12
|
|
13
13
|
```ruby
|
14
|
-
gem
|
14
|
+
gem "airports", "~> 1.8.0"
|
15
15
|
```
|
16
16
|
|
17
17
|
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`:
|
@@ -36,7 +36,7 @@ You can call `Airports.iata_codes` for a list of valid IATA codes, perfect for R
|
|
36
36
|
validates :destination_airport, inclusion: { in: Airports.iata_codes, message: "is not a valid airport" }
|
37
37
|
```
|
38
38
|
|
39
|
-
Or `
|
39
|
+
Or `Airports.all` will provide `Airports::Airport` objects representing all the airports the gem knows about.
|
40
40
|
|
41
41
|
## Development
|
42
42
|
|
data/Rakefile
CHANGED
@@ -18,9 +18,10 @@ def check_for_empty_data(field)
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
+
desc "Updates the airports data file based on the OpenFlights source and our patches"
|
21
22
|
task :update do
|
22
|
-
raw_data = open("https://raw.githubusercontent.com/jpatokal/openflights/master/
|
23
|
-
|
23
|
+
raw_data = URI.open("https://raw.githubusercontent.com/jpatokal/openflights/master/" \
|
24
|
+
"data/airports.dat").read + File.read("./data/patches.dat")
|
24
25
|
|
25
26
|
cleaned_data = raw_data.gsub(/\\"/, '""')
|
26
27
|
|
data/airports.gemspec
CHANGED
@@ -22,12 +22,6 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
|
-
spec.required_ruby_version = ">= 2.
|
26
|
-
|
27
|
-
spec.add_development_dependency "gc_ruboconfig", "~> 2.9.0"
|
28
|
-
spec.add_development_dependency "pry", "~> 0.12.2"
|
29
|
-
spec.add_development_dependency "rake", "~> 13.0"
|
30
|
-
spec.add_development_dependency "rspec", "~> 3.9.0"
|
31
|
-
spec.add_development_dependency "rspec-its", "~> 1.3.0"
|
32
|
-
spec.add_development_dependency "rspec_junit_formatter", "~> 0.4.0"
|
25
|
+
spec.required_ruby_version = ">= 2.6"
|
26
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
33
27
|
end
|