airports 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/data/reformat.rb ADDED
@@ -0,0 +1,21 @@
1
+ require "csv"
2
+ require "json"
3
+
4
+ airport_data = {}
5
+
6
+ CSV.foreach("airports.dat") do |row|
7
+ airport_data[row[4]] = {
8
+ :name => row[1],
9
+ :city => row[2],
10
+ :country => row[3],
11
+ :iata => row[4],
12
+ :icao => row[5],
13
+ :latitude => row[6],
14
+ :longitude => row[7],
15
+ :altitude => row[8],
16
+ :timezone => row[9],
17
+ :dst => row[10]
18
+ }
19
+ end
20
+
21
+ File.open("airports.json", "w").puts JSON.generate(airport_data)
@@ -1,3 +1,3 @@
1
1
  module Airports
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: airports
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Rogers
@@ -123,6 +123,10 @@ files:
123
123
  - airports.gemspec
124
124
  - bin/console
125
125
  - bin/setup
126
+ - data/README.md
127
+ - data/airports.dat
128
+ - data/airports.json
129
+ - data/reformat.rb
126
130
  - lib/airports.rb
127
131
  - lib/airports/airport.rb
128
132
  - lib/airports/version.rb