pubnub 3.8.1 → 3.8.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pubnub might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9104eb65d41a8a540d592b07f6b95625051c5c70
4
- data.tar.gz: d0a2ba8a0d950abc2f554239030300a685c43112
3
+ metadata.gz: 589a06d46675772563abee39dfdb97cf852c1055
4
+ data.tar.gz: bcf337cd2289ccfa8856da7c5721ae19dacf038d
5
5
  SHA512:
6
- metadata.gz: 21d42abc033af70c06c6daa73d0b51dca676eba2c45e6d708a192f2b5d418d357ffa894ed50863480363b5aa29d0b6aa468f0fb92ee39e77545400ed5038ab0a
7
- data.tar.gz: b24155597436bf321320b669989c1ae830042aaadc82d88a5084edc44c2d3bafcb4ebb91668218b754d3df2906412c81918cb525f0971f204f47f174d6206f5a
6
+ metadata.gz: 8e587fab2eb014182b979d9769d25a7596a1ce17f934deb1ec8b0233aac1801fed3c8f36e582893e35c6dd593897f9b63ae7b2cccca28ceb9c8eba54422022a3
7
+ data.tar.gz: 1b1a3fd598b818b09c99312b6a5b59163c49d0f6b8dea96fb6dddfc737fe6ad9833485ed01e51829e8a49a9960ba740194f831273eec15ad66cfd460bfa4ca59
data/.gitignore CHANGED
@@ -7,3 +7,4 @@ log/*
7
7
  *.log
8
8
  examples/test.rb
9
9
  coverage
10
+ dev_scripts
@@ -1,3 +1,6 @@
1
+ ##### 3.8.2
2
+ * Decoding fixed
3
+
1
4
  ##### 3.8.1
2
5
  * Updated celluloid dependency
3
6
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pubnub (3.8.1)
4
+ pubnub (3.8.2)
5
5
  celluloid (~> 0.17)
6
6
  httpclient (~> 2.6)
7
7
  json (~> 1.8)
@@ -29,7 +29,7 @@ GEM
29
29
  timers (>= 4.1.1)
30
30
  celluloid-pool (0.20.5)
31
31
  timers (>= 4.1.1)
32
- celluloid-supervision (0.20.5)
32
+ celluloid-supervision (0.20.6)
33
33
  timers (>= 4.1.1)
34
34
  coderay (1.1.0)
35
35
  coveralls (0.8.10)
@@ -46,10 +46,10 @@ GEM
46
46
  domain_name (0.5.25)
47
47
  unf (>= 0.0.5, < 1.0.0)
48
48
  ffi (1.9.10-java)
49
- hitimes (1.2.3)
49
+ hitimes (1.2.4)
50
50
  http-cookie (1.0.2)
51
51
  domain_name (~> 0.5)
52
- httpclient (2.7.1)
52
+ httpclient (2.8.1)
53
53
  json (1.8.3)
54
54
  json (1.8.3-java)
55
55
  method_source (0.8.2)
@@ -135,4 +135,4 @@ DEPENDENCIES
135
135
  webmock
136
136
 
137
137
  BUNDLED WITH
138
- 1.11.2
138
+ 1.12.5
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # Please direct all Support Questions and Concerns to Support@PubNub.com
5
5
 
6
- ## PubNub Gem version 3.8.1
6
+ ## PubNub Gem version 3.8.2
7
7
 
8
8
  ##### YOU MUST HAVE A PUBNUB ACCOUNT TO USE THE API.
9
9
  ##### http://www.pubnub.com/account
@@ -43,7 +43,7 @@ module Pubnub
43
43
  plain_text = decode_cipher.update(undecoded_text)
44
44
  plain_text << decode_cipher.final
45
45
  rescue => e
46
- Pubnub.error('Pubnub') { "DECRYPTION ERROR #{e}" }
46
+ Pubnub.logger.error('Pubnub') { "DECRYPTION ERROR #{e}" }
47
47
  '"DECRYPTION ERROR"'
48
48
  end
49
49
 
@@ -59,7 +59,14 @@ module Pubnub
59
59
  end
60
60
 
61
61
  def valid_envelopes(parsed_response)
62
+
63
+ crypto = Pubnub::Crypto.new(@app.env[:cipher_key]) if @app.env[:cipher_key]
64
+
62
65
  parsed_response.first.map do |message|
66
+ if crypto && message
67
+ message = crypto.decrypt(message)
68
+ end
69
+
63
70
  Envelope.new(parsed_response: parsed_response,
64
71
  message: message,
65
72
  channel: @channel.first,
@@ -21,6 +21,10 @@ module Pubnub
21
21
  group = nil
22
22
  end
23
23
 
24
+ if @app.env[:cipher_key] && msg
25
+ msg = Pubnub::Crypto.new(@app.env[:cipher_key]).decrypt(msg)
26
+ end
27
+
24
28
  Envelope.new(
25
29
  parsed_response: parsed_response,
26
30
  message: msg,
@@ -1,4 +1,4 @@
1
1
  # Toplevel Pubnub module.
2
2
  module Pubnub
3
- VERSION = '3.8.1'
3
+ VERSION = '3.8.2'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pubnub
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.1
4
+ version: 3.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - PubNub
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-15 00:00:00.000000000 Z
11
+ date: 2016-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: celluloid