metar-parser 1.4.3 → 1.5.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: 8669ee0013495030113f9eedef95ba35eef327aff2ba3971bc0bab985a88a522
4
- data.tar.gz: 4cfb87824178aff9b7ba87dd0cb461c4426adc94a99e7ef1ee683351695361d6
3
+ metadata.gz: 9d2ff4b24fb06f90f8d661f3d28767733f13de8fe4ca7b4a98d5dd99489e1a4a
4
+ data.tar.gz: 1d5be21117623704381b395020a0646a5692ef26b5cd99f385be80bb84df4dbd
5
5
  SHA512:
6
- metadata.gz: de8ac448ba1f2bbe8a9f2bd4ee826bae4a915eddaa5440bc75e52464aefa11805070956bcd3cc1b8cb2182682cda9ec21f86b53118a9ffec02287d446fab7df1
7
- data.tar.gz: ff67729c9b93cde143b2de70b07b697ac10db14e8ef8554e911c8d5549df845f8f18d40a093cc0a8056afc4b7c8f9b9d53412b109721cf65db4ed47ef2f309c3
6
+ metadata.gz: a03d25be50664efca1ea07011e09f26a57fe9719415b08dbc3bf2c9705b6093deb3e2a4c23cc6edcd699a916d23aec8e398bc160085d2deb28075fe7e3c6e8a7
7
+ data.tar.gz: 7e74f5fd5953541dfc897284bd9610d8cae24abe544fc27e3a97aaec38a8b9c66ac117659d48742ba5ce9554f3f80999188297b36650e1a264d3582599b10a7b
@@ -4,6 +4,7 @@ require "m9t"
4
4
  # Adds a parse method to the M9t base class
5
5
  class Metar::Data::Temperature < M9t::Temperature
6
6
  def self.parse(raw)
7
+ return nil if !raw
7
8
  m = raw.match(/^(M?)(\d+)$/)
8
9
  return nil if !m
9
10
  sign = m[1]
@@ -1,8 +1,8 @@
1
1
  module Metar
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
- MINOR = 4
5
- TINY = 3
4
+ MINOR = 5
5
+ TINY = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -275,11 +275,21 @@ describe Metar::Parser do
275
275
  expect(parser.temperature.value).to eq(-17)
276
276
  end
277
277
 
278
+ it "accepts a blank temperature" do
279
+ parser = setup_parser("KSMO 281655Z 18003KT 9SM SCT020 /20 A3002 RMK A02 T0200 $")
280
+ expect(parser.temperature).to eq(nil)
281
+ end
282
+
278
283
  it 'dew_point' do
279
284
  parser = setup_parser("PAIL 061610Z 24006KT 1 3/4SM -SN BKN016 OVC030 M17/M20 A2910 RMK AO2 P0000")
280
285
  expect(parser.dew_point.value).to eq(-20)
281
286
  end
282
287
 
288
+ it "accepts a blank dew_point" do
289
+ parser = setup_parser("KSMO 281655Z 18003KT 9SM SCT020 20/ A3002 RMK A02 T0200 $")
290
+ expect(parser.dew_point).to eq(nil)
291
+ end
292
+
283
293
  it 'sea_level_pressure' do
284
294
  parser = setup_parser("PAIL 061610Z 24006KT 1 3/4SM -SN BKN016 OVC030 M17/M20 A2910 RMK AO2 P0000")
285
295
  expect(parser.sea_level_pressure.pressure.to_inches_of_mercury).to eq(29.10)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metar-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Yates
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-18 00:00:00.000000000 Z
11
+ date: 2019-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -236,8 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
236
236
  - !ruby/object:Gem::Version
237
237
  version: '0'
238
238
  requirements: []
239
- rubyforge_project: nowarning
240
- rubygems_version: 2.7.6
239
+ rubygems_version: 3.0.3
241
240
  signing_key:
242
241
  specification_version: 4
243
242
  summary: A Ruby gem for worldwide weather reports