acts_as_realtime 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -13
- data/lib/acts_as_realtime.rb +5 -4
- metadata +5 -9
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
Yjg2YWU0N2M1ZWUyYzBmMTY5MTdmMmNmOGZiNDlhMzVmNjU2OTk4ZQ==
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 04e758d8cde5782f74f4073390e5033cea1aa50c8bbbb5c9618f3392701cf614
|
4
|
+
data.tar.gz: 9d69eee1911a750de344b1dad3d8d75d6c44d846b02e9d2196bf01cffa797df2
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
ZWJiM2U2YTJmZTY4MDIyODIzZDNjYWEwZjQwOWQ0NzkwNTZhNThhZGQ3YjFk
|
11
|
-
Y2ViMTMwNzI2MzRiNzQ5MDA3YTJmMWNlZWMwNzk5OWUxMzgyOGQ=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
N2M0NGRkNTVhYmJhZWI0YzcwMTk3MTgxY2EyNDE1YjBhMmU5NzMzMDRjMDAy
|
14
|
-
YmI3NTg2Y2I1YjFiYzU1MjQwYzc5YmRjMGM3NjY0Y2M3YmIxMWYxNzhkYTAz
|
15
|
-
ZmZlODc2NGYwZDc4NjZjOGJjZTRjYTY5ZDc2ZGI0MDQ4MzJjMTQ=
|
6
|
+
metadata.gz: 825aad42c09abde794d429dc10d416957745b9a1c5331edcf9b96253cd39297aace1fbe8541dc786ec67486662e7f6fd1b0b36d30bdcc60e9d1f78bf79a96635
|
7
|
+
data.tar.gz: 72045773911646dd560849f5c21ec250942bbdb821c1fdc812c95a62766dc4736da4817e7eb5e8e906739f4ed9c63a7644663219c0b94a8a7666464ebe63cf32
|
data/lib/acts_as_realtime.rb
CHANGED
@@ -49,7 +49,7 @@ module ActsAsRealTime
|
|
49
49
|
|
50
50
|
module ClassMethods
|
51
51
|
|
52
|
-
def acts_as_realtime(
|
52
|
+
def acts_as_realtime(modelo, selector, insertion_method = 'prepend', &blk)
|
53
53
|
|
54
54
|
=begin
|
55
55
|
Se había manejado cómo posible solución el manejar un token(*-*)
|
@@ -76,7 +76,7 @@ module ActsAsRealTime
|
|
76
76
|
=end
|
77
77
|
|
78
78
|
#Se define el método update_index en lo modelos que se ejecute el método acts_as_real_time
|
79
|
-
|
79
|
+
modelo.class_eval {
|
80
80
|
define_method(:update_index) do
|
81
81
|
|
82
82
|
#eval("html[start_index..finish_index] = #{attr}") Esta instrucción se usaba para la solución que se planteó arriba
|
@@ -84,9 +84,10 @@ module ActsAsRealTime
|
|
84
84
|
res_yield = yield ActsAsRealTime.ws, ActsAsRealTime.channel, self if block_given?
|
85
85
|
ActsAsRealTime.mod_app, ActsAsRealTime.html = res_yield[0], res_yield[1]
|
86
86
|
ActsAsRealTime.mod_app::Application.config.chanel = ActsAsRealTime::channel
|
87
|
-
ActsAsRealTime.mod_app::Application.config.chanel.push "$('#{
|
87
|
+
ActsAsRealTime.mod_app::Application.config.chanel.push "$('#{selector}').#{insertion_method}('#{ActsAsRealTime.html}');"
|
88
88
|
end
|
89
|
-
|
89
|
+
#TODO: remove on: create in order to remove and update in realtime
|
90
|
+
after_commit :update_index, on: :create
|
90
91
|
}
|
91
92
|
end
|
92
93
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_realtime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rolando Vazquez
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-05-06 00:00:00.000000000 Z
|
12
11
|
dependencies: []
|
13
12
|
description: Gem for add realtime functionality for ruby on rails apps, it use em-websocket
|
14
13
|
gem sor use websockets and channels
|
@@ -22,24 +21,21 @@ homepage: https://github.com/rolandoivan23/acts_as_realtime
|
|
22
21
|
licenses:
|
23
22
|
- MIT
|
24
23
|
metadata: {}
|
25
|
-
post_install_message:
|
26
24
|
rdoc_options: []
|
27
25
|
require_paths:
|
28
26
|
- lib
|
29
27
|
required_ruby_version: !ruby/object:Gem::Requirement
|
30
28
|
requirements:
|
31
|
-
- -
|
29
|
+
- - ">="
|
32
30
|
- !ruby/object:Gem::Version
|
33
31
|
version: '0'
|
34
32
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
35
33
|
requirements:
|
36
|
-
- -
|
34
|
+
- - ">="
|
37
35
|
- !ruby/object:Gem::Version
|
38
36
|
version: '0'
|
39
37
|
requirements: []
|
40
|
-
|
41
|
-
rubygems_version: 2.2.2
|
42
|
-
signing_key:
|
38
|
+
rubygems_version: 3.6.7
|
43
39
|
specification_version: 4
|
44
40
|
summary: RoR realtime apps
|
45
41
|
test_files: []
|