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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 132aaf4c5f7192e693407cf0acee91b4c0cb94b7
4
- data.tar.gz: 56cb817019c83a808efc8f17fc11f22534075a9a
3
+ metadata.gz: afe63eacb249ef9dd5b2b6ad9431c5333dbf9985
4
+ data.tar.gz: bebc9b9ed6432fbf490573179ddd496a8ff248b8
5
5
  SHA512:
6
- metadata.gz: 95e022a1bc8d063c3e46fc8526c024250dbffbcd58bed299f0d43fe24fa2c70ac699c2a8003d6876101ecb2502d2bce4ccd7b9daaa84f5380819e7073dc8f317
7
- data.tar.gz: d76a2a805828a798a7c11adc0584ccc2e507506eb0813e671440e098ba49bba8e3d74bb7ce7ee173a3eab42d75f1898a6b7bd197ca23a4d74a3de71fe9d182bb
6
+ metadata.gz: a6f3972bdda37ec4b468bad4294cdc3b4de874a2628c58bed7adaf2092150c78c84bda3f30b2db75004ddeff61775b541d2a61a57d2fe358f0dee860036a5818
7
+ data.tar.gz: 23d48486b99e04d92e35950032efb143b71ae19bcfe33ff076126e627eb77807bf834ec36d89325a7be007a03643baf9e437d186e1dd5986bf7d02c8ea853a54
@@ -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,7 @@
1
+ module Waku
2
+ module PathNotification
3
+ def self.demo
4
+ puts 'CONG'
5
+ end
6
+ end
7
+ end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Waku
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.2"
3
3
  end
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.0
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: