socialization-cassandra 0.0.6.pre.alpha → 0.0.7.pre.alpha
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d279fcd6260b480605bb3eb8ce95e6b545dfb1f3
|
4
|
+
data.tar.gz: 4a708a1e8d71a198850e2900a4049f3f89fed26c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8203dd0d4fab617d3cbb6b7e549b8675e028fced0479197912d9d4ed89aef36f3ad2a664dc3ec7fa9aa1f7c39d9552afbf1d7cfc8125651317b95561f64402bf
|
7
|
+
data.tar.gz: 95fba5d7b2fb0a34b082141e195fa6a7a987a95f77669a9d823962c0ce8a1589d5b11b0ff4f66f776e76d79f052b888f979d805d87ce637d54e11fcf924278cc
|
@@ -17,9 +17,9 @@ module Socialization
|
|
17
17
|
#
|
18
18
|
# @param [Commentable] commentable the object to be commented.
|
19
19
|
# @return [Boolean]
|
20
|
-
def comment!(commentable)
|
20
|
+
def comment!(commentable, opts = {})
|
21
21
|
raise Socialization::ArgumentError, "#{commentable} is not commentable!" unless commentable.respond_to?(:is_commentable?) && commentable.is_commentable?
|
22
|
-
Socialization.comment_model.comment!(self, commentable)
|
22
|
+
Socialization.comment_model.comment!(self, commentable, opts)
|
23
23
|
end
|
24
24
|
|
25
25
|
# Delete a {Comment comment} relationship.
|
@@ -35,13 +35,13 @@ module Socialization
|
|
35
35
|
#
|
36
36
|
# @param [Commentable] commentable the object to comment/uncomment.
|
37
37
|
# @return [Boolean]
|
38
|
-
def toggle_comment!(commentable)
|
38
|
+
def toggle_comment!(commentable, opts = {})
|
39
39
|
raise Socialization::ArgumentError, "#{commentable} is not commentable!" unless commentable.respond_to?(:is_commentable?) && commentable.is_commentable?
|
40
40
|
if comments?(commentable)
|
41
41
|
uncomment!(commentable)
|
42
42
|
false
|
43
43
|
else
|
44
|
-
comment!(commentable)
|
44
|
+
comment!(commentable, opts)
|
45
45
|
true
|
46
46
|
end
|
47
47
|
end
|
@@ -17,9 +17,9 @@ module Socialization
|
|
17
17
|
#
|
18
18
|
# @param [Followable] followable the object to be followed.
|
19
19
|
# @return [Boolean]
|
20
|
-
def follow!(followable)
|
20
|
+
def follow!(followable, opts = {})
|
21
21
|
raise Socialization::ArgumentError, "#{followable} is not followable!" unless followable.respond_to?(:is_followable?) && followable.is_followable?
|
22
|
-
Socialization.follow_model.follow!(self, followable)
|
22
|
+
Socialization.follow_model.follow!(self, followable, opts)
|
23
23
|
end
|
24
24
|
|
25
25
|
# Delete a {Follow follow} relationship.
|
@@ -35,13 +35,13 @@ module Socialization
|
|
35
35
|
#
|
36
36
|
# @param [Followable] followable the object to follow/unfollow.
|
37
37
|
# @return [Boolean]
|
38
|
-
def toggle_follow!(followable)
|
38
|
+
def toggle_follow!(followable, opts = {})
|
39
39
|
raise Socialization::ArgumentError, "#{followable} is not followable!" unless followable.respond_to?(:is_followable?) && followable.is_followable?
|
40
40
|
if follows?(followable)
|
41
41
|
unfollow!(followable)
|
42
42
|
false
|
43
43
|
else
|
44
|
-
follow!(followable)
|
44
|
+
follow!(followable, opts)
|
45
45
|
true
|
46
46
|
end
|
47
47
|
end
|
@@ -17,9 +17,9 @@ module Socialization
|
|
17
17
|
#
|
18
18
|
# @param [Likeable] likeable the object to be liked.
|
19
19
|
# @return [Boolean]
|
20
|
-
def like!(likeable)
|
20
|
+
def like!(likeable, opts = {})
|
21
21
|
raise Socialization::ArgumentError, "#{likeable} is not likeable!" unless likeable.respond_to?(:is_likeable?) && likeable.is_likeable?
|
22
|
-
Socialization.like_model.like!(self, likeable)
|
22
|
+
Socialization.like_model.like!(self, likeable, opts)
|
23
23
|
end
|
24
24
|
|
25
25
|
# Delete a {Like like} relationship.
|
@@ -35,13 +35,13 @@ module Socialization
|
|
35
35
|
#
|
36
36
|
# @param [Likeable] likeable the object to like/unlike.
|
37
37
|
# @return [Boolean]
|
38
|
-
def toggle_like!(likeable)
|
38
|
+
def toggle_like!(likeable, opts = {})
|
39
39
|
raise Socialization::ArgumentError, "#{likeable} is not likeable!" unless likeable.respond_to?(:is_likeable?) && likeable.is_likeable?
|
40
40
|
if likes?(likeable)
|
41
41
|
unlike!(likeable)
|
42
42
|
false
|
43
43
|
else
|
44
|
-
like!(likeable)
|
44
|
+
like!(likeable, opts)
|
45
45
|
true
|
46
46
|
end
|
47
47
|
end
|
@@ -17,9 +17,9 @@ module Socialization
|
|
17
17
|
#
|
18
18
|
# @param [Shareable] shareable the object to be shared.
|
19
19
|
# @return [Boolean]
|
20
|
-
def share!(shareable)
|
20
|
+
def share!(shareable, opts = {})
|
21
21
|
raise Socialization::ArgumentError, "#{shareable} is not shareable!" unless shareable.respond_to?(:is_shareable?) && shareable.is_shareable?
|
22
|
-
Socialization.share_model.share!(self, shareable)
|
22
|
+
Socialization.share_model.share!(self, shareable, opts)
|
23
23
|
end
|
24
24
|
|
25
25
|
# Delete a {Share share} relationship.
|
@@ -35,13 +35,13 @@ module Socialization
|
|
35
35
|
#
|
36
36
|
# @param [Shareable] shareable the object to share/unshare.
|
37
37
|
# @return [Boolean]
|
38
|
-
def toggle_share!(shareable)
|
38
|
+
def toggle_share!(shareable, opts = {})
|
39
39
|
raise Socialization::ArgumentError, "#{shareable} is not shareable!" unless shareable.respond_to?(:is_shareable?) && shareable.is_shareable?
|
40
40
|
if shares?(shareable)
|
41
41
|
unshare!(shareable)
|
42
42
|
false
|
43
43
|
else
|
44
|
-
share!(shareable)
|
44
|
+
share!(shareable, opts)
|
45
45
|
true
|
46
46
|
end
|
47
47
|
end
|