pubnub-publisher 1.0.1 → 1.0.2
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -2
- data/lib/pubnub/publisher/version.rb +1 -1
- data/lib/pubnub/publisher.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d243e78c36fc444f097e3f4ec316973673498af6
|
4
|
+
data.tar.gz: 02d031b67d92c9ac4ee14dfe5d3972cad0a68cdc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53ee59a90ef1aa2490dda3652a82581c08a774a03db2503f09b44f81c1c01133e6b8e7450551584a040b722408da246927145a5e3f112594b73f03b0af9b570f
|
7
|
+
data.tar.gz: b67746f64a99291e0219e4cf8ec883dc75d9129bfed9c96ec030c76d91daa742e274c9748e9f72dd81150934bbcf80be86c47132e3b7f8959c7c48bf4606bed6
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
* 1.0.
|
3
|
+
* 1.0.2 Fixed a bug in the way the query was escaped.
|
4
|
+
|
5
|
+
* 1.0.1 Added `Pubnub::Publisher.publish_key`,
|
4
6
|
`Pubnub::Publisher.subscribe`, and `Pubnub::Publisher.ssl` accessors so
|
5
7
|
we can easily accessed the shared config main keys.
|
6
8
|
|
7
|
-
* 1.0
|
9
|
+
* 1.0 First release
|
data/lib/pubnub/publisher.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require "net/https"
|
2
2
|
require "net/http"
|
3
3
|
require "uri"
|
4
|
+
require "cgi"
|
4
5
|
require "json"
|
5
6
|
require "securerandom"
|
6
7
|
require "pubnub/publisher/version"
|
@@ -108,7 +109,7 @@ module Pubnub
|
|
108
109
|
raise ArgumentError if (channel.nil? || channel == "" || message.nil? || message == "")
|
109
110
|
|
110
111
|
# prepare a GET request (come on pubnub, GET???)
|
111
|
-
url = publish_url(channel) << "/#{
|
112
|
+
url = publish_url(channel) << "/#{CGI.escape(message.to_json)}"
|
112
113
|
uri = URI.parse(url)
|
113
114
|
http = Net::HTTP.new(uri.host, uri.port)
|
114
115
|
|