jugyo-rcicindela 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -1
- data/lib/rcicindela.rb +5 -3
- metadata +1 -1
data/README.rdoc
CHANGED
data/lib/rcicindela.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'net/http'
|
2
2
|
|
3
3
|
class RCicindela
|
4
|
-
VERSION = '0.3.
|
4
|
+
VERSION = '0.3.1'
|
5
5
|
|
6
6
|
class APIError < StandardError
|
7
7
|
attr_reader :response
|
@@ -53,8 +53,10 @@ class RCicindela
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def get(path)
|
56
|
-
Net::HTTP.
|
57
|
-
|
56
|
+
http = Net::HTTP.new(host, port)
|
57
|
+
http.open_timeout = timeout
|
58
|
+
http.read_timeout = timeout
|
59
|
+
http.start do |http|
|
58
60
|
response = http.get(path)
|
59
61
|
if response.code =~ /^2/
|
60
62
|
response.body
|