garufa 1.1.0.rc.4 → 1.1.0.rc.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
20
20
  "README.md",
21
21
  "Rakefile",
22
22
  "lib/**/*.rb",
23
+ "lib/**/*.yajl",
23
24
  "bin/*",
24
25
  "*.gemspec",
25
26
  "test/*.*"
@@ -0,0 +1,13 @@
1
+ channels = {}
2
+
3
+ stats.each do |channel, values|
4
+ next unless channel.start_with? filter[:prefix].to_s
5
+
6
+ channels[channel] = {}
7
+
8
+ if filter[:info].include?('user_count') && values[:presence]
9
+ channels[channel][:user_count] = values[:presence][:count]
10
+ end
11
+ end
12
+
13
+ json[:channels] = channels
@@ -0,0 +1,4 @@
1
+ json = {
2
+ occupied: stats[:size] > 0,
3
+ subscription_count: stats[:size]
4
+ }
@@ -0,0 +1,8 @@
1
+ json = {
2
+ occupied: stats[:size] > 0,
3
+ subscription_count: stats[:size]
4
+ }
5
+
6
+ if filter[:info].include?('user_count') && stats[:presence]
7
+ json[:user_count] = stats[:presence][:count]
8
+ end
@@ -0,0 +1,3 @@
1
+ json[:users] = stats[:presence][:ids].map do |id|
2
+ { id: id }
3
+ end
@@ -0,0 +1,3 @@
1
+ json[:users] = {
2
+ ids: stats[:presence][:ids]
3
+ }
@@ -1,3 +1,3 @@
1
1
  module Garufa
2
- VERSION = '1.1.0.rc.4'
2
+ VERSION = '1.1.0.rc.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: garufa
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.rc.4
4
+ version: 1.1.0.rc.5
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-02-14 00:00:00.000000000 Z
12
+ date: 2015-02-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: goliath
@@ -172,6 +172,11 @@ files:
172
172
  - lib/garufa/garufa_app.rb
173
173
  - lib/garufa/connection.rb
174
174
  - lib/garufa.rb
175
+ - lib/garufa/api/views/users.yajl
176
+ - lib/garufa/api/views/channels.yajl
177
+ - lib/garufa/api/views/non_presence.yajl
178
+ - lib/garufa/api/views/presence_users.yajl
179
+ - lib/garufa/api/views/presence.yajl
175
180
  - bin/garufa.pid
176
181
  - bin/garufa
177
182
  - garufa.gemspec