acts_as_friendable 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -19,4 +19,5 @@ spec/reports
19
19
  test/tmp
20
20
  test/version_tmp
21
21
  tmp
22
- .DS_Store
22
+ .DS_Store
23
+ vendor/bundle*
data/README.md CHANGED
@@ -8,13 +8,13 @@ ActsAsFriendable defines a "friendship" as a two-way relationship which is initi
8
8
 
9
9
  ## Installation
10
10
 
11
- Add ActsAsFriendable to you Gemfile:
11
+ Add ActsAsFriendable to your Gemfile:
12
12
 
13
13
  ```ruby
14
14
  gem 'acts_as_friendable'
15
15
  ```
16
16
 
17
- And then intall it with bundler by executing:
17
+ And then install it with bundler by executing:
18
18
 
19
19
  ```shell
20
20
  bundle install
@@ -50,9 +50,9 @@ Given the "friendship" definition in the Overview, we have 4 possible states of
50
50
 
51
51
  States #1 and #2 are simply what we will be calling "friends." They are approved relationships, no matter the direction. Because we don’t care who requested the friendship once it’s approved, we will group these together.
52
52
 
53
- State #3 is what we call "pending friends." Other users whom the current user has requested to be friends with and which are awaiting approval. These are out of of the control of the current user and just waiting to be approved or rejected.
53
+ State #3 is what we call "pending friends." Other users with whom the current user has requested to be friends and are awaiting approval. These are out of of the control of the current user and just waiting to be approved or rejected.
54
54
 
55
- State #4 is what we call "requested friends." Other user who have requested that the current user be their friend and are awaiting the approval of the current user. These are the actionable items for the current user to approve or reject. Ignoring a friend request simply deletes the non-approved Friendship (similar to Facebook). It doesn't the the other person they were reject but allows them to send another friend request if they want.
55
+ State #4 is what we call "requested friends." Other users who have requested that the current user be their friend and are awaiting the approval of the current user. These are the actionable items for the current user to approve or reject. Ignoring a friend request simply deletes the non-approved Friendship (similar to Facebook). It doesn't tell the the other person they were reject but allows them to send another friend request if they want.
56
56
 
57
57
  With that understanding we have the following scopes / "lookup" methods available to us:
58
58
 
@@ -21,6 +21,6 @@ module ActsAsFriendable
21
21
  end
22
22
 
23
23
  receiver.extend ClassMethods
24
- receiver.send :include, InstanceMethods
24
+ receiver.send :include
25
25
  end
26
26
  end
@@ -0,0 +1,7 @@
1
+ ## v1.0.1
2
+
3
+ * Fixed - DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActsAsFriendable instead.
4
+
5
+ ## v1.0.0
6
+
7
+ * Initial Release
@@ -5,25 +5,23 @@ module ActsAsFriendable
5
5
 
6
6
  end
7
7
 
8
- module InstanceMethods
9
- def friends
10
- direct_friends | inverse_friends
11
- end
8
+ def friends
9
+ direct_friends | inverse_friends
10
+ end
12
11
 
13
- def friend_ids
14
- friends.map {|f| f.id}
15
- end
12
+ def friend_ids
13
+ friends.map {|f| f.id}
14
+ end
16
15
 
17
- def friend_ids_and_me
18
- friend_ids << id
19
- end
16
+ def friend_ids_and_me
17
+ friend_ids << id
18
+ end
20
19
 
21
- def pending_and_friend_ids
22
- pending_and_friend_ids = []
23
- pending_and_friend_ids << friend_ids
24
- pending_and_friend_ids << pending_friends.map {|f| f.id}
25
- pending_and_friend_ids.flatten
26
- end
20
+ def pending_and_friend_ids
21
+ pending_and_friend_ids = []
22
+ pending_and_friend_ids << friend_ids
23
+ pending_and_friend_ids << pending_friends.map {|f| f.id}
24
+ pending_and_friend_ids.flatten
27
25
  end
28
26
 
29
27
  end
@@ -1,3 +1,3 @@
1
1
  module ActsAsFriendable
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_friendable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-08 00:00:00.000000000 Z
12
+ date: 2013-04-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -109,6 +109,7 @@ files:
109
109
  - Rakefile
110
110
  - acts_as_friendable.gemspec
111
111
  - lib/acts_as_friendable.rb
112
+ - lib/acts_as_friendable/CHANGELOG.md
112
113
  - lib/acts_as_friendable/friendships.rb
113
114
  - lib/acts_as_friendable/model_additions.rb
114
115
  - lib/acts_as_friendable/version.rb
@@ -135,12 +136,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
135
136
  - - ! '>='
136
137
  - !ruby/object:Gem::Version
137
138
  version: '0'
139
+ segments:
140
+ - 0
141
+ hash: 1283071857139746599
138
142
  required_rubygems_version: !ruby/object:Gem::Requirement
139
143
  none: false
140
144
  requirements:
141
145
  - - ! '>='
142
146
  - !ruby/object:Gem::Version
143
147
  version: '0'
148
+ segments:
149
+ - 0
150
+ hash: 1283071857139746599
144
151
  requirements: []
145
152
  rubyforge_project:
146
153
  rubygems_version: 1.8.23
@@ -155,4 +162,3 @@ test_files:
155
162
  - spec/config/schema.rb
156
163
  - spec/generators/install_generator_spec.rb
157
164
  - spec/spec_helper.rb
158
- has_rdoc: