pubnub-ruby 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/pubnub.rb +4 -2
  2. metadata +5 -5
data/lib/pubnub.rb CHANGED
@@ -29,7 +29,7 @@ class Pubnub
29
29
  #* @param string secret_key required key to sign messages.
30
30
  #* @param boolean ssl required for 2048 bit encrypted messages.
31
31
  #*
32
- def initialize( publish_key, subscribe_key, secret_key, ssl_on )
32
+ def initialize( publish_key, subscribe_key, secret_key, ssl_on = false)
33
33
  @publish_key = publish_key
34
34
  @subscribe_key = subscribe_key
35
35
  @secret_key = secret_key
@@ -44,7 +44,9 @@ class Pubnub
44
44
  end
45
45
 
46
46
  uri = URI.parse(@origin)
47
- @connection = Net::HTTP.start(uri.host, uri.port)
47
+ http = Net::HTTP.new(uri.host, uri.port)
48
+ http.use_ssl = ssl_on
49
+ @connection = http.start()
48
50
  end
49
51
 
50
52
  #**
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pubnub-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-04-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
16
- requirement: &19743640 !ruby/object:Gem::Requirement
16
+ requirement: &18730320 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,9 +21,9 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *19743640
25
- description: Simply Pubnub.rb in gem format, :require => "pubnub" - ask @rubynerd
26
- for upgrades
24
+ version_requirements: *18730320
25
+ description: Simply Pubnub.rb in gem format, require "pubnub" - ask @rubynerd for
26
+ upgrades
27
27
  email: x@rubynerd.net
28
28
  executables: []
29
29
  extensions: []