faye-authentication 1.8.1 → 1.8.2

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: fa81eb7cbde4eb0bbc527d595bb922fd3c8636e8
4
- data.tar.gz: 70a52b2a818dbeccc91ee89d36bb70d31ac98a1f
3
+ metadata.gz: e80fe5c0c924132635df26b96703e2af803cafb8
4
+ data.tar.gz: a0f23cfffafdaf7efbe917f0be2d750ef6556788
5
5
  SHA512:
6
- metadata.gz: f98ee074d5aca35c8ee89103f448c22fb18ec7b9855bd89fe3516003019daeacde74d83fffd7aebdaa5b2a93f8b585a8d82e0c286a23c612d9bd37110111507b
7
- data.tar.gz: 78d7b9267d990354c41852777e4692f907f597395555eea54589bc8915f0f073809654cc85fcdedd91bc165deb65552108b31f4a02a27917a928b57a3fb2e583
6
+ metadata.gz: cf2f581f23d6d1c8bdc99f3506b631b6d03c63b358d1b68d806d931b3d2abd2e999d1d2507b0e242f1d00eb7ae8b8c68418430caecea04a1b8288990b5cfd10f
7
+ data.tar.gz: d279456be467676b2c006e23b6eca2217de618c39579d20a22ab5d9c474a5f0df864148b1624dac6d0349be3afc9bc186d54643abe3aec223c4c91eccd14f877
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.8.1
1
+ 1.8.2
@@ -6,12 +6,17 @@ module Faye
6
6
 
7
7
  def self.publish(url, channel, data, key)
8
8
  uri = URI(url)
9
- req = Net::HTTP::Post.new(uri.request_uri)
9
+ req = prepare_request(uri.request_uri, channel, data, key)
10
+ Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') { |http| http.request(req) }
11
+ end
12
+
13
+ def self.prepare_request(uri, channel, data, key)
14
+ req = Net::HTTP::Post.new(uri)
10
15
  message = {'channel' => channel, 'clientId' => 'http'}
11
16
  message['signature'] = Faye::Authentication.sign(message, key)
12
17
  message['data'] = data
13
18
  req.set_form_data(message: JSON.dump(message))
14
- Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') { |http| http.request(req) }
19
+ req
15
20
  end
16
21
 
17
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faye-authentication
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1
4
+ version: 1.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrien Siami
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-09 00:00:00.000000000 Z
11
+ date: 2016-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -210,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
210
  version: '0'
211
211
  requirements: []
212
212
  rubyforge_project:
213
- rubygems_version: 2.2.2
213
+ rubygems_version: 2.5.1
214
214
  signing_key:
215
215
  specification_version: 4
216
216
  summary: A faye extension to add authentication mechanisms
@@ -230,3 +230,4 @@ test_files:
230
230
  - spec/utils/javascripts/jwt.js
231
231
  - spec/utils/javascripts/mock-ajax.js
232
232
  - spec/utils/javascripts/query-string.js
233
+ has_rdoc: