waku 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +79 -0
- data/lib/waku/activity/msg_notification.rb +0 -0
- data/lib/waku/activity/path_notification.rb +7 -0
- data/lib/waku/activity/trackable.rb +27 -0
- data/lib/waku/version.rb +1 -1
- data/waku-0.1.0.gem +0 -0
- metadata +6 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afe63eacb249ef9dd5b2b6ad9431c5333dbf9985
|
4
|
+
data.tar.gz: bebc9b9ed6432fbf490573179ddd496a8ff248b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6f3972bdda37ec4b468bad4294cdc3b4de874a2628c58bed7adaf2092150c78c84bda3f30b2db75004ddeff61775b541d2a61a57d2fe358f0dee860036a5818
|
7
|
+
data.tar.gz: 23d48486b99e04d92e35950032efb143b71ae19bcfe33ff076126e627eb77807bf834ec36d89325a7be007a03643baf9e437d186e1dd5986bf7d02c8ea853a54
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
waku (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
actionpack (5.2.3)
|
10
|
+
actionview (= 5.2.3)
|
11
|
+
activesupport (= 5.2.3)
|
12
|
+
rack (~> 2.0)
|
13
|
+
rack-test (>= 0.6.3)
|
14
|
+
rails-dom-testing (~> 2.0)
|
15
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
16
|
+
actionview (5.2.3)
|
17
|
+
activesupport (= 5.2.3)
|
18
|
+
builder (~> 3.1)
|
19
|
+
erubi (~> 1.4)
|
20
|
+
rails-dom-testing (~> 2.0)
|
21
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
22
|
+
activemodel (5.2.3)
|
23
|
+
activesupport (= 5.2.3)
|
24
|
+
activesupport (5.2.3)
|
25
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
26
|
+
i18n (>= 0.7, < 2)
|
27
|
+
minitest (~> 5.1)
|
28
|
+
tzinfo (~> 1.1)
|
29
|
+
bindex (0.8.1)
|
30
|
+
builder (3.2.3)
|
31
|
+
concurrent-ruby (1.1.5)
|
32
|
+
crass (1.0.4)
|
33
|
+
erubi (1.8.0)
|
34
|
+
i18n (1.6.0)
|
35
|
+
concurrent-ruby (~> 1.0)
|
36
|
+
loofah (2.2.3)
|
37
|
+
crass (~> 1.0.2)
|
38
|
+
nokogiri (>= 1.5.9)
|
39
|
+
method_source (0.9.2)
|
40
|
+
mini_portile2 (2.4.0)
|
41
|
+
minitest (5.11.3)
|
42
|
+
nokogiri (1.10.4)
|
43
|
+
mini_portile2 (~> 2.4.0)
|
44
|
+
rack (2.0.7)
|
45
|
+
rack-test (1.1.0)
|
46
|
+
rack (>= 1.0, < 3)
|
47
|
+
rails-dom-testing (2.0.3)
|
48
|
+
activesupport (>= 4.2.0)
|
49
|
+
nokogiri (>= 1.6)
|
50
|
+
rails-html-sanitizer (1.2.0)
|
51
|
+
loofah (~> 2.2, >= 2.2.2)
|
52
|
+
railties (5.2.3)
|
53
|
+
actionpack (= 5.2.3)
|
54
|
+
activesupport (= 5.2.3)
|
55
|
+
method_source
|
56
|
+
rake (>= 0.8.7)
|
57
|
+
thor (>= 0.19.0, < 2.0)
|
58
|
+
rake (10.5.0)
|
59
|
+
thor (0.20.3)
|
60
|
+
thread_safe (0.3.6)
|
61
|
+
tzinfo (1.2.5)
|
62
|
+
thread_safe (~> 0.1)
|
63
|
+
web-console (3.7.0)
|
64
|
+
actionview (>= 5.0)
|
65
|
+
activemodel (>= 5.0)
|
66
|
+
bindex (>= 0.4.0)
|
67
|
+
railties (>= 5.0)
|
68
|
+
|
69
|
+
PLATFORMS
|
70
|
+
ruby
|
71
|
+
|
72
|
+
DEPENDENCIES
|
73
|
+
bundler (~> 1.17)
|
74
|
+
rake (~> 10.0)
|
75
|
+
waku!
|
76
|
+
web-console (~> 3.3, >= 3.3.0)
|
77
|
+
|
78
|
+
BUNDLED WITH
|
79
|
+
1.17.3
|
File without changes
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Waku
|
2
|
+
module Trackable
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
included do
|
6
|
+
include PublicActivity::Model
|
7
|
+
end
|
8
|
+
|
9
|
+
def create_notification(owner:, recipient: nil, key:, params: {})
|
10
|
+
return if owner.blank?
|
11
|
+
notification = Activity.new(trackable: self, key: key)
|
12
|
+
|
13
|
+
raise Activity::AcitivityTypeError unless notification.valid_trackable?
|
14
|
+
|
15
|
+
data = { owner: owner, parameters: params, recipient: recipient, group: group_activity }
|
16
|
+
data.each { |key, value| notification.send("#{key}=", value)}
|
17
|
+
notification.save!
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def group_activity
|
23
|
+
return id if is_a?(Post)
|
24
|
+
post_id
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/waku/version.rb
CHANGED
data/waku-0.1.0.gem
ADDED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: waku
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nguyenthanhcong101096
|
@@ -68,13 +68,18 @@ files:
|
|
68
68
|
- ".gitignore"
|
69
69
|
- CODE_OF_CONDUCT.md
|
70
70
|
- Gemfile
|
71
|
+
- Gemfile.lock
|
71
72
|
- LICENSE.txt
|
72
73
|
- README.md
|
73
74
|
- Rakefile
|
74
75
|
- bin/console
|
75
76
|
- bin/setup
|
76
77
|
- lib/waku.rb
|
78
|
+
- lib/waku/activity/msg_notification.rb
|
79
|
+
- lib/waku/activity/path_notification.rb
|
80
|
+
- lib/waku/activity/trackable.rb
|
77
81
|
- lib/waku/version.rb
|
82
|
+
- waku-0.1.0.gem
|
78
83
|
- waku.gemspec
|
79
84
|
homepage: https://github.com/1PACVietnam/wakuwaku_module
|
80
85
|
licenses:
|