vatsim_metar 0.2.0 → 0.2.1

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
  SHA1:
3
- metadata.gz: 57627e6896163778f50e6b37c3349e8da304b8c4
4
- data.tar.gz: d1a474e0bb29753ea4cea6fb7e1fcbe1f6311860
3
+ metadata.gz: 5dfe2224c64b4d45571b8fce0c689c0fe687d182
4
+ data.tar.gz: a7591b9f7e1ad01f3dee58948b0efe4ab4cd956d
5
5
  SHA512:
6
- metadata.gz: f978899cfff46546f18ed41335052956123c73a1a67e359035f2c7812232148e17200fa81d6c9282fb1600f272619540e5cc02ce7e4e10537e394687d8f05df6
7
- data.tar.gz: 94fdd06c44d252774cd79a4ed8494e975375dfdef517b6ac73483ab2c5d9152d2adc086d1ea82cec06ee90ff0d7573f575c0d5776791564d092eb0f0feeb3a4d
6
+ metadata.gz: 4888f047dff238d25b7b09e4de23d7abf66a8319e64369ec6919a989ac63b5d8b876817d21b59a8fdf03a6a34617e82ae92ad84d12a92b454d99b1a81aa3f678
7
+ data.tar.gz: 7f328249e56c75803d54c3f9840833344a33a54e7d6a5158fbdbf1e345680b2c7e9aadc5978928947804a64ae5330992f8d231624b24c107f2e3de4bf9256da3
data/README.md CHANGED
@@ -50,10 +50,11 @@ This library augments the default Ruby `String` class with a method named `.meta
50
50
 
51
51
  ## Changelog
52
52
 
53
- ### v. 0.2.0 - 23 August 2013
53
+ ### v. 0.2.1 - 23 August 2013
54
54
 
55
55
  * added timeout limit
56
56
  * added connection failure rescue
57
+ * check for METAR validity
57
58
  * dependency update
58
59
 
59
60
  ### v. 0.1.0 - 26 February 2013
@@ -12,7 +12,9 @@ module VatsimMetar
12
12
  # metar = Curl::Easy.perform("http://metar.vatsim.net/#{icao}").body_str
13
13
  c = Curl::Easy.new("http://metar.vatsim.net/#{icao}")
14
14
  c.timeout = 5
15
- metar = c.perform.body_str
15
+ c.perform
16
+ metar = c.body_str
17
+ metar = "No valid METAR" if metar.include? "html"
16
18
  rescue Curl::Err::TimeoutError
17
19
  metar = "METAR timeout"
18
20
  end
@@ -1,3 +1,3 @@
1
1
  module VatsimMetar
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vatsim_metar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Svilen Vassilev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-23 00:00:00.000000000 Z
11
+ date: 2013-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec