r4s 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/lib/r4s/version.rb +1 -1
  2. data/lib/r4s.rb +4 -2
  3. data/r4s.gemspec +5 -3
  4. metadata +37 -5
data/lib/r4s/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module R4s
2
- VERSION = "1.0.1"
2
+ VERSION = "1.1.0"
3
3
  end
data/lib/r4s.rb CHANGED
@@ -1,10 +1,12 @@
1
+ require 'thread_safe'
2
+ require 'json'
1
3
  class R4S
2
- SSES = {}
4
+ SSES = ThreadSafe::Hash.new
3
5
 
4
6
  def self.add_stream(response,key="none")
5
7
 
6
8
  if !R4S::SSES.keys.include?(key)
7
- R4S::SSES[key] = {}
9
+ R4S::SSES[key] = ThreadSafe::Hash.new
8
10
  key_count = 0
9
11
  else
10
12
  key_count = R4S::SSES[key].keys.count
data/r4s.gemspec CHANGED
@@ -2,7 +2,6 @@
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'r4s/version'
5
- require 'json'
6
5
 
7
6
  Gem::Specification.new do |gem|
8
7
  gem.name = "r4s"
@@ -10,11 +9,14 @@ Gem::Specification.new do |gem|
10
9
  gem.authors = ["Birgir Hrafn Sigurðsson"]
11
10
  gem.email = ["biggihs@gmail.com"]
12
11
  gem.description = %q{R4S is a gem that simplifies sending server side events (SSE) to multiple browsers in Rails 4. It is supposed to simulate broadcasting to all the browsers that are connected to it.}
13
- gem.summary = %q{Wrapper for Rails 4 streaming}
14
- gem.homepage = ""
12
+ gem.summary = %q{Wrapper for Rails 4 streaming using sse-s}
13
+ gem.homepage = "https://github.com/biggihs/r4s"
15
14
 
16
15
  gem.files = `git ls-files`.split($/)
17
16
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
18
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
18
  gem.require_paths = ["lib"]
19
+
20
+ gem.add_dependency "thread_safe"
21
+ gem.add_dependency "json"
20
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: r4s
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,8 +9,40 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-12 00:00:00.000000000 Z
13
- dependencies: []
12
+ date: 2012-11-13 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: thread_safe
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: json
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
14
46
  description: R4S is a gem that simplifies sending server side events (SSE) to multiple
15
47
  browsers in Rails 4. It is supposed to simulate broadcasting to all the browsers
16
48
  that are connected to it.
@@ -28,7 +60,7 @@ files:
28
60
  - lib/r4s.rb
29
61
  - lib/r4s/version.rb
30
62
  - r4s.gemspec
31
- homepage: ''
63
+ homepage: https://github.com/biggihs/r4s
32
64
  licenses: []
33
65
  post_install_message:
34
66
  rdoc_options: []
@@ -51,5 +83,5 @@ rubyforge_project:
51
83
  rubygems_version: 1.8.24
52
84
  signing_key:
53
85
  specification_version: 3
54
- summary: Wrapper for Rails 4 streaming
86
+ summary: Wrapper for Rails 4 streaming using sse-s
55
87
  test_files: []