peritus_private_pub 1.0.3 → 1.0.4

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: 335ef15119f83b52a8ad14273e3c9ddb5db48650
4
- data.tar.gz: ca7bc9550e9d68e1c3764f780e7d35592a3c50f0
3
+ metadata.gz: d2d74b2ca28c9454171edb4bb8eb0e38bbd62bcb
4
+ data.tar.gz: 426e6520b232983706ccd0154cd61aa0de7824c7
5
5
  SHA512:
6
- metadata.gz: 6d3652d2db5fff633ec4e622297dffd1979c475a11a6c04b3384e2e1f65369adb9c32d8c8af90c1e85fdcdc0930b1b17588eb862355d3452d044054dd157e1b1
7
- data.tar.gz: 8b0473322ed443f29728b0521128259d2efba946da4a5cd16c2f1bb6aed140718d88900ab41144c5058a73714b7f9daff99f6caa28844c4853a700d97df8c2a4
6
+ metadata.gz: a104218d7fda5508ef4bf28515d541954a33e72bba3b5f0d303820511eaf4fb9a19f5f9b0d13d2c28f5683353132a6a90ccc7d035a44315ef212e4238cf439dd
7
+ data.tar.gz: da07fdb106ae2b6e6f82daea5a1f53dbf8252164d8fc3fa3731a17c7c093ef8d41e37d730b5b0696d15b678cf07f039bee49ceaeb69439115ffa532f8513ba58
@@ -34,6 +34,8 @@ module PrivatePub
34
34
  def publish_message(message)
35
35
  if config[:server].nil? or config[:server].blank?
36
36
  raise Error, "No server specified, ensure private_pub.yml was loaded properly and that LOCAL_IP is defined."
37
+ end
38
+
37
39
  url = URI.parse(config[:server])
38
40
 
39
41
  form = Net::HTTP::Post.new(url.path.empty? ? '/' : url.path)
@@ -60,6 +62,8 @@ module PrivatePub
60
62
  def subscription(options = {})
61
63
  if config[:server].nil? or config[:server].blank?
62
64
  raise Error, "No server specified, ensure private_pub.yml was loaded properly and that LOCAL_IP is defined."
65
+ end
66
+
63
67
  sub = {:server => config[:server], :timestamp => (Time.now.to_f * 1000).round}.merge(options)
64
68
  sub[:signature] = Digest::SHA1.hexdigest([config[:secret_token], sub[:channel], sub[:timestamp]].join)
65
69
  sub
Binary file
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "peritus_private_pub"
3
- s.version = "1.0.3"
3
+ s.version = "1.0.4"
4
4
  s.author = "Tyler DeWitt"
5
5
  s.email = "tdewitt@peritus.com"
6
6
  s.homepage = "https://github.com/PeritusSolutions/peritus_private_pub"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peritus_private_pub
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler DeWitt
@@ -85,7 +85,7 @@ files:
85
85
  - lib/private_pub/engine.rb
86
86
  - lib/private_pub/faye_extension.rb
87
87
  - lib/private_pub/view_helpers.rb
88
- - peritus_private_pub-1.0.2.gem
88
+ - peritus_private_pub-1.0.3.gem
89
89
  - peritus_private_pub.gemspec
90
90
  - spec/fixtures/private_pub.yml
91
91
  - spec/javascripts/private_pub_spec.js
Binary file