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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '08d410984de2627c314c3d3877b8bc0c147beeb3ed4ea0d5e7549b1c41056689'
4
- data.tar.gz: 847c2e075036a377d72205d792ca4b35f6584a249c09d5ba36e638962364748b
3
+ metadata.gz: 0c107f552ae205c0dac335be39ec57dd7e01b8e26d03e90ddf0f8d4c40ada0df
4
+ data.tar.gz: 848b8803ba565347ad8db01f58543c50ad4309332989b2f8713c9d15bff70555
5
5
  SHA512:
6
- metadata.gz: 85a959b5bbbf9228989831e4a18e2b9d73d95a1d82f79e04172e826bb59ede7f4beb92f4b96de838a1b638b078f7d0234015748f99a55035c216457c8d9d8748
7
- data.tar.gz: 6a4799b976ba23e67231ad44da1263295e2694e8293ed34e7ce2baf7cae5166cf2b8c29a3711f5d91ce22a534a4591af1218112676b7d4530882d15291235790
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-ruby24:
31
+ build-ruby26:
32
32
  docker:
33
- - image: ruby:2.4
33
+ - image: ruby:2.6
34
34
  steps: *steps
35
- build-ruby25:
35
+ build-ruby27:
36
36
  docker:
37
- - image: ruby:2.5
37
+ - image: ruby:2.7
38
38
  steps: *steps
39
- build-ruby26:
39
+ build-ruby30:
40
40
  docker:
41
- - image: ruby:2.6
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
@@ -0,0 +1,14 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ open-pull-requests-limit: 10
8
+ ignore:
9
+ - dependency-name: pry
10
+ versions:
11
+ - 0.14.0
12
+ - dependency-name: gc_ruboconfig
13
+ versions:
14
+ - 2.24.0
data/.rubocop.yml CHANGED
@@ -2,4 +2,7 @@ inherit_gem:
2
2
  gc_ruboconfig: rubocop.yml
3
3
 
4
4
  AllCops:
5
- TargetRubyVersion: 2.4
5
+ TargetRubyVersion: 2.6
6
+ NewCops: enable
7
+
8
+ require: rubocop-rake
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) [![Build Status](https://travis-ci.org/timrogers/airports.svg)](https://travis-ci.org/timrogers/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 Hyderabad which is missing entirely).
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 'airports', '~> 1.3.0'
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 `Airport.all` will provide `Airports::Airport` objects representing all the airports the gem knows about.
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/data/" \
23
- "airports.dat").read + File.read("./data/patches.dat")
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.4"
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