hyper-graph 0.1.1 → 0.1.2

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.md +1 -1
  2. data/lib/hyper_graph.rb +7 -2
  3. metadata +3 -3
data/README.md CHANGED
@@ -73,4 +73,4 @@ Note on Patches/Pull Requests
73
73
  Copyright
74
74
  -----------------------------
75
75
 
76
- © 2010 Chris Dinn. See [LICENSE](http://github.com/chrisdinn/SocialGraph/blob/master/LICENSE) for details.
76
+ © 2010 Chris Dinn. See [LICENSE](http://github.com/chrisdinn/hyper-graph/blob/master/LICENSE) for details.
data/lib/hyper_graph.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'net/http'
2
+ require 'net/https'
2
3
  require 'time'
3
4
  require 'json'
4
5
 
@@ -14,7 +15,9 @@ class HyperGraph
14
15
  class << self
15
16
  # Request an object from the social graph
16
17
  def get(requested_object_id, options = {})
17
- http = Net::HTTP.new(API_URL)
18
+ http = Net::HTTP.new(API_URL, 443)
19
+ http.use_ssl = true
20
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
18
21
  request_path = "/#{requested_object_id}"
19
22
 
20
23
  query = build_query(options)
@@ -27,7 +30,9 @@ class HyperGraph
27
30
 
28
31
  # Post an object to the graph
29
32
  def post(requested_object_id, options = {})
30
- http = Net::HTTP.new(API_URL)
33
+ http = Net::HTTP.new(API_URL, 443)
34
+ http.use_ssl = true
35
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
31
36
  request_path = "/#{requested_object_id}"
32
37
  http_response = http.post(request_path, build_query(options))
33
38
  if http_response.body=='true'
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 1
9
- version: 0.1.1
8
+ - 2
9
+ version: 0.1.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Chris Dinn
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-24 00:00:00 -04:00
17
+ date: 2010-04-25 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency