sunbro 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sunbro.rb +10 -4
  3. data/lib/sunbro/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b1c6c6f4683dda9c20055c2f766462986b23bc86
4
- data.tar.gz: 27a8682eae376d1cb0675e99e56a04ebe89ee832
3
+ metadata.gz: 90a10b3e643f709e46b6a0cefe53e09755a333df
4
+ data.tar.gz: 124e852db53309e2284fb3daf372b61b30af669e
5
5
  SHA512:
6
- metadata.gz: cc97aa66162c983c490bd713c372624bdf65e66145ddb6c51e2de4984002ed10c984d97069345c0a6bfd54c7c1a12fd4edc2ae4efdc1aaffef7d4a59da7249f9
7
- data.tar.gz: 587c366d59f326b0141e231b19b42aa1b5b148acb717fac8b7d01c48e8cf4476d83ea499a208283a785f43dd1f556ac569eac4b7307d95406cfa5bd937b2df6b
6
+ metadata.gz: 5294a0e2819a7ca39c3e59f73952c7b5ae73569a6337bc24128ef77e45d905de18ec2796648e53cfe53d26012a38523b815fe0c37e81a33d33302da591e0dfc5
7
+ data.tar.gz: f4596d13a476704c094b1661e5c1a7297f0aa487984c7363c1eeb558853f7d30833dd238539546902ae178e6b0ebaa7c9f127400438100c34a639807bb263277
data/lib/sunbro.rb CHANGED
@@ -17,13 +17,11 @@ module Sunbro
17
17
  MAX_RETRIES = 5
18
18
 
19
19
  def get_page(link, opts={})
20
- @http ||= HTTP.new
21
- fetch_with_connection(@http, link, opts)
20
+ fetch_with_connection(http, link, opts)
22
21
  end
23
22
 
24
23
  def render_page(link, opts={})
25
- @dhttp ||= DynamicHTTP.new
26
- fetch_with_connection(@dhttp, link, opts)
24
+ fetch_with_connection(dhttp, link, opts)
27
25
  end
28
26
 
29
27
  def fetch_with_connection(conn, link, opts)
@@ -36,6 +34,14 @@ module Sunbro
36
34
  page
37
35
  end
38
36
 
37
+ def http
38
+ @http ||= HTTP.new
39
+ end
40
+
41
+ def dhttp
42
+ @dhttp ||= DynamicHTTP.new
43
+ end
44
+
39
45
  def close_http_connections
40
46
  @http.close if @http
41
47
  @dhttp.close if @dhttp
@@ -1,3 +1,3 @@
1
1
  module Sunbro
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sunbro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Stokes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-06 00:00:00.000000000 Z
11
+ date: 2015-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement