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 +4 -4
- data/lib/peritus_private_pub.rb +4 -0
- data/peritus_private_pub-1.0.3.gem +0 -0
- data/peritus_private_pub.gemspec +1 -1
- metadata +2 -2
- data/peritus_private_pub-1.0.2.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2d74b2ca28c9454171edb4bb8eb0e38bbd62bcb
|
4
|
+
data.tar.gz: 426e6520b232983706ccd0154cd61aa0de7824c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a104218d7fda5508ef4bf28515d541954a33e72bba3b5f0d303820511eaf4fb9a19f5f9b0d13d2c28f5683353132a6a90ccc7d035a44315ef212e4238cf439dd
|
7
|
+
data.tar.gz: da07fdb106ae2b6e6f82daea5a1f53dbf8252164d8fc3fa3731a17c7c093ef8d41e37d730b5b0696d15b678cf07f039bee49ceaeb69439115ffa532f8513ba58
|
data/lib/peritus_private_pub.rb
CHANGED
@@ -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
|
data/peritus_private_pub.gemspec
CHANGED
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.
|
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.
|
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
|