pubnub-publisher 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/pubnub/publisher.rb +2 -2
- data/lib/pubnub/publisher/version.rb +1 -1
- data/spec/publisher_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a34b86d89c0ed098c30d32e71022d92cde5a51fe
|
4
|
+
data.tar.gz: b89ef355a2815017afd6054a770601bf21984962
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa5196ffe5888694bfecb382b8beb6eb7487c0591ca9eae09ced7cf82fb52d7a92e9ad2c588c05f55abcf06c120c3a52abcf8f4b4722a461bd4b9fcf27b502ec
|
7
|
+
data.tar.gz: c322301eb602c8f87fd00acbf9e6d9d212bd8309bbfaa0588f0140ab441ad8f8a187731dc9ce584de528037792422a6d4bf97a1fa1fc35028cce1941e369df38
|
data/CHANGELOG.md
CHANGED
data/lib/pubnub/publisher.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require "net/https"
|
2
2
|
require "net/http"
|
3
3
|
require "uri"
|
4
|
-
require "
|
4
|
+
require "erb"
|
5
5
|
require "json"
|
6
6
|
require "securerandom"
|
7
7
|
require "pubnub/publisher/version"
|
@@ -109,7 +109,7 @@ module Pubnub
|
|
109
109
|
raise ArgumentError if (channel.nil? || channel == "" || message.nil? || message == "")
|
110
110
|
|
111
111
|
# prepare a GET request (come on pubnub, GET???)
|
112
|
-
url = publish_url(channel) << "/#{
|
112
|
+
url = publish_url(channel) << "/#{ERB::Util.url_encode(message.to_json)}"
|
113
113
|
uri = URI.parse(url)
|
114
114
|
http = Net::HTTP.new(uri.host, uri.port)
|
115
115
|
|
data/spec/publisher_spec.rb
CHANGED
@@ -121,7 +121,7 @@ describe Pubnub::Publisher do
|
|
121
121
|
expect(http.address).to eq("demo.pubnub.com")
|
122
122
|
expect(http.use_ssl?).to be_true
|
123
123
|
expect(http.port).to eq(443)
|
124
|
-
expect(request.path).to eq("/publish/demo_pub_key/demo_sub_key/0/mychannel/0/%7B%22text%22
|
124
|
+
expect(request.path).to eq("/publish/demo_pub_key/demo_sub_key/0/mychannel/0/%7B%22text%22%3A%22hey%22%7D")
|
125
125
|
expect(request).to be_instance_of(Net::HTTP::Get)
|
126
126
|
end
|
127
127
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pubnub-publisher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Aimonetti
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|