private_pub_plus 1.0.0 → 1.0.1

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: b4ac9b51e06591b63f0129bf5d46d41ff2abb3bf
4
- data.tar.gz: 8ab9a851ac353c79bde3218e7eaf98eadde9d998
3
+ metadata.gz: c97c84aea4b75d86ce49d90c16f41a4bbf51e994
4
+ data.tar.gz: d6a822da441a475cc469704ed75f2e8ff94dedd5
5
5
  SHA512:
6
- metadata.gz: 92681a6f81ef940a9e07357626cec5bca7ffc9983118bf3a38c0e2c09d9ffe35cab9b4e979e6db227ea0800f81d2ed948c7dac4cec862053b2c43aabc23353f2
7
- data.tar.gz: 88ed9116c56e5bbee7f11e8da6d5f79a4952cf8483fee5ca0afe1b43eff887c5fbacdc9b83ff21d60e04c4c250529f97c111acbb4f6651f5d6f038478061e4a7
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: "secret"
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: "secret"
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
@@ -1,3 +1,3 @@
1
1
  module PrivatePubPlus
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -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.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: 2015-04-15 00:00:00.000000000 Z
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.5
96
+ rubygems_version: 2.4.8
97
97
  signing_key:
98
98
  specification_version: 4
99
99
  summary: Private pub/sub messaging in Rails.