world_airports 1.0.1

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.
@@ -0,0 +1,3 @@
1
+ module WorldAirports
2
+ VERSION = "1.0.1"
3
+ end
@@ -0,0 +1,31 @@
1
+ require "world_airports/version"
2
+ require "scrapped"
3
+
4
+ module WorldAirports
5
+ class WorldAirports::Airport
6
+ attr_accessor :name
7
+ attr_accessor :location
8
+ attr_accessor :iata
9
+ attr_accessor :icao
10
+ attr_accessor :city
11
+ attr_accessor :country
12
+ end
13
+
14
+ def self.iata(iata_code)
15
+ airport_dt = scrapped_airports[iata_code.to_s.upcase]
16
+ airport = WorldAirports::Airport.new
17
+
18
+ if airport_dt
19
+ airport.name = airport_dt[:name]
20
+ airport.location = airport_dt[:location]
21
+ airport.icao = airport_dt[:icao]
22
+ airport.iata = airport_dt[:iata]
23
+ airport.country = airport_dt[:country]
24
+ airport.city = airport.location.split(",")[0]
25
+
26
+ return airport
27
+ end
28
+
29
+ nil
30
+ end
31
+ end
data/out.txt ADDED
@@ -0,0 +1 @@
1
+ ^C
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'world_airports/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "world_airports"
8
+ spec.version = WorldAirports::VERSION
9
+ spec.authors = ["Adam Pahlevi"]
10
+ spec.email = ["adam.pahlevi@gmail.com"]
11
+ spec.summary = %q{Get airport details based on IATA code}
12
+ spec.description = %q{This gem will translate an IATA into an airport name, location, city and country information. Wikipedia has provided the list of the airports}
13
+ spec.homepage = "http://adampahlevi.com"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.cert_chain = ['certs/adampahlevi.pem']
22
+ spec.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $0 =~ /gem\z/
23
+
24
+ spec.add_development_dependency "bundler", "~> 1.6"
25
+ spec.add_development_dependency "rake"
26
+ end
data.tar.gz.sig ADDED
@@ -0,0 +1,2 @@
1
+ ���Y����eu�h�<
2
+ d�jIg,��S~�?O�?�H罵H%�u���C�f ��M� 0:�M�7g{�%�.}GI��y����9������En��%ͮ0;�jKV���}b ��2c:&�"g K�d�n)�N�"��<���=Sd����mɯ3�,s�mzAޭ�+=&B/�L7�� �Ţt�= ������{ ~r�GY�J���s�LE�j�j&G�M�-���S�3��Ȳ�=\�a�b�|�Xh�}�Zs�
metadata ADDED
@@ -0,0 +1,115 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: world_airports
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Adam Pahlevi
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDOjCCAiKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBDMRUwEwYDVQQDDAxhZGFt
14
+ LnBhaGxldmkxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkW
15
+ A2NvbTAeFw0xNDA4MjgwMDIxNTNaFw0xNTA4MjgwMDIxNTNaMEMxFTATBgNVBAMM
16
+ DGFkYW0ucGFobGV2aTEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPy
17
+ LGQBGRYDY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzlGUgZUW
18
+ VxMf08xHnyDEkLeXOMeJDO0CKUVMUGIfAZdgS+hxr9zVNs8moW/lqTQTZwCzgSUc
19
+ elxH+K2d+rd162VMo6m1vHbTN6alhOSwq/VhpKP7WDCa0wiHhgD02MY9Z/ssQs6L
20
+ +mQF0JsE7fIdeJXSJg/4R+pxkx8sucRLu4Jc3tlTfD6GDVjnqQsFYqb5IjjwenG3
21
+ +chx+IWQZnbBz4ts6fkQD/PT9JQHvovjMRN2+JYtr9HfYedKpA42GquodFAHYr3S
22
+ uYD1fTipbEPfPCIEgEol+RMCvUCGEugmqUlbkgCRSW3gS5a0+++kaA5796I7L384
23
+ jQN8PMM/Gybm9wIDAQABozkwNzAJBgNVHRMEAjAAMB0GA1UdDgQWBBTfQTaRnKcC
24
+ Td8lBSjslIGCwPZueTALBgNVHQ8EBAMCBLAwDQYJKoZIhvcNAQEFBQADggEBAKfV
25
+ 4cSuQUkZ4Pp6/6JYASGQZ+LMSEWJsL3OiqXTYJfpnV5iLzE2QEUIk+9EOz2Lr+1z
26
+ dG2UZjntRJ6m9OM/o61f4wwW2lOo/JI10tnZLCnK1dbLFX14GqqIHU32NnPcQJkc
27
+ nqhjc/jk6bbh23B8yqD7eTKqiuNLM/JHA2lNpt7K9DWD7mp7uzJFR1QT7NYmmYXT
28
+ /unc5WJWiywsvOZUaHQu16r2rPfa8GpoSMXTfCbyITpc019arY4bmGUIKBsTCZ1R
29
+ +zJGsX7fl+9rxjoWFDvruQD2ofYcTJPNbgyW8UOJYaIPkn5XwqEyuaVHObuwic5i
30
+ xM3DTSopvt+cyYZ+v6w=
31
+ -----END CERTIFICATE-----
32
+ date: 2014-08-28 00:00:00.000000000 Z
33
+ dependencies:
34
+ - !ruby/object:Gem::Dependency
35
+ name: bundler
36
+ requirement: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.6'
41
+ type: :development
42
+ prerelease: false
43
+ version_requirements: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.6'
48
+ - !ruby/object:Gem::Dependency
49
+ name: rake
50
+ requirement: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ description: This gem will translate an IATA into an airport name, location, city
63
+ and country information. Wikipedia has provided the list of the airports
64
+ email:
65
+ - adam.pahlevi@gmail.com
66
+ executables: []
67
+ extensions: []
68
+ extra_rdoc_files: []
69
+ files:
70
+ - ".DS_Store"
71
+ - ".gitignore"
72
+ - ".idea/.name"
73
+ - ".idea/encodings.xml"
74
+ - ".idea/misc.xml"
75
+ - ".idea/modules.xml"
76
+ - ".idea/scopes/scope_settings.xml"
77
+ - ".idea/vcs.xml"
78
+ - ".idea/workspace.xml"
79
+ - ".idea/world_airports.iml"
80
+ - Gemfile
81
+ - LICENSE.txt
82
+ - README.md
83
+ - Rakefile
84
+ - certs/adampahlevi.pem
85
+ - gem-public_cert.pem
86
+ - lib/scrapped.rb
87
+ - lib/world_airports.rb
88
+ - lib/world_airports/version.rb
89
+ - out.txt
90
+ - world_airports.gemspec
91
+ homepage: http://adampahlevi.com
92
+ licenses:
93
+ - MIT
94
+ metadata: {}
95
+ post_install_message:
96
+ rdoc_options: []
97
+ require_paths:
98
+ - lib
99
+ required_ruby_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ required_rubygems_version: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ version: '0'
109
+ requirements: []
110
+ rubyforge_project:
111
+ rubygems_version: 2.2.2
112
+ signing_key:
113
+ specification_version: 4
114
+ summary: Get airport details based on IATA code
115
+ test_files: []
metadata.gz.sig ADDED
Binary file