popolo 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +65 -7
  3. data/app/assets/javascripts/popolo.js +1 -0
  4. data/app/assets/stylesheets/popolo/bootstrap.min.scss +7 -0
  5. data/app/assets/stylesheets/popolo/main.css.scss +14 -0
  6. data/app/assets/stylesheets/popolo.css +3 -0
  7. data/app/controllers/popolo/memberships_controller.rb +7 -0
  8. data/app/controllers/popolo/organizations_controller.rb +0 -39
  9. data/app/controllers/popolo/people_controller.rb +1 -6
  10. data/app/controllers/popolo/posts_controller.rb +1 -1
  11. data/app/helpers/popolo_helper.rb +0 -8
  12. data/app/models/popolo/area.rb +20 -12
  13. data/app/models/popolo/contact_detail.rb +22 -0
  14. data/app/models/popolo/count.rb +24 -0
  15. data/app/models/popolo/date_string.rb +23 -0
  16. data/app/models/popolo/group_result.rb +15 -0
  17. data/app/models/popolo/identifier.rb +1 -1
  18. data/app/models/popolo/link.rb +7 -3
  19. data/app/models/popolo/membership.rb +34 -9
  20. data/app/models/popolo/motion.rb +37 -0
  21. data/app/models/popolo/organization.rb +37 -16
  22. data/app/models/popolo/other_name.rb +5 -5
  23. data/app/models/popolo/person.rb +57 -27
  24. data/app/models/popolo/post.rb +27 -13
  25. data/app/models/popolo/vote.rb +28 -0
  26. data/app/models/popolo/vote_event.rb +35 -0
  27. data/app/views/popolo/contact_details/_contact_detail.html.erb +17 -0
  28. data/app/views/popolo/identifiers/_identifier.html.erb +2 -0
  29. data/app/views/popolo/links/_link.html.erb +1 -0
  30. data/app/views/popolo/memberships/show.html.erb +81 -0
  31. data/app/views/popolo/organizations/index.html.erb +16 -1
  32. data/app/views/popolo/organizations/show.html.erb +146 -1
  33. data/app/views/popolo/other_names/other_name.html.erb +9 -0
  34. data/app/views/popolo/people/show.html.erb +120 -0
  35. data/app/views/popolo/posts/show.html.erb +90 -0
  36. data/config/routes.rb +4 -12
  37. data/lib/generators/popolo_generator.rb +4 -0
  38. data/lib/popolo/initializers/pupa_compat.rb +11 -0
  39. data/lib/popolo/version.rb +1 -1
  40. data/lib/popolo.rb +17 -5
  41. data/spec/controllers/popolo/memberships_controller_spec.rb +16 -0
  42. data/spec/controllers/popolo/organizations_controller_spec.rb +1 -47
  43. data/spec/controllers/popolo/people_controller_spec.rb +0 -14
  44. data/spec/controllers/popolo/posts_controller_spec.rb +0 -8
  45. data/spec/dummy/app/assets/stylesheets/application.css +1 -0
  46. data/spec/dummy/app/models/cat.rb +0 -3
  47. data/spec/dummy/app/models/dog.rb +0 -7
  48. data/spec/dummy/app/views/layouts/application.html.erb +2 -0
  49. data/spec/dummy/config/locales/en.yml +30 -0
  50. data/spec/dummy/config/routes.rb +1 -1
  51. data/spec/dummy/log/test.log +8670 -48801
  52. data/spec/factories.rb +3 -8
  53. data/spec/models/popolo/{source_spec.rb → contact_detail_spec.rb} +2 -2
  54. data/spec/models/popolo/count_spec.rb +7 -0
  55. data/spec/models/popolo/date_string_spec.rb +121 -0
  56. data/spec/models/popolo/group_result_spec.rb +7 -0
  57. data/spec/models/popolo/membership_spec.rb +1 -17
  58. data/spec/models/popolo/motion_spec.rb +5 -0
  59. data/spec/models/popolo/organization_spec.rb +1 -19
  60. data/spec/models/popolo/other_name_spec.rb +1 -17
  61. data/spec/models/popolo/person_spec.rb +23 -19
  62. data/spec/models/popolo/post_spec.rb +1 -3
  63. data/spec/models/popolo/vote_event_spec.rb +4 -0
  64. data/spec/models/popolo/vote_spec.rb +4 -0
  65. data/spec/popolo_spec.rb +65 -0
  66. data/spec/routing/popolo/memberships_routing_spec.rb +11 -0
  67. data/spec/routing/popolo/organizations_routing_spec.rb +1 -19
  68. data/spec/routing/popolo/people_routing_spec.rb +1 -11
  69. data/spec/routing/popolo/posts_routing_spec.rb +1 -7
  70. data/spec/spec_helper.rb +6 -1
  71. data/spec/support/shared_examples.rb +19 -0
  72. metadata +99 -109
  73. data/app/assets/javascripts/popolo/application.js +0 -13
  74. data/app/assets/stylesheets/popolo/application.css +0 -13
  75. data/app/controllers/popolo/areas_controller.rb +0 -43
  76. data/app/models/popolo/address.rb +0 -27
  77. data/app/models/popolo/event.rb +0 -46
  78. data/app/models/popolo/source.rb +0 -29
  79. data/app/views/popolo/addresses/_address.html.erb +0 -16
  80. data/app/views/popolo/areas/index.html.erb +0 -1
  81. data/app/views/popolo/areas/show.html.erb +0 -1
  82. data/app/views/popolo/areas_or_organizations/_breadcrumb.html.erb +0 -13
  83. data/app/views/popolo/areas_or_organizations/_index.html.erb +0 -31
  84. data/app/views/popolo/areas_or_organizations/_show.html.erb +0 -18
  85. data/app/views/popolo/organizations/post.html.erb +0 -27
  86. data/app/views/popolo/organizations/posts.html.erb +0 -23
  87. data/app/views/popolo/people/index.html.erb +0 -0
  88. data/app/views/popolo/posts/index.html.erb +0 -0
  89. data/lib/popolo/mixins/eventable.rb +0 -15
  90. data/lib/popolo/mixins/sluggable.rb +0 -66
  91. data/spec/controllers/popolo/areas_controller_spec.rb +0 -53
  92. data/spec/dummy/log/development.log +0 -6
  93. data/spec/models/popolo/address_spec.rb +0 -4
  94. data/spec/models/popolo/event_spec.rb +0 -7
  95. data/spec/popolo/mixins/sluggable_spec.rb +0 -153
  96. data/spec/routing/popolo/areas_routing_spec.rb +0 -25
metadata CHANGED
@@ -1,240 +1,225 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: popolo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
5
- prerelease:
4
+ version: 0.0.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Open North
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-02-17 00:00:00.000000000 Z
11
+ date: 2014-12-16 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rails
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
- version: '3.1'
19
+ version: 3.2.16
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '3.1'
26
+ version: 3.2.16
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: inherited_resources
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
33
  version: 1.3.1
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
40
  version: 1.3.1
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: mongoid
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ~>
45
+ - - "~>"
52
46
  - !ruby/object:Gem::Version
53
- version: 3.0.17
47
+ version: 3.1.4
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ~>
52
+ - - "~>"
60
53
  - !ruby/object:Gem::Version
61
- version: 3.0.17
54
+ version: 3.1.4
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: mongoid-tree
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ~>
59
+ - - "~>"
68
60
  - !ruby/object:Gem::Version
69
- version: 1.0.1
61
+ version: 1.0.4
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ~>
66
+ - - "~>"
76
67
  - !ruby/object:Gem::Version
77
- version: 1.0.1
68
+ version: 1.0.4
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: database_cleaner
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ~>
73
+ - - "~>"
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0.9'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ~>
80
+ - - "~>"
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0.9'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: factory_girl_rails
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ~>
87
+ - - "~>"
100
88
  - !ruby/object:Gem::Version
101
89
  version: '4.1'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ~>
94
+ - - "~>"
108
95
  - !ruby/object:Gem::Version
109
96
  version: '4.1'
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: guard-brakeman
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ~>
101
+ - - "~>"
116
102
  - !ruby/object:Gem::Version
117
103
  version: '0.5'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ~>
108
+ - - "~>"
124
109
  - !ruby/object:Gem::Version
125
110
  version: '0.5'
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: guard-bundler
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
- - - ~>
115
+ - - "~>"
132
116
  - !ruby/object:Gem::Version
133
117
  version: '1.0'
134
118
  type: :development
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
- - - ~>
122
+ - - "~>"
140
123
  - !ruby/object:Gem::Version
141
124
  version: '1.0'
142
125
  - !ruby/object:Gem::Dependency
143
126
  name: guard-rspec
144
127
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
128
  requirements:
147
- - - ~>
129
+ - - "~>"
148
130
  - !ruby/object:Gem::Version
149
131
  version: '2.1'
150
132
  type: :development
151
133
  prerelease: false
152
134
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
135
  requirements:
155
- - - ~>
136
+ - - "~>"
156
137
  - !ruby/object:Gem::Version
157
138
  version: '2.1'
158
139
  - !ruby/object:Gem::Dependency
159
140
  name: guard-spork
160
141
  requirement: !ruby/object:Gem::Requirement
161
- none: false
162
142
  requirements:
163
- - - ~>
143
+ - - "~>"
164
144
  - !ruby/object:Gem::Version
165
145
  version: '1.2'
166
146
  type: :development
167
147
  prerelease: false
168
148
  version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
149
  requirements:
171
- - - ~>
150
+ - - "~>"
172
151
  - !ruby/object:Gem::Version
173
152
  version: '1.2'
174
153
  - !ruby/object:Gem::Dependency
175
154
  name: rb-fsevent
176
155
  requirement: !ruby/object:Gem::Requirement
177
- none: false
178
156
  requirements:
179
- - - ~>
157
+ - - "~>"
180
158
  - !ruby/object:Gem::Version
181
159
  version: '0.9'
182
160
  type: :development
183
161
  prerelease: false
184
162
  version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
163
  requirements:
187
- - - ~>
164
+ - - "~>"
188
165
  - !ruby/object:Gem::Version
189
166
  version: '0.9'
190
167
  - !ruby/object:Gem::Dependency
191
168
  name: rspec-rails
192
169
  requirement: !ruby/object:Gem::Requirement
193
- none: false
194
170
  requirements:
195
- - - ~>
171
+ - - "~>"
196
172
  - !ruby/object:Gem::Version
197
173
  version: '2.11'
198
174
  type: :development
199
175
  prerelease: false
200
176
  version_requirements: !ruby/object:Gem::Requirement
201
- none: false
202
177
  requirements:
203
- - - ~>
178
+ - - "~>"
204
179
  - !ruby/object:Gem::Version
205
180
  version: '2.11'
206
181
  - !ruby/object:Gem::Dependency
207
182
  name: mongoid-rspec
208
183
  requirement: !ruby/object:Gem::Requirement
209
- none: false
210
184
  requirements:
211
- - - ~>
185
+ - - "~>"
212
186
  - !ruby/object:Gem::Version
213
187
  version: '1.5'
214
188
  type: :development
215
189
  prerelease: false
216
190
  version_requirements: !ruby/object:Gem::Requirement
217
- none: false
218
191
  requirements:
219
- - - ~>
192
+ - - "~>"
220
193
  - !ruby/object:Gem::Version
221
194
  version: '1.5'
222
195
  - !ruby/object:Gem::Dependency
223
196
  name: spork-rails
224
197
  requirement: !ruby/object:Gem::Requirement
225
- none: false
226
198
  requirements:
227
- - - ~>
199
+ - - "~>"
228
200
  - !ruby/object:Gem::Version
229
201
  version: '3.2'
230
202
  type: :development
231
203
  prerelease: false
232
204
  version_requirements: !ruby/object:Gem::Requirement
233
- none: false
234
205
  requirements:
235
- - - ~>
206
+ - - "~>"
236
207
  - !ruby/object:Gem::Version
237
208
  version: '3.2'
209
+ - !ruby/object:Gem::Dependency
210
+ name: coveralls
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - ">="
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - ">="
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
238
223
  description:
239
224
  email:
240
225
  - info@opennorth.ca
@@ -242,55 +227,56 @@ executables: []
242
227
  extensions: []
243
228
  extra_rdoc_files: []
244
229
  files:
245
- - app/assets/javascripts/popolo/application.js
246
- - app/assets/stylesheets/popolo/application.css
247
- - app/controllers/popolo/areas_controller.rb
230
+ - LICENSE
231
+ - README.md
232
+ - Rakefile
233
+ - app/assets/javascripts/popolo.js
234
+ - app/assets/stylesheets/popolo.css
235
+ - app/assets/stylesheets/popolo/bootstrap.min.scss
236
+ - app/assets/stylesheets/popolo/main.css.scss
237
+ - app/controllers/popolo/memberships_controller.rb
248
238
  - app/controllers/popolo/organizations_controller.rb
249
239
  - app/controllers/popolo/people_controller.rb
250
240
  - app/controllers/popolo/posts_controller.rb
251
241
  - app/controllers/popolo_controller.rb
252
242
  - app/helpers/popolo_helper.rb
253
- - app/models/popolo/address.rb
254
243
  - app/models/popolo/area.rb
255
- - app/models/popolo/event.rb
244
+ - app/models/popolo/contact_detail.rb
245
+ - app/models/popolo/count.rb
246
+ - app/models/popolo/date_string.rb
247
+ - app/models/popolo/group_result.rb
256
248
  - app/models/popolo/identifier.rb
257
249
  - app/models/popolo/link.rb
258
250
  - app/models/popolo/membership.rb
251
+ - app/models/popolo/motion.rb
259
252
  - app/models/popolo/organization.rb
260
253
  - app/models/popolo/other_name.rb
261
254
  - app/models/popolo/person.rb
262
255
  - app/models/popolo/post.rb
263
- - app/models/popolo/source.rb
264
- - app/views/popolo/addresses/_address.html.erb
265
- - app/views/popolo/areas/index.html.erb
266
- - app/views/popolo/areas/show.html.erb
267
- - app/views/popolo/areas_or_organizations/_breadcrumb.html.erb
268
- - app/views/popolo/areas_or_organizations/_index.html.erb
269
- - app/views/popolo/areas_or_organizations/_show.html.erb
256
+ - app/models/popolo/vote.rb
257
+ - app/models/popolo/vote_event.rb
258
+ - app/views/popolo/contact_details/_contact_detail.html.erb
259
+ - app/views/popolo/identifiers/_identifier.html.erb
260
+ - app/views/popolo/links/_link.html.erb
261
+ - app/views/popolo/memberships/show.html.erb
270
262
  - app/views/popolo/organizations/index.html.erb
271
- - app/views/popolo/organizations/post.html.erb
272
- - app/views/popolo/organizations/posts.html.erb
273
263
  - app/views/popolo/organizations/show.html.erb
274
- - app/views/popolo/people/index.html.erb
264
+ - app/views/popolo/other_names/other_name.html.erb
275
265
  - app/views/popolo/people/show.html.erb
276
- - app/views/popolo/posts/index.html.erb
277
266
  - app/views/popolo/posts/show.html.erb
278
267
  - config/routes.rb
279
268
  - lib/generators/popolo_generator.rb
280
269
  - lib/generators/templates/README
270
+ - lib/popolo.rb
281
271
  - lib/popolo/engine.rb
282
- - lib/popolo/mixins/eventable.rb
283
- - lib/popolo/mixins/sluggable.rb
272
+ - lib/popolo/initializers/pupa_compat.rb
284
273
  - lib/popolo/version.rb
285
- - lib/popolo.rb
286
- - LICENSE
287
- - Rakefile
288
- - README.md
289
- - spec/controllers/popolo/areas_controller_spec.rb
274
+ - spec/controllers/popolo/memberships_controller_spec.rb
290
275
  - spec/controllers/popolo/organizations_controller_spec.rb
291
276
  - spec/controllers/popolo/people_controller_spec.rb
292
277
  - spec/controllers/popolo/posts_controller_spec.rb
293
278
  - spec/controllers/popolo_controller_spec.rb
279
+ - spec/dummy/Rakefile
294
280
  - spec/dummy/app/assets/javascripts/application.js
295
281
  - spec/dummy/app/assets/stylesheets/application.css
296
282
  - spec/dummy/app/controllers/application_controller.rb
@@ -298,6 +284,7 @@ files:
298
284
  - spec/dummy/app/models/cat.rb
299
285
  - spec/dummy/app/models/dog.rb
300
286
  - spec/dummy/app/views/layouts/application.html.erb
287
+ - spec/dummy/config.ru
301
288
  - spec/dummy/config/application.rb
302
289
  - spec/dummy/config/boot.rb
303
290
  - spec/dummy/config/environment.rb
@@ -310,61 +297,61 @@ files:
310
297
  - spec/dummy/config/locales/en.yml
311
298
  - spec/dummy/config/mongoid.yml
312
299
  - spec/dummy/config/routes.rb
313
- - spec/dummy/config.ru
314
- - spec/dummy/log/development.log
315
300
  - spec/dummy/log/test.log
316
301
  - spec/dummy/public/404.html
317
302
  - spec/dummy/public/422.html
318
303
  - spec/dummy/public/500.html
319
304
  - spec/dummy/public/favicon.ico
320
- - spec/dummy/Rakefile
321
305
  - spec/dummy/script/rails
322
306
  - spec/factories.rb
323
307
  - spec/helpers/popolo_helper_spec.rb
324
- - spec/models/popolo/address_spec.rb
325
308
  - spec/models/popolo/area_spec.rb
326
- - spec/models/popolo/event_spec.rb
309
+ - spec/models/popolo/contact_detail_spec.rb
310
+ - spec/models/popolo/count_spec.rb
311
+ - spec/models/popolo/date_string_spec.rb
312
+ - spec/models/popolo/group_result_spec.rb
327
313
  - spec/models/popolo/identifier_spec.rb
328
314
  - spec/models/popolo/link_spec.rb
329
315
  - spec/models/popolo/membership_spec.rb
316
+ - spec/models/popolo/motion_spec.rb
330
317
  - spec/models/popolo/organization_spec.rb
331
318
  - spec/models/popolo/other_name_spec.rb
332
319
  - spec/models/popolo/person_spec.rb
333
320
  - spec/models/popolo/post_spec.rb
334
- - spec/models/popolo/source_spec.rb
335
- - spec/popolo/mixins/sluggable_spec.rb
321
+ - spec/models/popolo/vote_event_spec.rb
322
+ - spec/models/popolo/vote_spec.rb
336
323
  - spec/popolo_spec.rb
337
- - spec/routing/popolo/areas_routing_spec.rb
324
+ - spec/routing/popolo/memberships_routing_spec.rb
338
325
  - spec/routing/popolo/organizations_routing_spec.rb
339
326
  - spec/routing/popolo/people_routing_spec.rb
340
327
  - spec/routing/popolo/posts_routing_spec.rb
341
328
  - spec/spec_helper.rb
329
+ - spec/support/shared_examples.rb
342
330
  homepage: http://github.com/opennorth/popolo
343
331
  licenses: []
332
+ metadata: {}
344
333
  post_install_message:
345
334
  rdoc_options: []
346
335
  require_paths:
347
336
  - lib
348
337
  required_ruby_version: !ruby/object:Gem::Requirement
349
- none: false
350
338
  requirements:
351
- - - ! '>='
339
+ - - ">="
352
340
  - !ruby/object:Gem::Version
353
341
  version: '0'
354
342
  required_rubygems_version: !ruby/object:Gem::Requirement
355
- none: false
356
343
  requirements:
357
- - - ! '>='
344
+ - - ">="
358
345
  - !ruby/object:Gem::Version
359
346
  version: '0'
360
347
  requirements: []
361
348
  rubyforge_project:
362
- rubygems_version: 1.8.24
349
+ rubygems_version: 2.2.2
363
350
  signing_key:
364
- specification_version: 3
351
+ specification_version: 4
365
352
  summary: A Rails engine for open government websites.
366
353
  test_files:
367
- - spec/controllers/popolo/areas_controller_spec.rb
354
+ - spec/controllers/popolo/memberships_controller_spec.rb
368
355
  - spec/controllers/popolo/organizations_controller_spec.rb
369
356
  - spec/controllers/popolo/people_controller_spec.rb
370
357
  - spec/controllers/popolo/posts_controller_spec.rb
@@ -389,7 +376,6 @@ test_files:
389
376
  - spec/dummy/config/mongoid.yml
390
377
  - spec/dummy/config/routes.rb
391
378
  - spec/dummy/config.ru
392
- - spec/dummy/log/development.log
393
379
  - spec/dummy/log/test.log
394
380
  - spec/dummy/public/404.html
395
381
  - spec/dummy/public/422.html
@@ -399,22 +385,26 @@ test_files:
399
385
  - spec/dummy/script/rails
400
386
  - spec/factories.rb
401
387
  - spec/helpers/popolo_helper_spec.rb
402
- - spec/models/popolo/address_spec.rb
403
388
  - spec/models/popolo/area_spec.rb
404
- - spec/models/popolo/event_spec.rb
389
+ - spec/models/popolo/contact_detail_spec.rb
390
+ - spec/models/popolo/count_spec.rb
391
+ - spec/models/popolo/date_string_spec.rb
392
+ - spec/models/popolo/group_result_spec.rb
405
393
  - spec/models/popolo/identifier_spec.rb
406
394
  - spec/models/popolo/link_spec.rb
407
395
  - spec/models/popolo/membership_spec.rb
396
+ - spec/models/popolo/motion_spec.rb
408
397
  - spec/models/popolo/organization_spec.rb
409
398
  - spec/models/popolo/other_name_spec.rb
410
399
  - spec/models/popolo/person_spec.rb
411
400
  - spec/models/popolo/post_spec.rb
412
- - spec/models/popolo/source_spec.rb
413
- - spec/popolo/mixins/sluggable_spec.rb
401
+ - spec/models/popolo/vote_event_spec.rb
402
+ - spec/models/popolo/vote_spec.rb
414
403
  - spec/popolo_spec.rb
415
- - spec/routing/popolo/areas_routing_spec.rb
404
+ - spec/routing/popolo/memberships_routing_spec.rb
416
405
  - spec/routing/popolo/organizations_routing_spec.rb
417
406
  - spec/routing/popolo/people_routing_spec.rb
418
407
  - spec/routing/popolo/posts_routing_spec.rb
419
408
  - spec/spec_helper.rb
409
+ - spec/support/shared_examples.rb
420
410
  has_rdoc:
@@ -1,13 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // the compiled file.
9
- //
10
- // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
- // GO AFTER THE REQUIRES BELOW.
12
- //
13
- //= require_tree .
@@ -1,13 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the top of the
9
- * compiled file, but it's generally better to create a new file per style scope.
10
- *
11
- *= require_self
12
- *= require_tree .
13
- */
@@ -1,43 +0,0 @@
1
- module Popolo
2
- class AreasController < PopoloController
3
- inherit_resources
4
- # inherited_resources assumes the routes are namespaced. If an engine is
5
- # mounted at root, however, there will be no namespace.
6
- self.resources_configuration[:self][:route_prefix] = nil
7
-
8
- respond_to :html, :json
9
- actions :index, :show
10
- custom_actions collection: :nested_index, resource: :nested_show
11
-
12
- before_filter :validate_path, only: [:nested_index, :nested_show]
13
-
14
- def index
15
- @areas = Area.roots
16
- index!
17
- end
18
-
19
- def nested_index
20
- @areas = @area.children
21
-
22
- nested_index! do |format|
23
- format.html { render action: 'index'}
24
- end
25
- end
26
-
27
- def nested_show
28
- nested_show! do |format|
29
- format.html { render action: 'show'}
30
- end
31
- end
32
-
33
- protected
34
-
35
- # @raises [Mongoid::Errors::DocumentNotFound] if a resource is improperly nested
36
- def validate_path
37
- parts = params[:path].split '/'
38
- parts.each do |part|
39
- @area = Area.find_by(parent_id: @area, slug: part)
40
- end
41
- end
42
- end
43
- end
@@ -1,27 +0,0 @@
1
- module Popolo
2
- # A physical location or a mail delivery point.
3
- class Address
4
- include Mongoid::Document
5
-
6
- embedded_in :addressable, polymorphic: true
7
-
8
- # The address' type, e.g. 'capitol'.
9
- field :type, type: String
10
- # The postal address.
11
- field :address, type: String
12
- # A voice telephone number.
13
- field :voice, type: String
14
- # A facsimile telephone number.
15
- field :fax, type: String
16
- # A mobile telephone number.
17
- field :cell, type: String
18
- # A toll-free telephone number.
19
- field :tollfree, type: String
20
- # A video conferencing telephone number.
21
- field :video, type: String
22
- # A paging device telephone number.
23
- field :pager, type: String
24
- # A telecommunication device for people with hearing or speech difficulties.
25
- field :textphone, type: String
26
- end
27
- end
@@ -1,46 +0,0 @@
1
- module Popolo
2
- # An occurrence, e.g. an action mentioning or performed by an agent.
3
- #
4
- # Turtle document: @todo move into popoloproject.com
5
- #
6
- # <http://example.com/events/57cc67093475061e3d95369d.ttl>
7
- # a cnt:ContentAsText;
8
- # cnt:characterEncoding "UTF-8";
9
- # cnt:chars "Lorem ipsum dolor sit amet, consectetur adipiscing elit. ...";
10
- # dcterms:format "text/plain";
11
- # dcterms:isFormatOf <http://example.org/news/123.html>;
12
- # dcterms:issued "2012-01-01T00:00:00Z"^^xsd:dateTime;
13
- # dcterms:identifier "57cc67093475061e3d95369d";
14
- # dcterms:created "2012-01-01T00:00:00Z"^^xsd:dateTime;
15
- # dcterms:modified "2012-01-01T00:00:00Z"^^xsd:dateTime .
16
- #
17
- # @see http://www.w3.org/TR/Content-in-RDF10/
18
- # @see http://dublincore.org/documents/dcmi-terms/
19
- class Event
20
- include Mongoid::Document
21
- include Mongoid::Timestamps
22
-
23
- # The identifier of the source of information for the event.
24
- field :source, type: String
25
- # The URL to which the event may be attributed.
26
- field :url, type: String
27
- # The event's content.
28
- field :body, type: String
29
- # The time of the event or of its publication.
30
- field :issued_at, type: Time
31
- # The records related to the event.
32
- field :related, type: Hash
33
- # Any additional information about the event.
34
- field :extra, type: Hash
35
-
36
- # @note It's not possible to do a many-to-many polymorphic relation, so we
37
- # must list every index individually.
38
-
39
- index 'related.area' => 1, source: 1, issued_at: -1
40
- index 'related.membership' => 1, source: 1, issued_at: -1
41
- index 'related.organization' => 1, source: 1, issued_at: -1
42
- index 'related.post' => 1, source: 1, issued_at: -1
43
-
44
- validates_presence_of :source, :url, :body, :issued_at
45
- end
46
- end
@@ -1,29 +0,0 @@
1
- module Popolo
2
- # A source of information.
3
- #
4
- # Turtle document: @todo move into popoloproject.com
5
- #
6
- # <http://example.com/sources/67cc67093475061e3d95369d.ttl>
7
- # rdfs:label "news.google.com";
8
- # dcterms:identifier "67cc67093475061e3d95369d";
9
- # dcterms:modified "2012-01-01T00:00:00Z"^^xsd:dateTime .
10
- #
11
- # @see http://dublincore.org/documents/dcmi-terms/
12
- # @todo Add the ETag to the Turtle document.
13
- class Source
14
- include Mongoid::Document
15
-
16
- embedded_in :sourceable, polymorphic: true
17
-
18
- # A human-readable unique identifier for the source, e.g. "news.google.com".
19
- field :name, type: String
20
- # The source's ETag.
21
- field :etag, type: String
22
- # The source's last modified timestamp.
23
- field :last_modified, type: Time
24
- # Any additional information about the source.
25
- field :extra, type: Hash
26
-
27
- validates_presence_of :name, :last_modified
28
- end
29
- end