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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d243e78c36fc444f097e3f4ec316973673498af6
4
- data.tar.gz: 02d031b67d92c9ac4ee14dfe5d3972cad0a68cdc
3
+ metadata.gz: a34b86d89c0ed098c30d32e71022d92cde5a51fe
4
+ data.tar.gz: b89ef355a2815017afd6054a770601bf21984962
5
5
  SHA512:
6
- metadata.gz: 53ee59a90ef1aa2490dda3652a82581c08a774a03db2503f09b44f81c1c01133e6b8e7450551584a040b722408da246927145a5e3f112594b73f03b0af9b570f
7
- data.tar.gz: b67746f64a99291e0219e4cf8ec883dc75d9129bfed9c96ec030c76d91daa742e274c9748e9f72dd81150934bbcf80be86c47132e3b7f8959c7c48bf4606bed6
6
+ metadata.gz: aa5196ffe5888694bfecb382b8beb6eb7487c0591ca9eae09ced7cf82fb52d7a92e9ad2c588c05f55abcf06c120c3a52abcf8f4b4722a461bd4b9fcf27b502ec
7
+ data.tar.gz: c322301eb602c8f87fd00acbf9e6d9d212bd8309bbfaa0588f0140ab441ad8f8a187731dc9ce584de528037792422a6d4bf97a1fa1fc35028cce1941e369df38
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ * 1.0.3 Fixed another bug with the way the message content was being
4
+ escaped/sent.
5
+
3
6
  * 1.0.2 Fixed a bug in the way the query was escaped.
4
7
 
5
8
  * 1.0.1 Added `Pubnub::Publisher.publish_key`,
@@ -1,7 +1,7 @@
1
1
  require "net/https"
2
2
  require "net/http"
3
3
  require "uri"
4
- require "cgi"
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) << "/#{CGI.escape(message.to_json)}"
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
 
@@ -1,5 +1,5 @@
1
1
  module Pubnub
2
2
  class Publisher
3
- VERSION = "1.0.2"
3
+ VERSION = "1.0.3"
4
4
  end
5
5
  end
@@ -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:%22hey%22%7D")
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.2
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-24 00:00:00.000000000 Z
11
+ date: 2013-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler