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: 325911691f9c62925f2f6b54fcd7b4407e36b056
4
- data.tar.gz: 9d7057778d1c3b7e7a46f1f0c3d663a8fe7325e0
3
+ metadata.gz: d279fcd6260b480605bb3eb8ce95e6b545dfb1f3
4
+ data.tar.gz: 4a708a1e8d71a198850e2900a4049f3f89fed26c
5
5
  SHA512:
6
- metadata.gz: f24473edf6fcb49fee81835baadf633c097777e5984b0d3cdb5feef98e133f5729bbcc74e31d59e518e81e9eed95383ebf4ec61304701283bf9c9519c1dbf192
7
- data.tar.gz: a905c2f63f6b549201589517f3687adb1f126df3744a7d34e5a0c1f22ca4cdb9c6c240c17f24c288fba2e45a438f03197922d44d69fa79db2e081b4695ecae78
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
@@ -1,3 +1,3 @@
1
1
  module Socialization
2
- VERSION = "0.0.6-alpha"
2
+ VERSION = "0.0.7-alpha"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: socialization-cassandra
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6.pre.alpha
4
+ version: 0.0.7.pre.alpha
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amrit Singh