actionstore 0.2.0 → 0.3.1
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 +4 -4
- data/README.md +1 -0
- data/lib/actionstore/actionstore.rb +19 -0
- data/lib/actionstore/channel.rb +4 -4
- data/lib/actionstore/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e6dc467f70f4ef25118ae1004d4ea9a92deccb2bf4b067bb09dfc8f2c4ec7e9
|
4
|
+
data.tar.gz: ff1c23831835f4892835a190860431925eee22a8cd71cb6f927a2bc43545b65b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6ffcc9174aa5d85a06cd3290685264579b17cc8da3fce57481ffe4d54c7886bd69e35040f7bca273a27fe809945e21b5d8099fcb95f911d151f61c2bdbd8c25
|
7
|
+
data.tar.gz: 23ba094931c67e32590af4dfd66f55c0af58f8a5e4b69cca65e318467f70337a435d8cdfef48b702713556752bfe9fcc3fe219f23c676e0aa02afe0640e5b466
|
data/README.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
../README.md
|
@@ -32,6 +32,25 @@ module Actionstore
|
|
32
32
|
def push_update_into store_id, changes = {}
|
33
33
|
Actionstore::Channel.broadcast_to self, store_id: Actionstore.store_id(store_id), action: 'update', changes: changes
|
34
34
|
end
|
35
|
+
|
36
|
+
def push_update_by key, value, changes
|
37
|
+
Actionstore::Channel.broadcast_to self, action: 'update_by', key: key, value: value, changes: changes
|
38
|
+
end
|
39
|
+
|
40
|
+
def push_update_by_into store_id, key, value, changes
|
41
|
+
store_id = Actionstore.store_id(store_id)
|
42
|
+
Actionstore::Channel.broadcast_to self, store_id: store_id, action: 'update_by', key: key, value: value, changes: changes
|
43
|
+
end
|
44
|
+
|
45
|
+
def push_append value
|
46
|
+
Actionstore::Channel.broadcast_to self, action: 'append', value: value
|
47
|
+
end
|
48
|
+
|
49
|
+
def push_append_into store_id, value
|
50
|
+
store_id = Actionstore.store_id(store_id)
|
51
|
+
Actionstore::Channel.broadcast_to self, store_id: store_id, action: 'append', value: value
|
52
|
+
end
|
53
|
+
|
35
54
|
|
36
55
|
def push_event event, data = nil
|
37
56
|
Actionstore::Channel.broadcast_to self, action: event, data: data
|
data/lib/actionstore/channel.rb
CHANGED
@@ -12,7 +12,7 @@ module Actionstore
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def push_update_into store_id, changes
|
15
|
-
store_id =
|
15
|
+
store_id = Actionstore.store_id(store_id)
|
16
16
|
transmit({store_id: store_id, action: 'update', changes: changes})
|
17
17
|
end
|
18
18
|
|
@@ -21,7 +21,7 @@ module Actionstore
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def push_update_by_into store_id, key, value, changes
|
24
|
-
store_id =
|
24
|
+
store_id = Actionstore.store_id(store_id)
|
25
25
|
transmit({store_id: store_id, action: 'update_by', key: key, value: value, changes: changes})
|
26
26
|
end
|
27
27
|
|
@@ -30,13 +30,13 @@ module Actionstore
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def push_append_into store_id, value
|
33
|
-
store_id =
|
33
|
+
store_id = Actionstore.store_id(store_id)
|
34
34
|
transmit({store_id: store_id, action: 'append', value: value})
|
35
35
|
end
|
36
36
|
|
37
37
|
|
38
38
|
def perform_action data
|
39
|
-
@subject.send "perform_#{data['action']}",
|
39
|
+
@subject.send "perform_#{data['action']}", self, *data['args']
|
40
40
|
end
|
41
41
|
|
42
42
|
def unsubscribed
|
data/lib/actionstore/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionstore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Buhrmester
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -31,6 +31,7 @@ executables: []
|
|
31
31
|
extensions: []
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
|
+
- README.md
|
34
35
|
- Rakefile
|
35
36
|
- lib/actionstore.rb
|
36
37
|
- lib/actionstore/actionstore.rb
|