subscribable 0.0.1 → 0.0.2

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.
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  This is a basic gem that allows different models to
4
4
  subscribe/follow each other.
5
5
 
6
- This gem is supported by American Honors. (http://americanhonor.org)
6
+ This gem is supported by American Honors. (http://americanhonors.org)
7
7
 
8
8
  ## Example: A model instance can subscribe to another model instance
9
9
 
@@ -68,7 +68,7 @@ module Subscribable
68
68
  end
69
69
 
70
70
  def subscriptions_query(method_name, class_name)
71
- self.class.define_method(method_name) do
71
+ self.class.send(:define_method, method_name) do
72
72
  Subscribable::SubRelation.where(
73
73
  subscriber_id: self.id,
74
74
  subscriber_type: self.class.name,
@@ -78,7 +78,7 @@ module Subscribable
78
78
  end
79
79
 
80
80
  def subscribers_query(method_name, class_name)
81
- self.class.define_method(method_name) do
81
+ self.class.send(:define_method, method_name) do
82
82
  Subscribable::SubRelation.where(
83
83
  subscription_type: self.class.name,
84
84
  subscription_id: self.id,
@@ -1,3 +1,3 @@
1
1
  module Subscribable
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/spec/actor_spec.rb CHANGED
@@ -13,6 +13,14 @@ describe 'Actor' do
13
13
  expect( actor.respond_to?(:actor_subscriptions) ).to be_true
14
14
  end
15
15
 
16
+ it 'can call actor_subscribers' do
17
+ expect( actor.actor_subscribers ).to eq([])
18
+ end
19
+
20
+ it 'can call actor_subscriptions' do
21
+ expect( actor.actor_subscriptions ).to eq([])
22
+ end
23
+
16
24
  it 'has subscriptions' do
17
25
  expect{ actor.subscriptions }.to_not raise_error(NoMethodError)
18
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: subscribable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: