mongo_followable 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.idea/workspace.xml +70 -31
- data/README.rdoc +1 -1
- data/lib/mongo_followable/version.rb +1 -1
- data/mongo_followable.gemspec +2 -2
- data/spec/mongo/followable_spec.rb +12 -0
- data/spec/spec_helper.rb +2 -2
- metadata +5 -5
data/.idea/workspace.xml
CHANGED
@@ -4,11 +4,10 @@
|
|
4
4
|
<list default="true" id="46dc3a6d-3a97-49f8-becd-2ccba8c07e42" name="Default" comment="">
|
5
5
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
6
6
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/README.rdoc" afterPath="$PROJECT_DIR$/README.rdoc" />
|
7
|
-
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/mongo_followable/followable.rb" afterPath="$PROJECT_DIR$/lib/mongo_followable/followable.rb" />
|
8
|
-
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/mongo_followable/follower.rb" afterPath="$PROJECT_DIR$/lib/mongo_followable/follower.rb" />
|
9
7
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/mongo_followable/version.rb" afterPath="$PROJECT_DIR$/lib/mongo_followable/version.rb" />
|
10
8
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/mongo_followable.gemspec" afterPath="$PROJECT_DIR$/mongo_followable.gemspec" />
|
11
9
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/spec/mongo/followable_spec.rb" afterPath="$PROJECT_DIR$/spec/mongo/followable_spec.rb" />
|
10
|
+
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/spec/spec_helper.rb" afterPath="$PROJECT_DIR$/spec/spec_helper.rb" />
|
12
11
|
</list>
|
13
12
|
<ignored path="mongo_followable.iws" />
|
14
13
|
<ignored path=".idea/workspace.xml" />
|
@@ -31,7 +30,17 @@
|
|
31
30
|
<favorites_list name="mongo_followable" />
|
32
31
|
</component>
|
33
32
|
<component name="FileEditorManager">
|
34
|
-
<leaf
|
33
|
+
<leaf>
|
34
|
+
<file leaf-file-name="version.rb" pinned="false" current="true" current-in-tab="true">
|
35
|
+
<entry file="file://$PROJECT_DIR$/lib/mongo_followable/version.rb">
|
36
|
+
<provider selected="true" editor-type-id="text-editor">
|
37
|
+
<state line="1" column="18" selection-start="41" selection-end="41" vertical-scroll-proportion="0.02173913">
|
38
|
+
<folding />
|
39
|
+
</state>
|
40
|
+
</provider>
|
41
|
+
</entry>
|
42
|
+
</file>
|
43
|
+
</leaf>
|
35
44
|
</component>
|
36
45
|
<component name="FindManager">
|
37
46
|
<FindUsagesManager>
|
@@ -50,14 +59,14 @@
|
|
50
59
|
<option value="$PROJECT_DIR$/spec/mongo_mapper/user.rb" />
|
51
60
|
<option value="$PROJECT_DIR$/spec/mongoid/group.rb" />
|
52
61
|
<option value="$PROJECT_DIR$/spec/mongoid/user.rb" />
|
53
|
-
<option value="$PROJECT_DIR$/spec/spec_helper.rb" />
|
54
62
|
<option value="$PROJECT_DIR$/lib/mongo_followable.rb" />
|
55
63
|
<option value="$PROJECT_DIR$/lib/mongo_followable/follower.rb" />
|
56
|
-
<option value="$PROJECT_DIR$/lib/mongo_followable/followable.rb" />
|
57
|
-
<option value="$PROJECT_DIR$/lib/mongo_followable/version.rb" />
|
58
64
|
<option value="$PROJECT_DIR$/spec/mongo/followable_spec.rb" />
|
59
|
-
<option value="$PROJECT_DIR$/README.rdoc" />
|
60
65
|
<option value="$PROJECT_DIR$/mongo_followable.gemspec" />
|
66
|
+
<option value="$PROJECT_DIR$/spec/spec_helper.rb" />
|
67
|
+
<option value="$PROJECT_DIR$/README.rdoc" />
|
68
|
+
<option value="$PROJECT_DIR$/lib/mongo_followable/followable.rb" />
|
69
|
+
<option value="$PROJECT_DIR$/lib/mongo_followable/version.rb" />
|
61
70
|
</list>
|
62
71
|
</option>
|
63
72
|
</component>
|
@@ -87,6 +96,7 @@
|
|
87
96
|
<sortByType />
|
88
97
|
</navigator>
|
89
98
|
<panes>
|
99
|
+
<pane id="Scope" />
|
90
100
|
<pane id="ProjectPane">
|
91
101
|
<subPane>
|
92
102
|
<PATH>
|
@@ -115,7 +125,7 @@
|
|
115
125
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
116
126
|
</PATH_ELEMENT>
|
117
127
|
<PATH_ELEMENT>
|
118
|
-
<option name="myItemId" value="
|
128
|
+
<option name="myItemId" value="spec" />
|
119
129
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
120
130
|
</PATH_ELEMENT>
|
121
131
|
</PATH>
|
@@ -129,13 +139,31 @@
|
|
129
139
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
130
140
|
</PATH_ELEMENT>
|
131
141
|
<PATH_ELEMENT>
|
132
|
-
<option name="myItemId" value="
|
142
|
+
<option name="myItemId" value="spec" />
|
133
143
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
134
144
|
</PATH_ELEMENT>
|
145
|
+
<PATH_ELEMENT>
|
146
|
+
<option name="myItemId" value="mongoid" />
|
147
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
148
|
+
</PATH_ELEMENT>
|
149
|
+
</PATH>
|
150
|
+
<PATH>
|
151
|
+
<PATH_ELEMENT>
|
152
|
+
<option name="myItemId" value="mongo_followable" />
|
153
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
154
|
+
</PATH_ELEMENT>
|
135
155
|
<PATH_ELEMENT>
|
136
156
|
<option name="myItemId" value="mongo_followable" />
|
137
157
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
138
158
|
</PATH_ELEMENT>
|
159
|
+
<PATH_ELEMENT>
|
160
|
+
<option name="myItemId" value="spec" />
|
161
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
162
|
+
</PATH_ELEMENT>
|
163
|
+
<PATH_ELEMENT>
|
164
|
+
<option name="myItemId" value="mongo" />
|
165
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
166
|
+
</PATH_ELEMENT>
|
139
167
|
</PATH>
|
140
168
|
<PATH>
|
141
169
|
<PATH_ELEMENT>
|
@@ -147,18 +175,31 @@
|
|
147
175
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
148
176
|
</PATH_ELEMENT>
|
149
177
|
<PATH_ELEMENT>
|
150
|
-
<option name="myItemId" value="
|
178
|
+
<option name="myItemId" value="lib" />
|
151
179
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
152
180
|
</PATH_ELEMENT>
|
181
|
+
</PATH>
|
182
|
+
<PATH>
|
153
183
|
<PATH_ELEMENT>
|
154
|
-
<option name="myItemId" value="
|
184
|
+
<option name="myItemId" value="mongo_followable" />
|
185
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
186
|
+
</PATH_ELEMENT>
|
187
|
+
<PATH_ELEMENT>
|
188
|
+
<option name="myItemId" value="mongo_followable" />
|
189
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
190
|
+
</PATH_ELEMENT>
|
191
|
+
<PATH_ELEMENT>
|
192
|
+
<option name="myItemId" value="lib" />
|
193
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
194
|
+
</PATH_ELEMENT>
|
195
|
+
<PATH_ELEMENT>
|
196
|
+
<option name="myItemId" value="mongo_followable" />
|
155
197
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
156
198
|
</PATH_ELEMENT>
|
157
199
|
</PATH>
|
158
200
|
</subPane>
|
159
201
|
</pane>
|
160
202
|
<pane id="Favorites" />
|
161
|
-
<pane id="Scope" />
|
162
203
|
</panes>
|
163
204
|
</component>
|
164
205
|
<component name="RecentsManager">
|
@@ -195,13 +236,13 @@
|
|
195
236
|
</component>
|
196
237
|
<component name="ToolWindowManager">
|
197
238
|
<frame x="1" y="24" width="1599" height="851" extended-state="0" />
|
198
|
-
<editor active="
|
239
|
+
<editor active="true" />
|
199
240
|
<layout>
|
200
241
|
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
201
242
|
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
202
243
|
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
|
203
244
|
<window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
204
|
-
<window_info id="Project" active="
|
245
|
+
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.19796307" sideWeight="0.6703601" order="0" side_tool="false" content_ui="tabs" />
|
205
246
|
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
206
247
|
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
207
248
|
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
@@ -282,63 +323,61 @@
|
|
282
323
|
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
|
283
324
|
</provider>
|
284
325
|
</entry>
|
285
|
-
<entry file="file://$PROJECT_DIR$/
|
326
|
+
<entry file="file://$PROJECT_DIR$/app/models/follow.rb">
|
286
327
|
<provider selected="true" editor-type-id="text-editor">
|
287
|
-
<state line="
|
328
|
+
<state line="10" column="30" selection-start="263" selection-end="263" vertical-scroll-proportion="0.2173913" />
|
288
329
|
</provider>
|
289
330
|
</entry>
|
290
|
-
<entry file="file://$PROJECT_DIR$/lib/mongo_followable
|
331
|
+
<entry file="file://$PROJECT_DIR$/lib/mongo_followable.rb">
|
291
332
|
<provider selected="true" editor-type-id="text-editor">
|
292
|
-
<state line="
|
333
|
+
<state line="6" column="48" selection-start="301" selection-end="301" vertical-scroll-proportion="0.13043478" />
|
293
334
|
</provider>
|
294
335
|
</entry>
|
295
|
-
<entry file="file://$PROJECT_DIR$/
|
336
|
+
<entry file="file://$PROJECT_DIR$/spec/mongo/followable_spec.rb">
|
296
337
|
<provider selected="true" editor-type-id="text-editor">
|
297
|
-
<state line="
|
338
|
+
<state line="156" column="25" selection-start="3888" selection-end="3888" vertical-scroll-proportion="0.0">
|
298
339
|
<folding />
|
299
340
|
</state>
|
300
341
|
</provider>
|
301
342
|
</entry>
|
302
343
|
<entry file="file://$PROJECT_DIR$/README.rdoc">
|
303
344
|
<provider selected="true" editor-type-id="text-editor">
|
304
|
-
<state line="
|
345
|
+
<state line="32" column="20" selection-start="965" selection-end="965" vertical-scroll-proportion="0.02173913">
|
305
346
|
<folding />
|
306
347
|
</state>
|
307
348
|
</provider>
|
308
349
|
</entry>
|
309
|
-
<entry file="file://$PROJECT_DIR$/
|
350
|
+
<entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
|
310
351
|
<provider selected="true" editor-type-id="text-editor">
|
311
|
-
<state line="
|
352
|
+
<state line="24" column="42" selection-start="786" selection-end="786" vertical-scroll-proportion="0.5217391">
|
312
353
|
<folding />
|
313
354
|
</state>
|
314
355
|
</provider>
|
315
356
|
</entry>
|
316
|
-
<entry file="file://$PROJECT_DIR$/
|
357
|
+
<entry file="file://$PROJECT_DIR$/mongo_followable.gemspec">
|
317
358
|
<provider selected="true" editor-type-id="text-editor">
|
318
|
-
<state line="
|
359
|
+
<state line="10" column="48" selection-start="408" selection-end="408" vertical-scroll-proportion="0.2173913">
|
319
360
|
<folding />
|
320
361
|
</state>
|
321
362
|
</provider>
|
322
363
|
</entry>
|
323
364
|
<entry file="file://$PROJECT_DIR$/lib/mongo_followable/follower.rb">
|
324
365
|
<provider selected="true" editor-type-id="text-editor">
|
325
|
-
<state line="152" column="34" selection-start="4717" selection-end="4717" vertical-scroll-proportion="0.
|
366
|
+
<state line="152" column="34" selection-start="4717" selection-end="4717" vertical-scroll-proportion="-0.5096012">
|
326
367
|
<folding />
|
327
368
|
</state>
|
328
369
|
</provider>
|
329
370
|
</entry>
|
330
371
|
<entry file="file://$PROJECT_DIR$/lib/mongo_followable/followable.rb">
|
331
372
|
<provider selected="true" editor-type-id="text-editor">
|
332
|
-
<state line="
|
373
|
+
<state line="81" column="0" selection-start="2647" selection-end="2662" vertical-scroll-proportion="0.044313148">
|
333
374
|
<folding />
|
334
375
|
</state>
|
335
376
|
</provider>
|
336
377
|
</entry>
|
337
|
-
<entry file="file://$PROJECT_DIR$/lib/mongo_followable.rb">
|
378
|
+
<entry file="file://$PROJECT_DIR$/lib/mongo_followable/version.rb">
|
338
379
|
<provider selected="true" editor-type-id="text-editor">
|
339
|
-
<state line="
|
340
|
-
<folding />
|
341
|
-
</state>
|
380
|
+
<state line="1" column="18" selection-start="41" selection-end="41" vertical-scroll-proportion="0.02173913" />
|
342
381
|
</provider>
|
343
382
|
</entry>
|
344
383
|
</component>
|
data/README.rdoc
CHANGED
data/mongo_followable.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.authors = ["Jie Fan"]
|
9
9
|
s.email = ["ustc.flyingfox@gmail.com"]
|
10
10
|
s.homepage = "https://github.com/lastomato/mongo_followable"
|
11
|
-
s.summary = %q{ adds following feature to mongoid }
|
12
|
-
s.description = %q{ Mongo Followable adds following feature to mongoid }
|
11
|
+
s.summary = %q{ adds following feature to mongoid/mongo_mapper }
|
12
|
+
s.description = %q{ Mongo Followable adds following feature to mongoid/mongo_mapper }
|
13
13
|
|
14
14
|
s.rubyforge_project = "mongo_followable"
|
15
15
|
|
@@ -169,6 +169,18 @@ describe Mongo::Followable do
|
|
169
169
|
g.all_followers == []
|
170
170
|
|
171
171
|
end
|
172
|
+
|
173
|
+
it "another way to unfollow a group" do
|
174
|
+
@u.follow(g)
|
175
|
+
g.unfollowed(@u)
|
176
|
+
end
|
177
|
+
|
178
|
+
it "another way to unfollow a group" do
|
179
|
+
|
180
|
+
g.all_followers.should == []
|
181
|
+
end
|
182
|
+
|
183
|
+
|
172
184
|
end
|
173
185
|
end
|
174
186
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -11,7 +11,7 @@ if rand > 0.5
|
|
11
11
|
require File.expand_path("../mongoid/user", __FILE__)
|
12
12
|
require File.expand_path("../mongoid/group", __FILE__)
|
13
13
|
Mongoid.configure do |config|
|
14
|
-
name = '
|
14
|
+
name = 'mongo_followable_test'
|
15
15
|
host = 'localhost'
|
16
16
|
config.master = Mongo::Connection.new.db(name)
|
17
17
|
config.autocreate_indexes = true
|
@@ -22,7 +22,7 @@ else
|
|
22
22
|
require File.expand_path("../../lib/mongo_followable", __FILE__)
|
23
23
|
require File.expand_path("../mongo_mapper/user", __FILE__)
|
24
24
|
require File.expand_path("../mongo_mapper/group", __FILE__)
|
25
|
-
MongoMapper.database = '
|
25
|
+
MongoMapper.database = 'mongo_followable_test'
|
26
26
|
end
|
27
27
|
|
28
28
|
RSpec.configure do |c|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 2
|
9
|
+
version: 0.2.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Jie Fan
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2012-
|
17
|
+
date: 2012-02-02 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -92,7 +92,7 @@ dependencies:
|
|
92
92
|
version: 0.7.0
|
93
93
|
type: :development
|
94
94
|
version_requirements: *id005
|
95
|
-
description: " Mongo Followable adds following feature to mongoid "
|
95
|
+
description: " Mongo Followable adds following feature to mongoid/mongo_mapper "
|
96
96
|
email:
|
97
97
|
- ustc.flyingfox@gmail.com
|
98
98
|
executables: []
|
@@ -159,6 +159,6 @@ rubyforge_project: mongo_followable
|
|
159
159
|
rubygems_version: 1.3.7
|
160
160
|
signing_key:
|
161
161
|
specification_version: 3
|
162
|
-
summary: adds following feature to mongoid
|
162
|
+
summary: adds following feature to mongoid/mongo_mapper
|
163
163
|
test_files: []
|
164
164
|
|