vatsim_online 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,54 @@
1
+ require 'spec_helper.rb'
2
+
3
+ describe VatsimOnline do
4
+
5
+ describe "vatsim_online" do
6
+ it "should work :)" do
7
+ gem_data_file
8
+ "ZGGG".vatsim_online.class.should eq(Hash)
9
+ "LO".vatsim_online.class.should eq(Hash)
10
+ "LO".vatsim_online[:atc].size.should eq(2)
11
+ "LO".vatsim_online[:pilots].size.should eq(21)
12
+ "LO".vatsim_online(:pilots => true, :atc => true).class.should eq(Hash)
13
+ "LO".vatsim_online(:pilots => true, :atc => true)[:atc].size.should eq(2)
14
+ "LO".vatsim_online(:pilots => true, :atc => true)[:pilots].size.should eq(21)
15
+ "LO".vatsim_online(:atc => false)[:atc].size.should eq(0)
16
+ "LO".vatsim_online(:atc => false)[:pilots].size.should eq(21)
17
+ "LO".vatsim_online(:pilots => false)[:atc].size.should eq(2)
18
+ "LO".vatsim_online(:pilots => false)[:pilots].size.should eq(0)
19
+
20
+ "LO".vatsim_online[:pilots].first.callsign.should eq("ACH0838")
21
+ "LO".vatsim_online[:atc].first.callsign.should eq("LOVV_CTR")
22
+ end
23
+
24
+ it "should be case insensitive" do
25
+ gem_data_file
26
+ "lo".vatsim_online[:atc].size.should eq(2)
27
+ "lo".vatsim_online[:pilots].size.should eq(21)
28
+ "lo".vatsim_online(:pilots => true, :atc => true)[:atc].size.should eq(2)
29
+ "lo".vatsim_online(:pilots => true, :atc => true)[:pilots].size.should eq(21)
30
+ end
31
+ end
32
+
33
+ end
34
+
35
+
36
+ describe VatsimTools::Station do
37
+
38
+ describe "new object" do
39
+ it "should return proper attributes" do
40
+ gem_data_file
41
+ icao = "ZGGG"
42
+ station = VatsimTools::StationParser.new(icao).stations.first
43
+ new_object = VatsimTools::Station.new(station)
44
+ new_object.callsign.should eq("ZGGG_ATIS")
45
+ new_object.name.should eq("Yu Xiong")
46
+ new_object.role.should eq("ATC")
47
+ new_object.frequency.should eq("127.000")
48
+ new_object.rating.should eq("3")
49
+ new_object.facility.should eq("4")
50
+ new_object.logon.should eq("20120713151529")
51
+ end
52
+ end
53
+
54
+ end
@@ -0,0 +1,26 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/vatsim_online/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.authors = ["Svilen Vassilev"]
6
+ gem.email = ["svilen@rubystudio.net"]
7
+ gem.description = %q{Selectively pulls and parses Vatsim online stations data. Essentially it's a 'who's online' library, capable of displaying online ATC and/or pilots for given airports, areas or globally. Stations are returned as objects, exposing a rich set of attributes. Vatsim data is pulled on preset intervals and cached locally to avoid flooding the servers.}
8
+ gem.summary = %q{Selectively pulls and parses Vatsim online stations data. Essentially it's a 'who's online' library, capable of displaying online ATC and/or pilots for given airports, areas or globally. Stations are returned as objects, exposing a rich set of attributes. Vatsim data is pulled on preset intervals and cached locally to avoid flooding the servers.}
9
+ gem.homepage = "https://github.com/tarakanbg/vatsim_online"
10
+
11
+ gem.files = `git ls-files`.split($\)
12
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
+ gem.name = "vatsim_online"
15
+ gem.require_paths = ["lib"]
16
+ gem.version = VatsimOnline::VERSION
17
+
18
+ gem.add_development_dependency "rspec"
19
+ gem.add_development_dependency "rake"
20
+ gem.add_development_dependency "guard"
21
+ gem.add_development_dependency "libnotify"
22
+ gem.add_development_dependency "guard-rspec"
23
+ gem.add_dependency "curb"
24
+ gem.add_dependency "time_diff"
25
+ end
26
+
metadata ADDED
@@ -0,0 +1,192 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vatsim_online
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.1'
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Svilen Vassilev
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-07-20 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: guard
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: libnotify
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: guard-rspec
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: curb
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :runtime
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: time_diff
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ description: Selectively pulls and parses Vatsim online stations data. Essentially
127
+ it's a 'who's online' library, capable of displaying online ATC and/or pilots for
128
+ given airports, areas or globally. Stations are returned as objects, exposing a
129
+ rich set of attributes. Vatsim data is pulled on preset intervals and cached locally
130
+ to avoid flooding the servers.
131
+ email:
132
+ - svilen@rubystudio.net
133
+ executables: []
134
+ extensions: []
135
+ extra_rdoc_files: []
136
+ files:
137
+ - .gitignore
138
+ - .travis.yml
139
+ - Gemfile
140
+ - Guardfile
141
+ - LICENSE
142
+ - README.md
143
+ - Rakefile
144
+ - lib/vatsim_online.rb
145
+ - lib/vatsim_online/data_downloader.rb
146
+ - lib/vatsim_online/station.rb
147
+ - lib/vatsim_online/station_parser.rb
148
+ - lib/vatsim_online/version.rb
149
+ - spec/data_downloader_spec.rb
150
+ - spec/data_downloader_spec_helper.rb
151
+ - spec/spec_helper.rb
152
+ - spec/station_parser_spec.rb
153
+ - spec/station_parser_spec_helper.rb
154
+ - spec/vatsim_data.txt
155
+ - spec/vatsim_online_spec.rb
156
+ - vatsim_online.gemspec
157
+ homepage: https://github.com/tarakanbg/vatsim_online
158
+ licenses: []
159
+ post_install_message:
160
+ rdoc_options: []
161
+ require_paths:
162
+ - lib
163
+ required_ruby_version: !ruby/object:Gem::Requirement
164
+ none: false
165
+ requirements:
166
+ - - ! '>='
167
+ - !ruby/object:Gem::Version
168
+ version: '0'
169
+ required_rubygems_version: !ruby/object:Gem::Requirement
170
+ none: false
171
+ requirements:
172
+ - - ! '>='
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ requirements: []
176
+ rubyforge_project:
177
+ rubygems_version: 1.8.24
178
+ signing_key:
179
+ specification_version: 3
180
+ summary: Selectively pulls and parses Vatsim online stations data. Essentially it's
181
+ a 'who's online' library, capable of displaying online ATC and/or pilots for given
182
+ airports, areas or globally. Stations are returned as objects, exposing a rich set
183
+ of attributes. Vatsim data is pulled on preset intervals and cached locally to avoid
184
+ flooding the servers.
185
+ test_files:
186
+ - spec/data_downloader_spec.rb
187
+ - spec/data_downloader_spec_helper.rb
188
+ - spec/spec_helper.rb
189
+ - spec/station_parser_spec.rb
190
+ - spec/station_parser_spec_helper.rb
191
+ - spec/vatsim_data.txt
192
+ - spec/vatsim_online_spec.rb