weatherzone 0.8.4 → 0.8.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/weatherzone.rb +1 -2
- data/lib/weatherzone/connection.rb +3 -4
- metadata +4 -4
data/lib/weatherzone.rb
CHANGED
@@ -8,7 +8,6 @@ require 'timeout'
|
|
8
8
|
require 'nokogiri'
|
9
9
|
require 'sax-machine'
|
10
10
|
require 'tzinfo'
|
11
|
-
require 'net/http/persistent'
|
12
11
|
|
13
12
|
unless defined?(ActiveSupport)
|
14
13
|
require 'ext/class'
|
@@ -22,5 +21,5 @@ require 'weatherzone/helpers/date_parser'
|
|
22
21
|
require 'weatherzone/helpers/units'
|
23
22
|
|
24
23
|
module Weatherzone
|
25
|
-
VERSION = '0.8.
|
24
|
+
VERSION = '0.8.5'
|
26
25
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'singleton'
|
2
|
+
require 'open-uri'
|
2
3
|
|
3
4
|
module Weatherzone
|
4
5
|
|
@@ -30,7 +31,6 @@ module Weatherzone
|
|
30
31
|
@keygen = keygen
|
31
32
|
@logger = options[:logger]
|
32
33
|
@timeout_after = options[:timeout_after] || DEFAULT_TIMEOUT_AFTER
|
33
|
-
@http = Net::HTTP::Persistent.new
|
34
34
|
end
|
35
35
|
|
36
36
|
def self.settings
|
@@ -57,8 +57,7 @@ module Weatherzone
|
|
57
57
|
uri = URI.parse(wz_url_for(params))
|
58
58
|
info("GET #{uri}")
|
59
59
|
timeout(self.timeout_after) do
|
60
|
-
|
61
|
-
response.body
|
60
|
+
uri.read
|
62
61
|
end
|
63
62
|
rescue Timeout::Error, SocketError => e
|
64
63
|
error("webservice connection failed #{e}")
|
@@ -78,4 +77,4 @@ module Weatherzone
|
|
78
77
|
end
|
79
78
|
|
80
79
|
end
|
81
|
-
end
|
80
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weatherzone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 53
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 8
|
9
|
-
-
|
10
|
-
version: 0.8.
|
9
|
+
- 5
|
10
|
+
version: 0.8.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ben Askins
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-07-05 00:00:00 +10:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|