usernotification 0.0.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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/usernotification.rb +22 -0
  3. metadata +47 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a58f23e8c046d5acfcf8b16f9d0db05e2eedc227
4
+ data.tar.gz: 83193f3421f50bf8c8a489cdc2b0d0b4052cb7d8
5
+ SHA512:
6
+ metadata.gz: 325bb205e3d8bb1fa57a16782e4afab42c307afe72c07cd9412503eebed9bd173022a3bdc9915f551e4f707bfddbd5f9f4e86a9a207f5eee0c88977bed2275fc
7
+ data.tar.gz: 74585b9675bce3361c3797493e8fc4ed740f707529cd2e86d3baeac275262bde6fb28f80d3d8c615f132a2e3aa2d81686f1cf55f8379a399b6b7cd261ecbaf1e
@@ -0,0 +1,22 @@
1
+ class Notify
2
+ def self.read(id,profiles)
3
+ p=profiles.find_by_user_id(id.UID)
4
+ if id.kind=='follow'
5
+ @readnotification="#{p.fname} started following you."
6
+ else
7
+ @readnotification="#{p.fname} likes your post."
8
+ end
9
+ return @readnotification
10
+ end
11
+
12
+ def self.link(id,profiles)
13
+ pro_id=profiles.find_by user_id: id.UID
14
+ my_id=profiles.find_by user_id: id.user_id
15
+ if id.kind=='follow'
16
+ @linktonotification="/profiles/#{pro_id.id}"
17
+ else
18
+ @linktonotification="/profiles/#{my_id.id}/posts"
19
+ end
20
+ return @linktonotification
21
+ end
22
+ end
metadata ADDED
@@ -0,0 +1,47 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: usernotification
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Manasi Patil
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-04-23 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: "You will have to create a notification table with:\nnotification table=>
14
+ user_id:who should get notified, UID:who created the notification, kind:what type
15
+ of notification, seen:if the notification is read by the user or not.\nThe gem file
16
+ will return a message and a link to know more details of the notification. \nGem
17
+ methods: read(notification_id, user_profile), link(notification_id, user_profile)"
18
+ email: manasi.patil890@gmail.com
19
+ executables: []
20
+ extensions: []
21
+ extra_rdoc_files: []
22
+ files:
23
+ - lib/usernotification.rb
24
+ homepage: http://rubygems.org/gems/usernotification
25
+ licenses: []
26
+ metadata: {}
27
+ post_install_message:
28
+ rdoc_options: []
29
+ require_paths:
30
+ - lib
31
+ required_ruby_version: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: '0'
36
+ required_rubygems_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ requirements: []
42
+ rubyforge_project:
43
+ rubygems_version: 2.6.8
44
+ signing_key:
45
+ specification_version: 4
46
+ summary: provides notification messages and links for new followings or liking a post
47
+ test_files: []