actionstore 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/actionstore/channel.rb +20 -1
- data/lib/actionstore/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 001c8fd1fb675c1ebeb212e3717721acf09cf9c8860461db538ba754058bf9b6
|
4
|
+
data.tar.gz: '0392d8e63329cee4064db6052cfbab16e8187092afd4cedfb474d86a1ffb1a61'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5064686e2b45347440ad062f96699a70cda907d8103668e2f5df72bc32964df88fd17e5dc8bd40db9e60c626f71f4f1b78d33b7201eb02fa44cb04659497c72
|
7
|
+
data.tar.gz: 845f9dbe778f95a3ee208d3d21fea286ed86971bb0d0dae0e39a3e9fa7307f590b6b1f15db3a5b9af8ae4c0ff827dbe5e6cedf88ff88f802a0710a47ff1a7c33
|
data/lib/actionstore/channel.rb
CHANGED
@@ -8,13 +8,32 @@ module Actionstore
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def push_update changes
|
11
|
-
|
11
|
+
transmit({action: 'update', changes: changes})
|
12
12
|
end
|
13
13
|
|
14
14
|
def push_update_into store_id, changes
|
15
15
|
store_id = ActionStore.store_id(store_id)
|
16
16
|
transmit({store_id: store_id, action: 'update', changes: changes})
|
17
17
|
end
|
18
|
+
|
19
|
+
def push_update_by key, value, changes
|
20
|
+
transmit({action: 'update_by', key: key, value: value, changes: changes})
|
21
|
+
end
|
22
|
+
|
23
|
+
def push_update_by_into store_id, key, value, changes
|
24
|
+
store_id = ActionStore.store_id(store_id)
|
25
|
+
transmit({store_id: store_id, action: 'update_by', key: key, value: value, changes: changes})
|
26
|
+
end
|
27
|
+
|
28
|
+
def push_append value
|
29
|
+
transmit({action: 'append', value: value})
|
30
|
+
end
|
31
|
+
|
32
|
+
def push_append_into store_id, value
|
33
|
+
store_id = ActionStore.store_id(store_id)
|
34
|
+
transmit({store_id: store_id, action: 'append', value: value})
|
35
|
+
end
|
36
|
+
|
18
37
|
|
19
38
|
def perform_action data
|
20
39
|
@subject.send "perform_#{data['action']}", current_user, *data['args']
|
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.2.0
|
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-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|