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.
Files changed (3) hide show
  1. data/README.rdoc +1 -1
  2. data/lib/rcicindela.rb +5 -3
  3. metadata +1 -1
data/README.rdoc CHANGED
@@ -13,7 +13,7 @@ See Also: http://code.google.com/p/cicindela2/
13
13
 
14
14
  Initialization:
15
15
 
16
- cicindela = RCicindela.new('http://localhost/cicindela')
16
+ cicindela = RCicindela.new('localhost', :port => 30000, :timeout => 3)
17
17
 
18
18
  Accumulating data:
19
19
 
data/lib/rcicindela.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'net/http'
2
2
 
3
3
  class RCicindela
4
- VERSION = '0.3.0'
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.start(host, port) do |http|
57
- http.open_timeout = http.read_timeout = timeout
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jugyo-rcicindela
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - jugyo