vatsim_metar 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 57627e6896163778f50e6b37c3349e8da304b8c4
4
+ data.tar.gz: d1a474e0bb29753ea4cea6fb7e1fcbe1f6311860
5
+ SHA512:
6
+ metadata.gz: f978899cfff46546f18ed41335052956123c73a1a67e359035f2c7812232148e17200fa81d6c9282fb1600f272619540e5cc02ce7e4e10537e394687d8f05df6
7
+ data.tar.gz: 94fdd06c44d252774cd79a4ed8494e975375dfdef517b6ac73483ab2c5d9152d2adc086d1ea82cec06ee90ff0d7573f575c0d5776791564d092eb0f0feeb3a4d
data/README.md CHANGED
@@ -50,6 +50,12 @@ 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
54
+
55
+ * added timeout limit
56
+ * added connection failure rescue
57
+ * dependency update
58
+
53
59
  ### v. 0.1.0 - 26 February 2013
54
60
 
55
61
  * added Ruby 2.0 support
data/lib/vatsim_metar.rb CHANGED
@@ -9,7 +9,12 @@ end
9
9
 
10
10
  module VatsimMetar
11
11
  def self.metar(icao)
12
- metar = Curl::Easy.perform("http://metar.vatsim.net/#{icao}").body_str
12
+ # metar = Curl::Easy.perform("http://metar.vatsim.net/#{icao}").body_str
13
+ c = Curl::Easy.new("http://metar.vatsim.net/#{icao}")
14
+ c.timeout = 5
15
+ metar = c.perform.body_str
16
+ rescue Curl::Err::TimeoutError
17
+ metar = "METAR timeout"
13
18
  end
14
19
 
15
20
  end
@@ -1,3 +1,3 @@
1
1
  module VatsimMetar
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
data/vatsim_metar.gemspec CHANGED
@@ -17,5 +17,5 @@ Gem::Specification.new do |gem|
17
17
 
18
18
  gem.add_development_dependency "rspec"
19
19
  gem.add_development_dependency "rake"
20
- gem.add_dependency "curb", "~> 0.8.3"
20
+ gem.add_dependency "curb", "~> 0.8.4"
21
21
  end
metadata CHANGED
@@ -1,64 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vatsim_metar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
5
- prerelease:
4
+ version: 0.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Svilen Vassilev
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-02-26 00:00:00.000000000 Z
11
+ date: 2013-08-23 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rspec
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: curb
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
53
- version: 0.8.3
47
+ version: 0.8.4
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
61
- version: 0.8.3
54
+ version: 0.8.4
62
55
  description: Pulls and returns as a string the latest VATSIM metar for a particular
63
56
  station (ICAO code).
64
57
  email:
@@ -81,27 +74,26 @@ files:
81
74
  - vatsim_metar.gemspec
82
75
  homepage: https://github.com/tarakanbg/vatsim_metar
83
76
  licenses: []
77
+ metadata: {}
84
78
  post_install_message:
85
79
  rdoc_options: []
86
80
  require_paths:
87
81
  - lib
88
82
  required_ruby_version: !ruby/object:Gem::Requirement
89
- none: false
90
83
  requirements:
91
- - - ! '>='
84
+ - - '>='
92
85
  - !ruby/object:Gem::Version
93
86
  version: '0'
94
87
  required_rubygems_version: !ruby/object:Gem::Requirement
95
- none: false
96
88
  requirements:
97
- - - ! '>='
89
+ - - '>='
98
90
  - !ruby/object:Gem::Version
99
91
  version: '0'
100
92
  requirements: []
101
93
  rubyforge_project:
102
- rubygems_version: 1.8.25
94
+ rubygems_version: 2.0.3
103
95
  signing_key:
104
- specification_version: 3
96
+ specification_version: 4
105
97
  summary: Pulls the latest VATSIM metar for particular station
106
98
  test_files:
107
99
  - spec/spec_helper.rb