metar-parser 0.9.12 → 0.9.13

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/README.md CHANGED
@@ -1,12 +1,19 @@
1
- metar - Downloads and parses weather status
2
- ===========================================
1
+ metar-parser [![Build Status](https://secure.travis-ci.org/joeyates/metar-parser.png)][Continuous Integration]
2
+ ============
3
3
 
4
- The information comes from the National Oceanic and Atmospheric Association's raw data source.
4
+ *Get latest weather reports from weather stations worldwide*
5
5
 
6
- Implementation
7
- ==============
6
+ * [Source Code]
7
+ * [API documentation]
8
+ * [Rubygem]
9
+ * [Continuous Integration]
8
10
 
9
- * Parses METAR strings using a state machine.
11
+ [Source Code]: https://github.com/joeyates/metar-parser "Source code at GitHub"
12
+ [API documentation]: http://rubydoc.info/gems/metar-parser/frames "RDoc API Documentation at Rubydoc.info"
13
+ [Rubygem]: http://rubygems.org/gems/metar-parser "Ruby gem at rubygems.org"
14
+ [Continuous Integration]: http://travis-ci.org/joeyates/metar-parser "Build status by Travis-CI"
15
+
16
+ The information comes from the National Oceanic and Atmospheric Association's raw data source.
10
17
 
11
18
  Usage
12
19
  =====
@@ -52,20 +59,10 @@ parser = station.parser
52
59
  puts parser.temperature.value
53
60
  ```
54
61
 
62
+ Implementation
63
+ ==============
55
64
 
56
- The METAR Data Format
57
- =====================
58
-
59
- * WMO
60
- * http://www.wmo.int/pages/prog/www/WMOCodes/Manual/Volume-I-selection/Sel2.pdf (pages 27-38)
61
- * http://dcaa.slv.dk:8000/icaodocs/Annex%203%20-%20Meteorological%20Service%20for%20International%20Air%20Navigation/Cover%20sheet%20to%20AMDT%2074.pdf (Table A3-2. Template for METAR and SPECI)
62
- * http://booty.org.uk/booty.weather/metinfo/codes/METAR_decode.htm
63
-
64
- * United states:
65
- * http://www.nws.noaa.gov/oso/oso1/oso12/fmh1/fmh1ch12.htm
66
- * http://www.ofcm.gov/fmh-1/pdf/FMH1.pdf
67
- * http://weather.cod.edu/notes/metar.html
68
- * http://www.met.tamu.edu/class/METAR/metar-pg3.html - incomplete
65
+ * Parses METAR strings using a state machine.
69
66
 
70
67
  Alternative Software
71
68
  ====================
@@ -74,14 +71,27 @@ Ruby
74
71
  ----
75
72
 
76
73
  Other Ruby libraries offering METAR parsing:
77
- * ruby-metar - http://github.com/brandonh/ruby-metar
78
- * ruby-wx - http://hans.fugal.net/src/ruby-wx/doc/
74
+
75
+ * [ruby-metar]
76
+ * [ruby-wx]
77
+
79
78
  There are many reports (WMO) that these libraries do not parse.
80
79
 
80
+ [ruby-metar]: http://github.com/brandonh/ruby-metar
81
+ [ruby-wx]: http://hans.fugal.net/src/ruby-wx/doc/
82
+
81
83
  There are two gems which read the National Oceanic and Atmospheric Association's XML weather data feeds:
82
- * noaa-weather - Ruby interface to NOAA SOAP interface
83
- * noaa - http://github.com/outoftime/noaa
84
84
 
85
- Interactive map:
86
- * http://www.spatiality.at/metarr/frontend/
85
+ * [noaa]
86
+ * [noaa-weather]
87
+
88
+ [noaa]: http://github.com/outoftime/noaa
89
+ [noaa-weather]: http://rubygems.org/gems/noaa-weather "Ruby interface to NOAA SOAP interface"
90
+
91
+ Other
92
+ -----
93
+
94
+ * [Interactive map]
95
+
96
+ [Interactive map]: http://www.spatiality.at/metarr/frontend/
87
97
 
data/Rakefile CHANGED
@@ -18,6 +18,7 @@ RSpec::Core::RakeTask.new do | t |
18
18
  end
19
19
 
20
20
  if RUBY_VERSION < '1.9'
21
+
21
22
  Rake::RDocTask.new do |rdoc|
22
23
  rdoc.rdoc_dir = RDOC_PATH
23
24
  rdoc.options += RDOC_OPTS
data/lib/metar/version.rb CHANGED
@@ -3,7 +3,7 @@ module Metar
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 0
5
5
  MINOR = 9
6
- TINY = 12
6
+ TINY = 13
7
7
 
8
8
  STRING = [ MAJOR, MINOR, TINY ].join( '.' )
9
9
  end
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,14 @@
1
1
  require 'rspec'
2
2
  require 'rspec/autorun'
3
3
 
4
+ if RUBY_VERSION > '1.9'
5
+ require 'simplecov'
6
+ if ENV[ 'COVERAGE' ]
7
+ SimpleCov.start do
8
+ add_filter "/spec/"
9
+ end
10
+ end
11
+ end
12
+
4
13
  require File.expand_path( File.dirname(__FILE__) + '/../lib/metar' )
5
14
 
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
2
3
 
3
4
  describe Metar::Distance do
@@ -1,5 +1,5 @@
1
- load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
2
1
  # encoding: utf-8
2
+ load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
3
3
 
4
4
  describe Metar::Parser do
5
5
 
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
2
3
 
3
4
  describe Metar::Pressure do
@@ -1,5 +1,5 @@
1
- load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
2
1
  # encoding: utf-8
2
+ load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
3
3
 
4
4
  describe Metar::Report do
5
5
 
@@ -1,5 +1,5 @@
1
- load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
2
1
  # encoding: utf-8
2
+ load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
3
3
 
4
4
  RSpec::Matchers.define :be_runway_visible_range do | designator, visibility1, visibility2, tendency |
5
5
  match do | rvr |
@@ -1,5 +1,5 @@
1
- load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
2
1
  # encoding: utf-8
2
+ load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
3
3
 
4
4
  RSpec::Matchers.define :be_sky_condition do | quantity, height, type |
5
5
  match do | sk |
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
2
3
 
3
4
  describe Metar::Speed do
@@ -1,5 +1,5 @@
1
- load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
2
1
  # encoding: utf-8
2
+ load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
3
3
 
4
4
  require 'stringio'
5
5
 
@@ -1,5 +1,5 @@
1
- load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
2
1
  # encoding: utf-8
2
+ load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
3
3
 
4
4
  describe Metar::Temperature do
5
5
 
@@ -1,5 +1,5 @@
1
- load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
2
1
  # encoding: utf-8
2
+ load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
3
3
 
4
4
  describe Metar::VariableWind do
5
5
 
@@ -1,5 +1,5 @@
1
- load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
2
1
  # encoding: utf-8
2
+ load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
3
3
 
4
4
  RSpec::Matchers.define :be_distance do | expected |
5
5
  match do | distance |
@@ -1,5 +1,5 @@
1
- load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
2
1
  # encoding: utf-8
2
+ load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
3
3
 
4
4
  RSpec::Matchers.define :be_visibility do | distance, direction, comparator |
5
5
  match do | visibility |
@@ -1,5 +1,5 @@
1
- load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
2
1
  # encoding: utf-8
2
+ load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
3
3
 
4
4
  RSpec::Matchers.define :be_weather_phenomenon do | modifier, descriptor, phenomenon |
5
5
  match do | wp |
@@ -1,5 +1,5 @@
1
- load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
2
1
  # encoding: utf-8
2
+ load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )
3
3
 
4
4
  RSpec::Matchers.define :be_wind do | direction, speed, gusts |
5
5
  match do | wind |
metadata CHANGED
@@ -1,139 +1,137 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: metar-parser
3
- version: !ruby/object:Gem::Version
4
- hash: 35
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.13
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 9
9
- - 12
10
- version: 0.9.12
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Joe Yates
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-05-15 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- prerelease: false
12
+ date: 2012-05-15 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: rake
23
- version_requirements: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 49
29
- segments:
30
- - 0
31
- - 8
32
- - 7
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
33
21
  version: 0.8.7
34
- requirement: *id001
35
22
  type: :runtime
36
- - !ruby/object:Gem::Dependency
37
23
  prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 0.8.7
30
+ - !ruby/object:Gem::Dependency
38
31
  name: rdoc
39
- version_requirements: &id002 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
40
33
  none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- hash: 3
45
- segments:
46
- - 0
47
- version: "0"
48
- requirement: *id002
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
49
38
  type: :runtime
50
- - !ruby/object:Gem::Dependency
51
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
52
47
  name: i18n
53
- version_requirements: &id003 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
54
49
  none: false
55
- requirements:
56
- - - ">="
57
- - !ruby/object:Gem::Version
58
- hash: 25
59
- segments:
60
- - 0
61
- - 3
62
- - 5
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
63
53
  version: 0.3.5
64
- requirement: *id003
65
54
  type: :runtime
66
- - !ruby/object:Gem::Dependency
67
55
  prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 0.3.5
62
+ - !ruby/object:Gem::Dependency
68
63
  name: aasm
69
- version_requirements: &id004 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
70
65
  none: false
71
- requirements:
72
- - - ">="
73
- - !ruby/object:Gem::Version
74
- hash: 1
75
- segments:
76
- - 2
77
- - 1
78
- - 5
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
79
69
  version: 2.1.5
80
- requirement: *id004
81
70
  type: :runtime
82
- - !ruby/object:Gem::Dependency
83
71
  prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: 2.1.5
78
+ - !ruby/object:Gem::Dependency
84
79
  name: m9t
85
- version_requirements: &id005 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
86
81
  none: false
87
- requirements:
82
+ requirements:
88
83
  - - ~>
89
- - !ruby/object:Gem::Version
90
- hash: 17
91
- segments:
92
- - 0
93
- - 2
94
- - 3
84
+ - !ruby/object:Gem::Version
95
85
  version: 0.2.3
96
- requirement: *id005
97
86
  type: :runtime
98
- - !ruby/object:Gem::Dependency
99
87
  prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: 0.2.3
94
+ - !ruby/object:Gem::Dependency
100
95
  name: rspec
101
- version_requirements: &id006 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
102
97
  none: false
103
- requirements:
104
- - - ">="
105
- - !ruby/object:Gem::Version
106
- hash: 3
107
- segments:
108
- - 2
109
- - 3
110
- - 0
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
111
101
  version: 2.3.0
112
- requirement: *id006
113
102
  type: :development
114
- - !ruby/object:Gem::Dependency
115
103
  prerelease: false
116
- name: rcov
117
- version_requirements: &id007 !ruby/object:Gem::Requirement
104
+ version_requirements: !ruby/object:Gem::Requirement
118
105
  none: false
119
- requirements:
120
- - - ">="
121
- - !ruby/object:Gem::Version
122
- hash: 3
123
- segments:
124
- - 0
125
- version: "0"
126
- requirement: *id007
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: 2.3.0
110
+ - !ruby/object:Gem::Dependency
111
+ name: simplecov
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
127
118
  type: :development
128
- description: A Ruby library which handle METAR weather reports. Provides weather station listings and info. Downloads and parses reports. Presents localized full text reports
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: ! " metar-parser is a ruby gem that downloads weather reports, parses
127
+ them and formats reports.\n\n It also provides weather station listings and info
128
+ (e.g. country, latitude and longitude).\n\n Reports can be fully localized (currently
129
+ English and Italian are available).\n"
129
130
  email: joe.g.yates@gmail.com
130
131
  executables: []
131
-
132
132
  extensions: []
133
-
134
133
  extra_rdoc_files: []
135
-
136
- files:
134
+ files:
137
135
  - README.md
138
136
  - COPYING
139
137
  - Rakefile
@@ -166,38 +164,35 @@ files:
166
164
  - locales/en.yml
167
165
  homepage: http://github.com/joeyates/metar-parser
168
166
  licenses: []
169
-
170
167
  post_install_message:
171
168
  rdoc_options: []
172
-
173
- require_paths:
169
+ require_paths:
174
170
  - lib
175
- required_ruby_version: !ruby/object:Gem::Requirement
171
+ required_ruby_version: !ruby/object:Gem::Requirement
176
172
  none: false
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- hash: 3
181
- segments:
173
+ requirements:
174
+ - - ! '>='
175
+ - !ruby/object:Gem::Version
176
+ version: '0'
177
+ segments:
182
178
  - 0
183
- version: "0"
184
- required_rubygems_version: !ruby/object:Gem::Requirement
179
+ hash: -3748665437663595419
180
+ required_rubygems_version: !ruby/object:Gem::Requirement
185
181
  none: false
186
- requirements:
187
- - - ">="
188
- - !ruby/object:Gem::Version
189
- hash: 3
190
- segments:
182
+ requirements:
183
+ - - ! '>='
184
+ - !ruby/object:Gem::Version
185
+ version: '0'
186
+ segments:
191
187
  - 0
192
- version: "0"
188
+ hash: -3748665437663595419
193
189
  requirements: []
194
-
195
190
  rubyforge_project: nowarning
196
191
  rubygems_version: 1.8.24
197
192
  signing_key:
198
193
  specification_version: 3
199
- summary: A Ruby library for METAR weather reports
200
- test_files:
194
+ summary: A Ruby gem for worldwide weather reports
195
+ test_files:
201
196
  - spec/unit/runway_visible_range_spec.rb
202
197
  - spec/unit/vertical_visibility_spec.rb
203
198
  - spec/unit/report_spec.rb