roda-component 0.1.8 → 0.1.9

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: 4d2295718996694bcaf5a8f826f77ee2f488b415
4
- data.tar.gz: d4232e47a4af010f6cbec1f8d3231fc8975b9f2d
3
+ metadata.gz: 48bdf7e4bf5d3a8d77d62b6fa036e3bfad07aec7
4
+ data.tar.gz: e6cc2db88e401cc6cff3ad70fea9ec2b31ee8fcf
5
5
  SHA512:
6
- metadata.gz: a1404cb9742440c6f27210f56e2904c01543240aad4a675a8c0e6f8b11773fb2b165390886ec2fe46b7f66333cf58ea94955b5d1e548cfc994710be73cbe71d9
7
- data.tar.gz: 327320da0c95ea40a015a8516627c730cc6e7fb2e7020d5bb78e556b2d9036cc371c5815272e3dbbddb629e272fe0e30e44a1a7891a895ba12a14f5617cc9337
6
+ metadata.gz: 7ea68b936a84115967c4f0813c5b53039ed375d10895f511acc26f1fabc0e374094b7172acd4d17b2d398be89b66571e432dd08e333a054e23b5c60af696257f
7
+ data.tar.gz: ceec2e4a8e32000bdeb69ab4fb080434a3311ecdd204660014cc7822ccebdb9114be2aa6e02385d2d28d9caf9d2c440bbcfad2fca599f3c2db67c78771f3ec63
data/Gemfile CHANGED
@@ -4,7 +4,6 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  gem 'roda-bin'
7
- gem "oga", ">= 0.2.0", require: false
8
7
  gem "nokogiri", "~> 1.6.5", require: false
9
8
  gem 'awesome_print'
10
9
  gem 'tilt'
@@ -202,8 +202,8 @@ else
202
202
 
203
203
  data = app.roda_component(:"#{component_name}", { trigger: (joining ? :join : :leave), public_id: public_id, private_id: private_id })
204
204
 
205
- client = ::Faye::Client.new("#{request.env['HTTP_ORIGIN']}/faye")
206
- client.set_header 'X-CSRF-TOKEN', message['ext']['csrfToken']
205
+ url = "http#{request.env['SERVER_PORT'] == '443' ? 's' : ''}://#{request.env['SERVER_NAME']}:#{request.env['SERVER_PORT']}/faye"
206
+ client = ::Faye::Client.new(url)
207
207
  client.publish "/components/#{component_name}", type: (joining ? 'join' : 'leave'), public_id: public_id, token: app.component_opts[:token], local: data
208
208
  end
209
209
 
@@ -1,5 +1,5 @@
1
1
  class Roda
2
2
  class Component
3
- VERSION = "0.1.8"
3
+ VERSION = "0.1.9"
4
4
  end
5
5
  end
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.add_runtime_dependency "opal", "~> 0.7.0.beta3"
22
22
  spec.add_runtime_dependency "opal-jquery", "~> 0.3.0.beta1"
23
23
  spec.add_runtime_dependency "redis-rack"
24
- spec.add_runtime_dependency "faye"
24
+ spec.add_runtime_dependency "faye", '~> 1.1.0'
25
25
  spec.add_runtime_dependency "faye-redis"
26
26
  spec.add_runtime_dependency "redic", "~> 1.1.1"
27
27
  spec.add_development_dependency "bundler", "~> 1.7"
data/test/dummy/app.rb CHANGED
@@ -37,7 +37,7 @@ class TestApp < Roda
37
37
  # use BetterErrors::Middleware
38
38
  use Shield::Middleware, "/login"
39
39
  use Rack::Session::Cookie,
40
- key: "test:roda:components",
40
+ key: "test:roda:component",
41
41
  secret: "na"
42
42
 
43
43
  plugin :csrf, header: 'X-CSRF-TOKEN', skip: ['POST:/faye']
data/test/dummy/dummy.db CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roda-component
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj
@@ -56,16 +56,16 @@ dependencies:
56
56
  name: faye
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: 1.1.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: 1.1.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: faye-redis
71
71
  requirement: !ruby/object:Gem::Requirement