manveru-makura 2009.04.22 → 2009.05.27
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/CHANGELOG +91 -75
- data/MANIFEST +8 -1
- data/Rakefile +2 -2
- data/lib/makura/database.rb +1 -1
- data/lib/makura/model.rb +1 -1
- data/lib/makura/version.rb +1 -1
- data/makura.gemspec +4 -6
- data/tasks/authors.rake +30 -0
- data/tasks/bacon.rake +38 -21
- data/tasks/copyright.rake +21 -0
- data/tasks/git.rake +46 -0
- data/tasks/metric_changes.rake +32 -0
- data/tasks/rcov.rake +9 -5
- data/tasks/release.rake +50 -9
- data/tasks/todo.rake +27 -0
- data/tasks/traits.rake +21 -0
- data/tasks/yard.rake +4 -0
- data/tasks/ycov.rake +22 -0
- metadata +12 -5
- data/tasks/install_dependencies.rake +0 -6
data/CHANGELOG
CHANGED
|
@@ -1,324 +1,340 @@
|
|
|
1
|
-
[
|
|
1
|
+
[d4565ac | 2009-05-27 02:23:09 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
2
|
+
|
|
3
|
+
* Fix rakefile
|
|
4
|
+
|
|
5
|
+
[33f27af | 2009-05-27 02:21:44 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
6
|
+
|
|
7
|
+
* Update tasks
|
|
8
|
+
|
|
9
|
+
[4fd7977 | 2009-05-11 03:52:51 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
10
|
+
|
|
11
|
+
* Revert changes to get going on 0.9.0
|
|
12
|
+
|
|
13
|
+
[255e65c | 2009-04-21 17:14:06 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
14
|
+
|
|
15
|
+
* Version 2009.04.22
|
|
16
|
+
|
|
17
|
+
[307642a | 2009-04-21 17:12:55 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
2
18
|
|
|
3
19
|
* Add Makura::constant and use it in convert_raw
|
|
4
20
|
|
|
5
|
-
[e6370eb |
|
|
21
|
+
[e6370eb | 2009-04-21 17:10:12 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
6
22
|
|
|
7
23
|
* Make Makura run on 1.8 again
|
|
8
24
|
|
|
9
|
-
[4f8cc31 |
|
|
25
|
+
[4f8cc31 | 2009-04-21 17:09:59 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
10
26
|
|
|
11
27
|
* Fix references to _view
|
|
12
28
|
|
|
13
|
-
[513495b |
|
|
29
|
+
[513495b | 2009-04-21 06:15:47 UTC] Tadahiko Uehara <kikofx@gmail.com>
|
|
14
30
|
|
|
15
31
|
* Make convert_raw work with namespaced model.
|
|
16
32
|
|
|
17
|
-
[e2eee79 |
|
|
33
|
+
[e2eee79 | 2009-04-19 04:58:12 UTC] Tadahiko Uehara <kikofx@gmail.com>
|
|
18
34
|
|
|
19
35
|
* Support for namespaced models by using namespace as layout's dir name.
|
|
20
36
|
|
|
21
37
|
MyApp::Admin::Foo #=> .couch/my_app/admin/map/foo_xxx.js
|
|
22
38
|
|
|
23
|
-
[8c9aa24 |
|
|
39
|
+
[8c9aa24 | 2009-03-28 08:01:56 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
24
40
|
|
|
25
41
|
* Version 2009.03.28
|
|
26
42
|
|
|
27
|
-
[da5cebc |
|
|
43
|
+
[da5cebc | 2009-03-28 08:00:13 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
28
44
|
|
|
29
45
|
* Put version in another file for easier management
|
|
30
46
|
|
|
31
|
-
[534a2bc |
|
|
47
|
+
[534a2bc | 2009-03-28 07:59:15 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
32
48
|
|
|
33
49
|
* Add Rakefile and some tasks
|
|
34
50
|
|
|
35
|
-
[643fa64 |
|
|
51
|
+
[643fa64 | 2009-03-01 13:23:15 UTC] Tadahiko Uehara <kikofx@gmail.com>
|
|
36
52
|
|
|
37
53
|
* Use Array() instead of to_a for Ruby 1.9 compatibility.
|
|
38
54
|
|
|
39
55
|
Signed-off-by: Michael Fellinger <m.fellinger@gmail.com>
|
|
40
56
|
|
|
41
|
-
[3d77ce6 |
|
|
57
|
+
[3d77ce6 | 2009-03-21 05:07:04 UTC] Preston Marshall <preston@synergy-solutions.biz>
|
|
42
58
|
|
|
43
59
|
* new gem
|
|
44
60
|
|
|
45
61
|
Signed-off-by: Michael Fellinger <m.fellinger@gmail.com>
|
|
46
62
|
|
|
47
|
-
[9eb26bb |
|
|
63
|
+
[9eb26bb | 2009-03-21 05:00:38 UTC] Preston Marshall <preston@synergy-solutions.biz>
|
|
48
64
|
|
|
49
65
|
* Updated view path for latest svn (not sure when it was added, but it works with this) temp views may be affected too, but have not tried them yet
|
|
50
66
|
|
|
51
67
|
Signed-off-by: Michael Fellinger <m.fellinger@gmail.com>
|
|
52
68
|
|
|
53
|
-
[6b23e9c |
|
|
69
|
+
[6b23e9c | 2009-03-21 17:00:04 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
54
70
|
|
|
55
71
|
* remove Model#saved?, that makes Model#save work as expected
|
|
56
72
|
|
|
57
|
-
[c83c392 |
|
|
73
|
+
[c83c392 | 2009-03-21 16:55:57 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
58
74
|
|
|
59
75
|
* Remove last traces of NotNaughty from example
|
|
60
76
|
|
|
61
|
-
[19a63b5 |
|
|
77
|
+
[19a63b5 | 2009-03-02 01:08:08 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
62
78
|
|
|
63
79
|
* Fix inspect for Database
|
|
64
80
|
|
|
65
|
-
[5ae5345 |
|
|
81
|
+
[5ae5345 | 2009-03-01 14:23:15 UTC] Tadahiko Uehara <kikofx@gmail.com>
|
|
66
82
|
|
|
67
83
|
* Use Array() instead of to_a for Ruby 1.9 compatibility.
|
|
68
84
|
|
|
69
|
-
[1ff34ab |
|
|
85
|
+
[1ff34ab | 2009-02-28 14:24:53 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
70
86
|
|
|
71
87
|
* Shame on me, forgot to add that change... will push new version tomorrow
|
|
72
88
|
|
|
73
89
|
Signed-off-by: Tadahiko Uehara <kikofX@gmail.com>
|
|
74
90
|
|
|
75
|
-
[dfc353a |
|
|
91
|
+
[dfc353a | 2009-02-28 14:23:39 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
76
92
|
|
|
77
93
|
* Version 2009.03.01, removed json gem dependency as ruby 1.9.1 has it in stdlib
|
|
78
94
|
|
|
79
95
|
Signed-off-by: Tadahiko Uehara <kikofX@gmail.com>
|
|
80
96
|
|
|
81
|
-
[29fe7ec |
|
|
97
|
+
[29fe7ec | 2009-02-28 15:24:53 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
82
98
|
|
|
83
99
|
* Shame on me, forgot to add that change... will push new version tomorrow
|
|
84
100
|
|
|
85
|
-
[349be0a |
|
|
101
|
+
[349be0a | 2009-02-28 15:23:39 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
86
102
|
|
|
87
103
|
* Version 2009.03.01, removed json gem dependency as ruby 1.9.1 has it in stdlib
|
|
88
104
|
|
|
89
|
-
[ad1a97d |
|
|
105
|
+
[ad1a97d | 2009-02-23 00:51:19 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
90
106
|
|
|
91
107
|
* Proper fallback to default_language
|
|
92
108
|
|
|
93
109
|
Signed-off-by: Tadahiko Uehara <kikofX@gmail.com>
|
|
94
110
|
|
|
95
|
-
[4b89942 |
|
|
111
|
+
[4b89942 | 2009-02-16 07:32:02 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
96
112
|
|
|
97
113
|
* Some docs for localize plugin
|
|
98
114
|
|
|
99
115
|
Signed-off-by: Tadahiko Uehara <kikofX@gmail.com>
|
|
100
116
|
|
|
101
|
-
[b79a538 |
|
|
117
|
+
[b79a538 | 2009-02-16 07:31:55 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
102
118
|
|
|
103
119
|
* Support for default language in localize plugin
|
|
104
120
|
|
|
105
121
|
Signed-off-by: Tadahiko Uehara <kikofX@gmail.com>
|
|
106
122
|
|
|
107
|
-
[de84c8b |
|
|
123
|
+
[de84c8b | 2009-02-18 01:45:30 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
108
124
|
|
|
109
125
|
* Update version
|
|
110
126
|
|
|
111
127
|
Signed-off-by: Tadahiko Uehara <kikofX@gmail.com>
|
|
112
128
|
|
|
113
|
-
[4d4a4c1 |
|
|
129
|
+
[4d4a4c1 | 2009-02-16 07:24:51 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
114
130
|
|
|
115
131
|
* Add plugin/localize
|
|
116
132
|
|
|
117
133
|
Signed-off-by: Tadahiko Uehara <kikofX@gmail.com>
|
|
118
134
|
|
|
119
|
-
[83e9177 |
|
|
135
|
+
[83e9177 | 2009-02-23 01:51:19 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
120
136
|
|
|
121
137
|
* Proper fallback to default_language
|
|
122
138
|
|
|
123
|
-
[a72c2c6 |
|
|
139
|
+
[a72c2c6 | 2009-02-18 02:45:30 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
124
140
|
|
|
125
141
|
* Update version
|
|
126
142
|
|
|
127
|
-
[1feac5a |
|
|
143
|
+
[1feac5a | 2009-02-16 08:32:02 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
128
144
|
|
|
129
145
|
* Some docs for localize plugin
|
|
130
146
|
|
|
131
|
-
[4ab5df7 |
|
|
147
|
+
[4ab5df7 | 2009-02-16 08:31:55 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
132
148
|
|
|
133
149
|
* Support for default language in localize plugin
|
|
134
150
|
|
|
135
|
-
[cd045a1 |
|
|
151
|
+
[cd045a1 | 2009-02-16 08:24:51 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
136
152
|
|
|
137
153
|
* Add plugin/localize
|
|
138
154
|
|
|
139
|
-
[fddd7aa |
|
|
155
|
+
[fddd7aa | 2009-02-13 05:41:25 UTC] Tadahiko Uehara <kikofx@gmail.com>
|
|
140
156
|
|
|
141
157
|
* fix typo.
|
|
142
158
|
|
|
143
159
|
Signed-off-by: Michael Fellinger <m.fellinger@gmail.com>
|
|
144
160
|
|
|
145
|
-
[5469f31 |
|
|
161
|
+
[5469f31 | 2009-02-13 06:41:25 UTC] Tadahiko Uehara <kikofx@gmail.com>
|
|
146
162
|
|
|
147
163
|
* fix typo.
|
|
148
164
|
|
|
149
|
-
[025964f |
|
|
165
|
+
[025964f | 2009-01-15 02:35:37 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
150
166
|
|
|
151
167
|
* Sofa is now called Makura
|
|
152
168
|
|
|
153
|
-
[e8bfaf9 |
|
|
169
|
+
[e8bfaf9 | 2008-12-29 17:09:46 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
154
170
|
|
|
155
171
|
* Don't rely on NotNaughty!
|
|
156
172
|
|
|
157
|
-
[fb10169 |
|
|
173
|
+
[fb10169 | 2008-12-24 04:56:55 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
158
174
|
|
|
159
175
|
* Release 2008.12.24
|
|
160
176
|
|
|
161
|
-
[e4b2a88 |
|
|
177
|
+
[e4b2a88 | 2008-12-24 04:56:29 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
162
178
|
|
|
163
179
|
* Layout::PATH
|
|
164
180
|
|
|
165
|
-
[2156ed1 |
|
|
181
|
+
[2156ed1 | 2008-12-24 04:55:37 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
166
182
|
|
|
167
183
|
* Remove Rack as dependency
|
|
168
184
|
|
|
169
|
-
[b9a9724 |
|
|
185
|
+
[b9a9724 | 2008-12-21 08:51:18 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
170
186
|
|
|
171
187
|
* Support for map/reduce templating
|
|
172
188
|
|
|
173
|
-
[411786e |
|
|
189
|
+
[411786e | 2008-12-19 12:08:11 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
174
190
|
|
|
175
191
|
* Better error message if resource not found
|
|
176
192
|
|
|
177
|
-
[6579ae3 |
|
|
193
|
+
[6579ae3 | 2008-12-16 02:57:40 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
178
194
|
|
|
179
195
|
* Fix usage of pretty_from_md5
|
|
180
196
|
|
|
181
|
-
[514c7d6 |
|
|
197
|
+
[514c7d6 | 2008-12-15 07:03:43 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
182
198
|
|
|
183
199
|
* Update gemspec
|
|
184
200
|
|
|
185
|
-
[05640a9 |
|
|
201
|
+
[05640a9 | 2008-12-15 07:03:02 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
186
202
|
|
|
187
203
|
* Remove dependency on not_naughty
|
|
188
204
|
|
|
189
|
-
[c72821d |
|
|
205
|
+
[c72821d | 2008-12-15 07:02:44 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
190
206
|
|
|
191
207
|
* Convert MD5 from CouchDB uuid generator into base 62
|
|
192
208
|
|
|
193
|
-
[405d360 |
|
|
209
|
+
[405d360 | 2008-12-14 06:40:52 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
194
210
|
|
|
195
211
|
* Implement Model#hash and Model#eql?
|
|
196
212
|
|
|
197
|
-
[87c709e |
|
|
213
|
+
[87c709e | 2008-12-13 04:18:14 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
198
214
|
|
|
199
215
|
* Model::multi_fetch and Model::multi_fetch_with_docs
|
|
200
216
|
|
|
201
|
-
[7e369ed |
|
|
217
|
+
[7e369ed | 2008-12-12 06:27:34 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
202
218
|
|
|
203
219
|
* Ignore nil value parameters for the uri
|
|
204
220
|
|
|
205
|
-
[5decf5c |
|
|
221
|
+
[5decf5c | 2008-12-12 06:03:28 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
206
222
|
|
|
207
223
|
* Rescue correct error on Model::[]
|
|
208
224
|
|
|
209
|
-
[bc28450 |
|
|
225
|
+
[bc28450 | 2008-12-11 10:11:57 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
210
226
|
|
|
211
227
|
* Disable caching automatically if memcached isn't available
|
|
212
228
|
|
|
213
|
-
[aea3dd7 |
|
|
229
|
+
[aea3dd7 | 2008-12-10 14:45:16 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
214
230
|
|
|
215
231
|
* Add Model#detach to get rid of attachments
|
|
216
232
|
|
|
217
|
-
[1705ad2 |
|
|
233
|
+
[1705ad2 | 2008-12-08 05:31:11 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
218
234
|
|
|
219
235
|
* CACHE_TTL is now 5 by default
|
|
220
236
|
|
|
221
|
-
[e6aa3f9 |
|
|
237
|
+
[e6aa3f9 | 2008-12-04 08:31:07 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
222
238
|
|
|
223
239
|
* Make only one request per relation
|
|
224
240
|
|
|
225
|
-
[c47cea0 |
|
|
241
|
+
[c47cea0 | 2008-12-04 08:30:39 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
226
242
|
|
|
227
243
|
* Add Model#to_json
|
|
228
244
|
|
|
229
|
-
[aceb7e7 |
|
|
245
|
+
[aceb7e7 | 2008-12-04 08:30:18 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
230
246
|
|
|
231
247
|
* Add support for caching GET requests in memcached
|
|
232
248
|
|
|
233
|
-
[c055759 |
|
|
249
|
+
[c055759 | 2008-12-04 05:36:15 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
234
250
|
|
|
235
251
|
* a little bit better error handling
|
|
236
252
|
|
|
237
|
-
[204f003 |
|
|
253
|
+
[204f003 | 2008-12-03 02:49:13 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
238
254
|
|
|
239
255
|
* Version 2008.12.03
|
|
240
256
|
|
|
241
|
-
[2eec148 |
|
|
257
|
+
[2eec148 | 2008-12-01 15:58:20 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
242
258
|
|
|
243
259
|
* Avoid storing empty maps, bad bad mojo
|
|
244
260
|
|
|
245
|
-
[617b9f6 |
|
|
261
|
+
[617b9f6 | 2008-11-29 06:53:53 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
246
262
|
|
|
247
263
|
* Version 2008.11.29
|
|
248
264
|
|
|
249
|
-
[cbe43fa |
|
|
265
|
+
[cbe43fa | 2008-11-29 06:53:14 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
250
266
|
|
|
251
267
|
* Remove debugging output
|
|
252
268
|
|
|
253
|
-
[67f811e |
|
|
269
|
+
[67f811e | 2008-11-28 07:52:46 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
254
270
|
|
|
255
271
|
* Compensate for a bug in couch_httpd_view.erl
|
|
256
272
|
|
|
257
|
-
[ba95c06 |
|
|
273
|
+
[ba95c06 | 2008-11-28 07:51:56 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
258
274
|
|
|
259
275
|
* Automatic conversion of Time, new :type parameter for property
|
|
260
276
|
|
|
261
|
-
[2b2cffd |
|
|
277
|
+
[2b2cffd | 2008-11-28 07:51:19 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
262
278
|
|
|
263
279
|
* Allow Database#[]= to save docs
|
|
264
280
|
|
|
265
|
-
[9b2ab26 |
|
|
281
|
+
[9b2ab26 | 2008-11-27 13:57:39 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
266
282
|
|
|
267
283
|
* Update gemspec, correct files
|
|
268
284
|
|
|
269
|
-
[3c0541b |
|
|
285
|
+
[3c0541b | 2008-11-27 13:11:22 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
270
286
|
|
|
271
287
|
* Plugin functionality and pager plugin
|
|
272
288
|
|
|
273
|
-
[22840cb |
|
|
289
|
+
[22840cb | 2008-11-27 13:10:57 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
274
290
|
|
|
275
291
|
* Allow layout :map => source, :reduce => source
|
|
276
292
|
|
|
277
|
-
[ae9aeb5 |
|
|
293
|
+
[ae9aeb5 | 2008-11-27 13:10:08 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
278
294
|
|
|
279
295
|
* Model::view_with_docs to take advantage of include_docs
|
|
280
296
|
|
|
281
|
-
[8a5e7ca |
|
|
297
|
+
[8a5e7ca | 2008-11-27 10:30:48 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
282
298
|
|
|
283
299
|
* Version 2008.11.27
|
|
284
300
|
|
|
285
|
-
[753cfa7 |
|
|
301
|
+
[753cfa7 | 2008-11-27 10:26:28 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
286
302
|
|
|
287
303
|
* add bin/sofa for quick debugging sessions
|
|
288
304
|
|
|
289
|
-
[d2a0886 |
|
|
305
|
+
[d2a0886 | 2008-11-27 10:26:07 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
290
306
|
|
|
291
307
|
* Small refactor
|
|
292
308
|
|
|
293
|
-
[b1bdaf0 |
|
|
309
|
+
[b1bdaf0 | 2008-11-25 10:44:05 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
294
310
|
|
|
295
311
|
* Enable cloning
|
|
296
312
|
|
|
297
|
-
[09dea66 |
|
|
313
|
+
[09dea66 | 2008-11-25 09:57:15 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
298
314
|
|
|
299
315
|
* add encode_attachments
|
|
300
316
|
|
|
301
|
-
[3277f11 |
|
|
317
|
+
[3277f11 | 2008-11-25 09:31:04 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
302
318
|
|
|
303
319
|
* Adding MIT license
|
|
304
320
|
|
|
305
|
-
[f6dd8ef |
|
|
321
|
+
[f6dd8ef | 2008-11-25 09:30:35 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
306
322
|
|
|
307
323
|
* Document some of Sofa::Server
|
|
308
324
|
|
|
309
|
-
[3f0bc71 |
|
|
325
|
+
[3f0bc71 | 2008-11-25 09:30:22 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
310
326
|
|
|
311
327
|
* Make relations sane
|
|
312
328
|
|
|
313
|
-
[041dfd1 |
|
|
329
|
+
[041dfd1 | 2008-11-25 09:29:57 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
314
330
|
|
|
315
331
|
* Expand and document Sofa::Database
|
|
316
332
|
|
|
317
|
-
[032b958 |
|
|
333
|
+
[032b958 | 2008-11-25 09:29:01 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
318
334
|
|
|
319
335
|
* Better errors
|
|
320
336
|
|
|
321
|
-
[0bd7246 |
|
|
337
|
+
[0bd7246 | 2008-11-21 12:07:47 UTC] Michael Fellinger <m.fellinger@gmail.com>
|
|
322
338
|
|
|
323
339
|
* Inaugral commit
|
|
324
340
|
|
data/MANIFEST
CHANGED
|
@@ -23,13 +23,20 @@ lib/makura/server.rb
|
|
|
23
23
|
lib/makura/uuid_cache.rb
|
|
24
24
|
lib/makura/version.rb
|
|
25
25
|
makura.gemspec
|
|
26
|
+
tasks/authors.rake
|
|
26
27
|
tasks/bacon.rake
|
|
27
28
|
tasks/changelog.rake
|
|
29
|
+
tasks/copyright.rake
|
|
28
30
|
tasks/gem.rake
|
|
29
31
|
tasks/gem_installer.rake
|
|
32
|
+
tasks/git.rake
|
|
30
33
|
tasks/grancher.rake
|
|
31
|
-
tasks/install_dependencies.rake
|
|
32
34
|
tasks/manifest.rake
|
|
35
|
+
tasks/metric_changes.rake
|
|
33
36
|
tasks/rcov.rake
|
|
34
37
|
tasks/release.rake
|
|
35
38
|
tasks/reversion.rake
|
|
39
|
+
tasks/todo.rake
|
|
40
|
+
tasks/traits.rake
|
|
41
|
+
tasks/yard.rake
|
|
42
|
+
tasks/ycov.rake
|
data/Rakefile
CHANGED
|
@@ -6,16 +6,16 @@ require 'date'
|
|
|
6
6
|
|
|
7
7
|
PROJECT_SPECS = Dir['spec/**/*.rb']
|
|
8
8
|
PROJECT_MODULE = 'Makura'
|
|
9
|
+
PROJECT_VERSION = ENV['VERSION'] || Date.today.strftime("%Y.%m.%d")
|
|
9
10
|
|
|
10
11
|
GEMSPEC = Gem::Specification.new{|s|
|
|
11
12
|
s.name = 'makura'
|
|
12
13
|
s.author = "Michael 'manveru' Fellinger"
|
|
13
14
|
s.summary = "Ruby wrapper around the CouchDB REST API."
|
|
14
|
-
s.description = "Ruby wrapper around the CouchDB REST API."
|
|
15
15
|
s.email = 'm.fellinger@gmail.com'
|
|
16
16
|
s.homepage = 'http://github.com/manveru/makura'
|
|
17
17
|
s.platform = Gem::Platform::RUBY
|
|
18
|
-
s.version =
|
|
18
|
+
s.version = PROJECT_VERSION
|
|
19
19
|
s.files = `git ls-files`.split("\n").sort
|
|
20
20
|
s.has_rdoc = true
|
|
21
21
|
s.require_path = 'lib'
|
data/lib/makura/database.rb
CHANGED
data/lib/makura/model.rb
CHANGED
|
@@ -343,7 +343,7 @@ module Makura
|
|
|
343
343
|
|
|
344
344
|
def view(name, opts = {})
|
|
345
345
|
flat = opts.delete(:flat)
|
|
346
|
-
hash = database.view("#{Makura.escape(self)}/#{name}", opts)
|
|
346
|
+
hash = database.view("#{Makura.escape(self)}/_view/#{name}", opts)
|
|
347
347
|
|
|
348
348
|
convert_raw(hash['rows'], flat)
|
|
349
349
|
end
|
data/lib/makura/version.rb
CHANGED
data/makura.gemspec
CHANGED
|
@@ -2,20 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = %q{makura}
|
|
5
|
-
s.version = "2009.
|
|
5
|
+
s.version = "2009.05.27"
|
|
6
6
|
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
8
8
|
s.authors = ["Michael 'manveru' Fellinger"]
|
|
9
|
-
s.date = %q{2009-
|
|
9
|
+
s.date = %q{2009-05-27}
|
|
10
10
|
s.default_executable = %q{makura}
|
|
11
|
-
s.description = %q{Ruby wrapper around the CouchDB REST API.}
|
|
12
11
|
s.email = %q{m.fellinger@gmail.com}
|
|
13
12
|
s.executables = ["makura"]
|
|
14
|
-
s.files = ["CHANGELOG", "COPYING", "MANIFEST", "README.md", "Rakefile", "bin/makura", "example/blog.rb", "example/couch/map/author_all.js", "example/couch/map/author_posts.js", "example/couch/map/post_all.js", "example/couch/map/post_comments.js", "example/couch/reduce/sum_length.js", "lib/makura.rb", "lib/makura/database.rb", "lib/makura/design.rb", "lib/makura/error.rb", "lib/makura/http_methods.rb", "lib/makura/layout.rb", "lib/makura/model.rb", "lib/makura/plugin/localize.rb", "lib/makura/plugin/pager.rb", "lib/makura/server.rb", "lib/makura/uuid_cache.rb", "lib/makura/version.rb", "makura.gemspec", "tasks/bacon.rake", "tasks/changelog.rake", "tasks/gem.rake", "tasks/gem_installer.rake", "tasks/
|
|
15
|
-
s.has_rdoc = true
|
|
13
|
+
s.files = ["CHANGELOG", "COPYING", "MANIFEST", "README.md", "Rakefile", "bin/makura", "example/blog.rb", "example/couch/map/author_all.js", "example/couch/map/author_posts.js", "example/couch/map/post_all.js", "example/couch/map/post_comments.js", "example/couch/reduce/sum_length.js", "lib/makura.rb", "lib/makura/database.rb", "lib/makura/design.rb", "lib/makura/error.rb", "lib/makura/http_methods.rb", "lib/makura/layout.rb", "lib/makura/model.rb", "lib/makura/plugin/localize.rb", "lib/makura/plugin/pager.rb", "lib/makura/server.rb", "lib/makura/uuid_cache.rb", "lib/makura/version.rb", "makura.gemspec", "tasks/authors.rake", "tasks/bacon.rake", "tasks/changelog.rake", "tasks/copyright.rake", "tasks/gem.rake", "tasks/gem_installer.rake", "tasks/git.rake", "tasks/grancher.rake", "tasks/manifest.rake", "tasks/metric_changes.rake", "tasks/rcov.rake", "tasks/release.rake", "tasks/reversion.rake", "tasks/todo.rake", "tasks/traits.rake", "tasks/yard.rake", "tasks/ycov.rake"]
|
|
16
14
|
s.homepage = %q{http://github.com/manveru/makura}
|
|
17
15
|
s.require_paths = ["lib"]
|
|
18
|
-
s.rubygems_version = %q{1.3.
|
|
16
|
+
s.rubygems_version = %q{1.3.3}
|
|
19
17
|
s.summary = %q{Ruby wrapper around the CouchDB REST API.}
|
|
20
18
|
|
|
21
19
|
if s.respond_to? :specification_version then
|
data/tasks/authors.rake
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Once git has a fix for the glibc in handling .mailmap and another fix for
|
|
2
|
+
# allowing empty mail address to be mapped in .mailmap we won't have to handle
|
|
3
|
+
# them manually.
|
|
4
|
+
|
|
5
|
+
desc 'Update AUTHORS'
|
|
6
|
+
task :authors do
|
|
7
|
+
authors = Hash.new(0)
|
|
8
|
+
|
|
9
|
+
`git shortlog -nse`.scan(/(\d+)\s(.+)\s<(.*)>$/) do |count, name, email|
|
|
10
|
+
case name
|
|
11
|
+
when "ahoward"
|
|
12
|
+
name, email = "Ara T. Howard", "ara.t.howard@gmail.com"
|
|
13
|
+
when "Martin Hilbig blueonyx@dev-area.net"
|
|
14
|
+
name, email = "Martin Hilbig", "blueonyx@dev-area.net"
|
|
15
|
+
when "Michael Fellinger m.fellinger@gmail.com"
|
|
16
|
+
name, email = "Michael Fellinger", "m.fellinger@gmail.com"
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
authors[[name, email]] += count.to_i
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
File.open('AUTHORS', 'w+') do |io|
|
|
23
|
+
io.puts "Following persons have contributed to #{GEMSPEC.name}."
|
|
24
|
+
io.puts '(Sorted by number of submitted patches, then alphabetically)'
|
|
25
|
+
io.puts ''
|
|
26
|
+
authors.sort_by{|(n,e),c| [-c, n.downcase] }.each do |(name, email), count|
|
|
27
|
+
io.puts("%6d %s <%s>" % [count, name, email])
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
data/tasks/bacon.rake
CHANGED
|
@@ -2,48 +2,65 @@ desc 'Run all bacon specs with pretty output'
|
|
|
2
2
|
task :bacon => :install_dependencies do
|
|
3
3
|
require 'open3'
|
|
4
4
|
require 'scanf'
|
|
5
|
+
require 'matrix'
|
|
5
6
|
|
|
6
7
|
specs = PROJECT_SPECS
|
|
7
8
|
|
|
8
9
|
some_failed = false
|
|
9
|
-
|
|
10
|
+
specs_size = specs.size
|
|
10
11
|
len = specs.map{|s| s.size }.sort.last
|
|
11
|
-
|
|
12
|
+
total_tests = total_assertions = total_failures = total_errors = 0
|
|
13
|
+
totals = Vector[0, 0, 0, 0]
|
|
12
14
|
|
|
13
15
|
red, yellow, green = "\e[31m%s\e[0m", "\e[33m%s\e[0m", "\e[32m%s\e[0m"
|
|
14
16
|
left_format = "%4d/%d: %-#{len + 11}s"
|
|
15
17
|
spec_format = "%d specifications (%d requirements), %d failures, %d errors"
|
|
16
18
|
|
|
17
19
|
specs.each_with_index do |spec, idx|
|
|
18
|
-
print(left_format % [idx + 1,
|
|
20
|
+
print(left_format % [idx + 1, specs_size, spec])
|
|
19
21
|
|
|
20
22
|
Open3.popen3(RUBY, spec) do |sin, sout, serr|
|
|
21
|
-
out = sout.read
|
|
22
|
-
err = serr.read
|
|
23
|
+
out = sout.read.strip
|
|
24
|
+
err = serr.read.strip
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
# this is conventional, see spec/innate/state/fiber.rb for usage
|
|
27
|
+
if out =~ /^Bacon::Error: (needed .*)/
|
|
28
|
+
puts(yellow % ("%6s %s" % ['', $1]))
|
|
29
|
+
else
|
|
30
|
+
total = nil
|
|
25
31
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
next unless all.any?
|
|
29
|
-
ran = true
|
|
30
|
-
tt += tests; ta += assertions; tf += failures; te += errors
|
|
32
|
+
out.each_line do |line|
|
|
33
|
+
scanned = line.scanf(spec_format)
|
|
31
34
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
else
|
|
37
|
-
puts((green % "%6d passed") % tests)
|
|
35
|
+
next unless scanned.size == 4
|
|
36
|
+
|
|
37
|
+
total = Vector[*scanned]
|
|
38
|
+
break
|
|
38
39
|
end
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
if total
|
|
42
|
+
totals += total
|
|
43
|
+
tests, assertions, failures, errors = total_array = total.to_a
|
|
42
44
|
|
|
43
|
-
|
|
45
|
+
if tests > 0 && failures + errors == 0
|
|
46
|
+
puts((green % "%6d passed") % tests)
|
|
47
|
+
else
|
|
48
|
+
some_failed = true
|
|
49
|
+
puts(red % " failed")
|
|
50
|
+
puts out unless out.empty?
|
|
51
|
+
puts err unless err.empty?
|
|
52
|
+
end
|
|
53
|
+
else
|
|
54
|
+
some_failed = true
|
|
55
|
+
puts(red % " failed")
|
|
56
|
+
puts out unless out.empty?
|
|
57
|
+
puts err unless err.empty?
|
|
58
|
+
end
|
|
59
|
+
end
|
|
44
60
|
end
|
|
45
61
|
end
|
|
46
62
|
|
|
47
|
-
|
|
63
|
+
total_color = some_failed ? red : green
|
|
64
|
+
puts(total_color % (spec_format % totals.to_a))
|
|
48
65
|
exit 1 if some_failed
|
|
49
66
|
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
desc "add copyright to all .rb files in the distribution"
|
|
2
|
+
task :copyright do
|
|
3
|
+
ignore = File.readlines('doc/LEGAL').
|
|
4
|
+
select{|line| line.strip!; File.exist?(line)}.
|
|
5
|
+
map{|file| File.expand_path(file)}
|
|
6
|
+
|
|
7
|
+
puts "adding copyright to files that don't have it currently"
|
|
8
|
+
puts PROJECT_COPYRIGHT
|
|
9
|
+
puts
|
|
10
|
+
|
|
11
|
+
Dir['{lib,test}/**/*{.rb}'].each do |file|
|
|
12
|
+
file = File.expand_path(file)
|
|
13
|
+
next if ignore.include? file
|
|
14
|
+
lines = File.readlines(file).map{|l| l.chomp}
|
|
15
|
+
unless lines.first(PROJECT_COPYRIGHT.size) == PROJECT_COPYRIGHT
|
|
16
|
+
puts "#{file} seems to need attention, first 4 lines:"
|
|
17
|
+
puts lines[0..3]
|
|
18
|
+
puts
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
data/tasks/git.rake
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
namespace :git do
|
|
2
|
+
task :anon do
|
|
3
|
+
sh 'git config remote.origin.url git://github.com/manveru/ramaze'
|
|
4
|
+
puts "You're now accessing ramaze anonymous"
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
task :committer do
|
|
8
|
+
sh 'git config remote.origin.url git@github.com:manveru/ramaze'
|
|
9
|
+
puts "You're now accessing ramaze as committer"
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
desc 'Update from repository'
|
|
13
|
+
task :update do
|
|
14
|
+
puts "Putting your changes on stash"
|
|
15
|
+
sh 'git stash'
|
|
16
|
+
|
|
17
|
+
branch = `git branch`[/^\*\s+(.*)/, 1]
|
|
18
|
+
puts "Current branch is #{branch}"
|
|
19
|
+
|
|
20
|
+
if switch = branch != 'master'
|
|
21
|
+
puts "Switching to master branch"
|
|
22
|
+
sh 'git checkout master'
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
if switch
|
|
26
|
+
puts "Switching to #{branch} branch"
|
|
27
|
+
sh "git checkout '#{branch}'"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
sh 'git stash apply'
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
desc 'Create patch files to send'
|
|
34
|
+
task :send do
|
|
35
|
+
sh 'git format-patch ^HEAD'
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
desc "show some stats about patches"
|
|
39
|
+
task :patchflow do
|
|
40
|
+
patches = `git rev-list HEAD | wc -l`.to_i
|
|
41
|
+
puts "currently we have #{patches} patches"
|
|
42
|
+
init = Time.parse("Sat Oct 14 04:22:49 JST 2006")
|
|
43
|
+
days = (Time.now - init) / (3600 * 24)
|
|
44
|
+
puts "%d days since init, avg %4.2f patches per day" % [days, patches/days]
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
namespace :metric do
|
|
2
|
+
desc 'committed changes per file according to git'
|
|
3
|
+
task 'changes' do
|
|
4
|
+
$stdout.sync = true
|
|
5
|
+
out = lambda{|changes, rb| puts("%4d %s" % [changes, rb]) }
|
|
6
|
+
changes = {}
|
|
7
|
+
|
|
8
|
+
print 'counting changes '
|
|
9
|
+
|
|
10
|
+
Dir.glob 'lib/**/*.rb' do |rb|
|
|
11
|
+
count = `git log --pretty=oneline '#{rb}'`.count("\n")
|
|
12
|
+
print '.'
|
|
13
|
+
# out[changes, rb]
|
|
14
|
+
changes[rb] = count
|
|
15
|
+
end
|
|
16
|
+
puts ' done.'
|
|
17
|
+
|
|
18
|
+
sorted = changes.sort_by{|r,c| c }.reverse
|
|
19
|
+
|
|
20
|
+
top = sorted.first(20)
|
|
21
|
+
unless top.empty?
|
|
22
|
+
puts "Top 20:"
|
|
23
|
+
top.each{|(r,c)| out[c,r] }
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
bottom = sorted.last(20) - top
|
|
27
|
+
unless bottom.empty?
|
|
28
|
+
puts "Bottom 20:"
|
|
29
|
+
bottom.each{|(r,c)| out[c,r] }
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
data/tasks/rcov.rake
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
desc 'code coverage'
|
|
2
2
|
task :rcov => :clean do
|
|
3
|
-
specs =
|
|
4
|
-
specs -= Dir['spec/innate/cache/common.rb']
|
|
3
|
+
specs = PROJECT_SPECS
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
ignore = %w[ gem rack bacon innate hpricot nagoro/lib/nagoro ]
|
|
6
|
+
|
|
7
|
+
if RUBY_VERSION >= '1.8.7'
|
|
8
|
+
ignore << 'begin_with' << 'end_with'
|
|
9
|
+
end
|
|
10
|
+
if RUBY_VERSION < '1.9'
|
|
11
|
+
ignore << 'fiber'
|
|
12
|
+
end
|
|
9
13
|
|
|
10
14
|
ignored = ignore.join(',')
|
|
11
15
|
|
data/tasks/release.rake
CHANGED
|
@@ -1,12 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
task :
|
|
3
|
-
name, version = GEMSPEC.name, GEMSPEC.version
|
|
1
|
+
namespace :release do
|
|
2
|
+
task :all => [:release_github, :release_rubyforge]
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
desc 'Display instructions to release on github'
|
|
5
|
+
task :github => [:reversion, :authors, :gemspec] do
|
|
6
|
+
name, version = GEMSPEC.name, GEMSPEC.version
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
puts <<INSTRUCTIONS
|
|
9
|
+
First add the relevant files:
|
|
10
|
+
|
|
11
|
+
git add AUTHORS MANIFEST CHANGELOG #{name}.gemspec lib/#{name}/version.rb
|
|
12
|
+
|
|
13
|
+
Then commit them, tag the commit, and push:
|
|
14
|
+
|
|
15
|
+
git commit -m 'Version #{version}'
|
|
16
|
+
git tag -a -m '#{version}' '#{version}'
|
|
17
|
+
git push
|
|
18
|
+
|
|
19
|
+
INSTRUCTIONS
|
|
20
|
+
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# TODO: Not tested
|
|
24
|
+
desc 'Display instructions to release on rubyforge'
|
|
25
|
+
task :rubyforge => [:reversion, :authors, :gemspec, :package] do
|
|
26
|
+
name, version = GEMSPEC.name, GEMSPEC.version
|
|
27
|
+
|
|
28
|
+
puts <<INSTRUCTIONS
|
|
29
|
+
To publish to rubyforge do following:
|
|
30
|
+
|
|
31
|
+
rubyforge login
|
|
32
|
+
rubyforge add_release #{name} #{name} '#{version}' pkg/#{name}-#{version}.gem
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
After you have done these steps, see:
|
|
36
|
+
|
|
37
|
+
rake release:rubyforge_archives
|
|
38
|
+
|
|
39
|
+
INSTRUCTIONS
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
desc 'Display instructions to add archives after release:rubyforge'
|
|
43
|
+
task :rubyforge_archives do
|
|
44
|
+
puts "Adding archives for distro packagers is:", ""
|
|
45
|
+
name, version = GEMSPEC.name, GEMSPEC.version
|
|
46
|
+
|
|
47
|
+
Dir["pkg/#{name}-#{version}.{tgz,zip}"].each do |file|
|
|
48
|
+
puts "rubyforge add_file #{name} #{name} '#{version}' '#{file}'"
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
puts
|
|
52
|
+
end
|
|
12
53
|
end
|
data/tasks/todo.rake
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
desc "show a todolist from all the TODO tags in the source"
|
|
2
|
+
task :todo do
|
|
3
|
+
Dir.glob '{lib,spec}/**/*.rb' do |file|
|
|
4
|
+
lastline = todo = comment = long_comment = false
|
|
5
|
+
|
|
6
|
+
File.readlines(file).each_with_index do |line, lineno|
|
|
7
|
+
lineno += 1
|
|
8
|
+
comment = line =~ /^\s*?#.*?$/
|
|
9
|
+
long_comment = line =~ /^=begin/
|
|
10
|
+
long_comment = line =~ /^=end/
|
|
11
|
+
todo = true if line =~ /TODO/ and (long_comment or comment)
|
|
12
|
+
todo = false if line.gsub('#', '').strip.empty?
|
|
13
|
+
todo = false unless comment or long_comment
|
|
14
|
+
if todo
|
|
15
|
+
unless lastline and lastline + 1 == lineno
|
|
16
|
+
puts
|
|
17
|
+
puts "vim #{file} +#{lineno}"
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
l = line.strip.gsub(/^#\s*/, '')
|
|
21
|
+
print ' ' unless l =~ /^-/
|
|
22
|
+
puts l
|
|
23
|
+
lastline = lineno
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
data/tasks/traits.rake
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
desc 'listing of available traits per class/module'
|
|
2
|
+
task 'traits' do
|
|
3
|
+
nodes = Hash.new{|h,k| h[k] = []}
|
|
4
|
+
Dir['lib/**/*.rb'].each do |file|
|
|
5
|
+
content = File.read(file)
|
|
6
|
+
traits = content.grep(/^\s*trait\s*:/)
|
|
7
|
+
traits.each do |trait|
|
|
8
|
+
space = content[0..content.index(trait)].scan(/^\s*(?:class|module)\s+(.*)$/)
|
|
9
|
+
space = space.flatten.join('::')
|
|
10
|
+
nodes[space] << trait.strip
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
nodes.each do |space, traits|
|
|
15
|
+
puts space
|
|
16
|
+
traits.each do |trait|
|
|
17
|
+
print ' ', trait, "\n"
|
|
18
|
+
end
|
|
19
|
+
puts
|
|
20
|
+
end
|
|
21
|
+
end
|
data/tasks/yard.rake
ADDED
data/tasks/ycov.rake
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
begin
|
|
2
|
+
require 'yard'
|
|
3
|
+
|
|
4
|
+
task :ycov => ['.yardoc'] do
|
|
5
|
+
YARD::Registry.load_yardoc
|
|
6
|
+
code_objects = YARD::Registry.paths.map{|path| YARD::Registry.at(path) }
|
|
7
|
+
without_doc, with_doc = code_objects.partition{|obj| obj.docstring.empty? }
|
|
8
|
+
|
|
9
|
+
documented = with_doc.size
|
|
10
|
+
undocumented = without_doc.size
|
|
11
|
+
total = documented + undocumented
|
|
12
|
+
percentage = (documented / 0.01) / total
|
|
13
|
+
|
|
14
|
+
puts "Documentation coverage is %d/%d (%3.1f%%)" % [documented, total, percentage]
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
file '.yardoc' => FileList['lib/**/*.rb'] do
|
|
18
|
+
files = ['lib/**/*.rb']
|
|
19
|
+
options = ['--no-output', '--private']
|
|
20
|
+
YARD::CLI::Yardoc.run(*(options + files))
|
|
21
|
+
end
|
|
22
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: manveru-makura
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2009.
|
|
4
|
+
version: 2009.05.27
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael 'manveru' Fellinger
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-
|
|
12
|
+
date: 2009-05-27 00:00:00 -07:00
|
|
13
13
|
default_executable: makura
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
@@ -22,7 +22,7 @@ dependencies:
|
|
|
22
22
|
- !ruby/object:Gem::Version
|
|
23
23
|
version: 0.8.1
|
|
24
24
|
version:
|
|
25
|
-
description:
|
|
25
|
+
description:
|
|
26
26
|
email: m.fellinger@gmail.com
|
|
27
27
|
executables:
|
|
28
28
|
- makura
|
|
@@ -56,17 +56,24 @@ files:
|
|
|
56
56
|
- lib/makura/uuid_cache.rb
|
|
57
57
|
- lib/makura/version.rb
|
|
58
58
|
- makura.gemspec
|
|
59
|
+
- tasks/authors.rake
|
|
59
60
|
- tasks/bacon.rake
|
|
60
61
|
- tasks/changelog.rake
|
|
62
|
+
- tasks/copyright.rake
|
|
61
63
|
- tasks/gem.rake
|
|
62
64
|
- tasks/gem_installer.rake
|
|
65
|
+
- tasks/git.rake
|
|
63
66
|
- tasks/grancher.rake
|
|
64
|
-
- tasks/install_dependencies.rake
|
|
65
67
|
- tasks/manifest.rake
|
|
68
|
+
- tasks/metric_changes.rake
|
|
66
69
|
- tasks/rcov.rake
|
|
67
70
|
- tasks/release.rake
|
|
68
71
|
- tasks/reversion.rake
|
|
69
|
-
|
|
72
|
+
- tasks/todo.rake
|
|
73
|
+
- tasks/traits.rake
|
|
74
|
+
- tasks/yard.rake
|
|
75
|
+
- tasks/ycov.rake
|
|
76
|
+
has_rdoc: false
|
|
70
77
|
homepage: http://github.com/manveru/makura
|
|
71
78
|
post_install_message:
|
|
72
79
|
rdoc_options: []
|