private_pub_plus 1.0.0 → 1.0.1
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/README.md +19 -0
- data/lib/generators/private_pub_plus/templates/private_pub.yml +2 -3
- data/lib/private_pub_plus/version.rb +1 -1
- data/lib/private_pub_plus.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c97c84aea4b75d86ce49d90c16f41a4bbf51e994
|
|
4
|
+
data.tar.gz: d6a822da441a475cc469704ed75f2e8ff94dedd5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0702587e429fef911ec7674e297a7a5d55da2a9b9af60f60cf83f7ee4d851bf9295096aab29929422b9374cd2aaf3805699627766c97c61cd210a27cc328ef65
|
|
7
|
+
data.tar.gz: ac5b6c5ea43d7e32386d3ab88c759cee004b98a44551293a3e54c083d9d920fa9760d2a2e92998a2100293c1d7bca4c8e436361700937b409fc3e970b7ac0b1b
|
data/README.md
CHANGED
|
@@ -41,3 +41,22 @@ PrivatePubPlus.publish_to "/messages/new", :chat_message => "Hello, world!" do |
|
|
|
41
41
|
end
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
+
## To configure backend/engine for the Faye messaging server
|
|
45
|
+
|
|
46
|
+
To use custom backend for messaging server like (Faye::Redis) make following changes in private_pub.ru
|
|
47
|
+
|
|
48
|
+
```ruby
|
|
49
|
+
options = {
|
|
50
|
+
mount: '/',
|
|
51
|
+
timeout: 25,
|
|
52
|
+
engine: {
|
|
53
|
+
type: Faye::Redis,
|
|
54
|
+
host: 'redis.example.com',
|
|
55
|
+
# more options
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
# Run app with options
|
|
60
|
+
run PrivatePubPlus.faye_app(options)
|
|
61
|
+
```
|
|
62
|
+
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
development:
|
|
2
2
|
server: "http://localhost:9292/faye"
|
|
3
|
-
secret_token: "
|
|
3
|
+
secret_token: "<%= defined?(SecureRandom) ? SecureRandom.hex(32) : ActiveSupport::SecureRandom.hex(32) %>"
|
|
4
4
|
test:
|
|
5
5
|
server: "http://localhost:9292/faye"
|
|
6
|
-
secret_token: "
|
|
6
|
+
secret_token: "<%= defined?(SecureRandom) ? SecureRandom.hex(32) : ActiveSupport::SecureRandom.hex(32) %>"
|
|
7
7
|
production:
|
|
8
8
|
server: "http://example.com/faye"
|
|
9
9
|
secret_token: "<%= defined?(SecureRandom) ? SecureRandom.hex(32) : ActiveSupport::SecureRandom.hex(32) %>"
|
|
10
|
-
signature_expiration: 3600 # one hour
|
data/lib/private_pub_plus.rb
CHANGED
|
@@ -45,6 +45,7 @@ module PrivatePubPlus
|
|
|
45
45
|
form.set_form_data(:message => message.to_json)
|
|
46
46
|
|
|
47
47
|
http = Net::HTTP.new(url.host, url.port)
|
|
48
|
+
http.read_timeout = config[:timeout] if config[:timeout].present? && config[:timeout].is_a?(Integer)
|
|
48
49
|
http.use_ssl = url.scheme == "https"
|
|
49
50
|
http.start {|h| h.request(form)}
|
|
50
51
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: private_pub_plus
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Amrit Singh
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2017-02-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faye
|
|
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
93
93
|
version: 1.3.4
|
|
94
94
|
requirements: []
|
|
95
95
|
rubyforge_project: private_pub_plus
|
|
96
|
-
rubygems_version: 2.4.
|
|
96
|
+
rubygems_version: 2.4.8
|
|
97
97
|
signing_key:
|
|
98
98
|
specification_version: 4
|
|
99
99
|
summary: Private pub/sub messaging in Rails.
|