pupa 0.0.1

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.
Files changed (75) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +6 -0
  3. data/.travis.yml +5 -0
  4. data/.yardopts +4 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE +20 -0
  7. data/README.md +52 -0
  8. data/Rakefile +37 -0
  9. data/USAGE +1 -0
  10. data/lib/pupa/errors.rb +30 -0
  11. data/lib/pupa/logger.rb +37 -0
  12. data/lib/pupa/models/base.rb +190 -0
  13. data/lib/pupa/models/concerns/contactable.rb +34 -0
  14. data/lib/pupa/models/concerns/identifiable.rb +26 -0
  15. data/lib/pupa/models/concerns/linkable.rb +26 -0
  16. data/lib/pupa/models/concerns/nameable.rb +34 -0
  17. data/lib/pupa/models/concerns/sourceable.rb +26 -0
  18. data/lib/pupa/models/concerns/timestamps.rb +22 -0
  19. data/lib/pupa/models/contact_detail_list.rb +28 -0
  20. data/lib/pupa/models/membership.rb +37 -0
  21. data/lib/pupa/models/organization.rb +40 -0
  22. data/lib/pupa/models/person.rb +35 -0
  23. data/lib/pupa/models/post.rb +28 -0
  24. data/lib/pupa/processor/client.rb +42 -0
  25. data/lib/pupa/processor/dependency_graph.rb +18 -0
  26. data/lib/pupa/processor/helper.rb +15 -0
  27. data/lib/pupa/processor/middleware/logger.rb +37 -0
  28. data/lib/pupa/processor/middleware/parse_html.rb +16 -0
  29. data/lib/pupa/processor/persistence.rb +80 -0
  30. data/lib/pupa/processor/yielder.rb +50 -0
  31. data/lib/pupa/processor.rb +351 -0
  32. data/lib/pupa/refinements/faraday_middleware.rb +32 -0
  33. data/lib/pupa/refinements/json-schema.rb +36 -0
  34. data/lib/pupa/runner.rb +185 -0
  35. data/lib/pupa/version.rb +3 -0
  36. data/lib/pupa.rb +31 -0
  37. data/pupa.gemspec +34 -0
  38. data/schemas/popolo/contact_detail.json +44 -0
  39. data/schemas/popolo/identifier.json +18 -0
  40. data/schemas/popolo/link.json +19 -0
  41. data/schemas/popolo/membership.json +86 -0
  42. data/schemas/popolo/organization.json +104 -0
  43. data/schemas/popolo/other_name.json +28 -0
  44. data/schemas/popolo/person.json +130 -0
  45. data/schemas/popolo/post.json +78 -0
  46. data/spec/cassettes/31ac91ccad069eefc07d96cfbe66fa66c1b41fcf.yml +56 -0
  47. data/spec/cassettes/4ff54d737afb5d693653752d7bf234a405a80172.yml +48 -0
  48. data/spec/cassettes/898049a22e6ca51dfa2510d9e0e0207a5c396524.yml +54 -0
  49. data/spec/cassettes/ce69ff734ce852d2bfaa482bbf55d7ffb4762e87.yml +26 -0
  50. data/spec/cassettes/da629b01e0836deda8a5540a4e6a08783dd7aef9.yml +46 -0
  51. data/spec/cassettes/e398f35bea86b3d4c87a6934bae1eb7fca8744f9.yml +26 -0
  52. data/spec/logger_spec.rb +4 -0
  53. data/spec/models/base_spec.rb +194 -0
  54. data/spec/models/concerns/contactable_spec.rb +37 -0
  55. data/spec/models/concerns/identifiable_spec.rb +25 -0
  56. data/spec/models/concerns/linkable_spec.rb +25 -0
  57. data/spec/models/concerns/nameable_spec.rb +25 -0
  58. data/spec/models/concerns/sourceable_spec.rb +25 -0
  59. data/spec/models/concerns/timestamps_spec.rb +32 -0
  60. data/spec/models/contact_detail_list_spec.rb +44 -0
  61. data/spec/models/membership_spec.rb +30 -0
  62. data/spec/models/organization_spec.rb +24 -0
  63. data/spec/models/person_spec.rb +24 -0
  64. data/spec/models/post_spec.rb +19 -0
  65. data/spec/processor/client_spec.rb +4 -0
  66. data/spec/processor/dependency_graph_spec.rb +4 -0
  67. data/spec/processor/helper_spec.rb +4 -0
  68. data/spec/processor/middleware/logger_spec.rb +87 -0
  69. data/spec/processor/middleware/parse_html_spec.rb +92 -0
  70. data/spec/processor/persistence_spec.rb +41 -0
  71. data/spec/processor/yielder_spec.rb +55 -0
  72. data/spec/processor_spec.rb +268 -0
  73. data/spec/runner_spec.rb +85 -0
  74. data/spec/spec_helper.rb +17 -0
  75. metadata +342 -0
metadata ADDED
@@ -0,0 +1,342 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pupa
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Open North
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-09-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: 4.0.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 4.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: colored
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '1.2'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '1.2'
41
+ - !ruby/object:Gem::Dependency
42
+ name: faraday_middleware
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 0.9.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 0.9.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: json-schema
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 2.1.3
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: 2.1.3
69
+ - !ruby/object:Gem::Dependency
70
+ name: mail
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: moped
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: 1.5.1
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: 1.5.1
97
+ - !ruby/object:Gem::Dependency
98
+ name: nokogiri
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ~>
102
+ - !ruby/object:Gem::Version
103
+ version: 1.6.0
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ~>
109
+ - !ruby/object:Gem::Version
110
+ version: 1.6.0
111
+ - !ruby/object:Gem::Dependency
112
+ name: coveralls
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: json
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ~>
130
+ - !ruby/object:Gem::Version
131
+ version: 1.7.7
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ~>
137
+ - !ruby/object:Gem::Version
138
+ version: 1.7.7
139
+ - !ruby/object:Gem::Dependency
140
+ name: octokit
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - '>='
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: rake
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - '>='
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - '>='
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: rspec
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ~>
172
+ - !ruby/object:Gem::Version
173
+ version: '2.10'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ~>
179
+ - !ruby/object:Gem::Version
180
+ version: '2.10'
181
+ - !ruby/object:Gem::Dependency
182
+ name: vcr
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ~>
186
+ - !ruby/object:Gem::Version
187
+ version: 2.5.0
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ~>
193
+ - !ruby/object:Gem::Version
194
+ version: 2.5.0
195
+ - !ruby/object:Gem::Dependency
196
+ name: multi_xml
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - '>='
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - '>='
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ description:
210
+ email:
211
+ - info@opennorth.ca
212
+ executables: []
213
+ extensions: []
214
+ extra_rdoc_files: []
215
+ files:
216
+ - .gitignore
217
+ - .travis.yml
218
+ - .yardopts
219
+ - Gemfile
220
+ - LICENSE
221
+ - README.md
222
+ - Rakefile
223
+ - USAGE
224
+ - lib/pupa.rb
225
+ - lib/pupa/errors.rb
226
+ - lib/pupa/logger.rb
227
+ - lib/pupa/models/base.rb
228
+ - lib/pupa/models/concerns/contactable.rb
229
+ - lib/pupa/models/concerns/identifiable.rb
230
+ - lib/pupa/models/concerns/linkable.rb
231
+ - lib/pupa/models/concerns/nameable.rb
232
+ - lib/pupa/models/concerns/sourceable.rb
233
+ - lib/pupa/models/concerns/timestamps.rb
234
+ - lib/pupa/models/contact_detail_list.rb
235
+ - lib/pupa/models/membership.rb
236
+ - lib/pupa/models/organization.rb
237
+ - lib/pupa/models/person.rb
238
+ - lib/pupa/models/post.rb
239
+ - lib/pupa/processor.rb
240
+ - lib/pupa/processor/client.rb
241
+ - lib/pupa/processor/dependency_graph.rb
242
+ - lib/pupa/processor/helper.rb
243
+ - lib/pupa/processor/middleware/logger.rb
244
+ - lib/pupa/processor/middleware/parse_html.rb
245
+ - lib/pupa/processor/persistence.rb
246
+ - lib/pupa/processor/yielder.rb
247
+ - lib/pupa/refinements/faraday_middleware.rb
248
+ - lib/pupa/refinements/json-schema.rb
249
+ - lib/pupa/runner.rb
250
+ - lib/pupa/version.rb
251
+ - pupa.gemspec
252
+ - schemas/popolo/contact_detail.json
253
+ - schemas/popolo/identifier.json
254
+ - schemas/popolo/link.json
255
+ - schemas/popolo/membership.json
256
+ - schemas/popolo/organization.json
257
+ - schemas/popolo/other_name.json
258
+ - schemas/popolo/person.json
259
+ - schemas/popolo/post.json
260
+ - spec/cassettes/31ac91ccad069eefc07d96cfbe66fa66c1b41fcf.yml
261
+ - spec/cassettes/4ff54d737afb5d693653752d7bf234a405a80172.yml
262
+ - spec/cassettes/898049a22e6ca51dfa2510d9e0e0207a5c396524.yml
263
+ - spec/cassettes/ce69ff734ce852d2bfaa482bbf55d7ffb4762e87.yml
264
+ - spec/cassettes/da629b01e0836deda8a5540a4e6a08783dd7aef9.yml
265
+ - spec/cassettes/e398f35bea86b3d4c87a6934bae1eb7fca8744f9.yml
266
+ - spec/logger_spec.rb
267
+ - spec/models/base_spec.rb
268
+ - spec/models/concerns/contactable_spec.rb
269
+ - spec/models/concerns/identifiable_spec.rb
270
+ - spec/models/concerns/linkable_spec.rb
271
+ - spec/models/concerns/nameable_spec.rb
272
+ - spec/models/concerns/sourceable_spec.rb
273
+ - spec/models/concerns/timestamps_spec.rb
274
+ - spec/models/contact_detail_list_spec.rb
275
+ - spec/models/membership_spec.rb
276
+ - spec/models/organization_spec.rb
277
+ - spec/models/person_spec.rb
278
+ - spec/models/post_spec.rb
279
+ - spec/processor/client_spec.rb
280
+ - spec/processor/dependency_graph_spec.rb
281
+ - spec/processor/helper_spec.rb
282
+ - spec/processor/middleware/logger_spec.rb
283
+ - spec/processor/middleware/parse_html_spec.rb
284
+ - spec/processor/persistence_spec.rb
285
+ - spec/processor/yielder_spec.rb
286
+ - spec/processor_spec.rb
287
+ - spec/runner_spec.rb
288
+ - spec/spec_helper.rb
289
+ homepage: http://github.com/opennorth/pupa-ruby
290
+ licenses:
291
+ - MIT
292
+ metadata: {}
293
+ post_install_message:
294
+ rdoc_options: []
295
+ require_paths:
296
+ - lib
297
+ required_ruby_version: !ruby/object:Gem::Requirement
298
+ requirements:
299
+ - - '>='
300
+ - !ruby/object:Gem::Version
301
+ version: '0'
302
+ required_rubygems_version: !ruby/object:Gem::Requirement
303
+ requirements:
304
+ - - '>='
305
+ - !ruby/object:Gem::Version
306
+ version: '0'
307
+ requirements: []
308
+ rubyforge_project:
309
+ rubygems_version: 2.0.8
310
+ signing_key:
311
+ specification_version: 4
312
+ summary: A data scraping framework
313
+ test_files:
314
+ - spec/cassettes/31ac91ccad069eefc07d96cfbe66fa66c1b41fcf.yml
315
+ - spec/cassettes/4ff54d737afb5d693653752d7bf234a405a80172.yml
316
+ - spec/cassettes/898049a22e6ca51dfa2510d9e0e0207a5c396524.yml
317
+ - spec/cassettes/ce69ff734ce852d2bfaa482bbf55d7ffb4762e87.yml
318
+ - spec/cassettes/da629b01e0836deda8a5540a4e6a08783dd7aef9.yml
319
+ - spec/cassettes/e398f35bea86b3d4c87a6934bae1eb7fca8744f9.yml
320
+ - spec/logger_spec.rb
321
+ - spec/models/base_spec.rb
322
+ - spec/models/concerns/contactable_spec.rb
323
+ - spec/models/concerns/identifiable_spec.rb
324
+ - spec/models/concerns/linkable_spec.rb
325
+ - spec/models/concerns/nameable_spec.rb
326
+ - spec/models/concerns/sourceable_spec.rb
327
+ - spec/models/concerns/timestamps_spec.rb
328
+ - spec/models/contact_detail_list_spec.rb
329
+ - spec/models/membership_spec.rb
330
+ - spec/models/organization_spec.rb
331
+ - spec/models/person_spec.rb
332
+ - spec/models/post_spec.rb
333
+ - spec/processor/client_spec.rb
334
+ - spec/processor/dependency_graph_spec.rb
335
+ - spec/processor/helper_spec.rb
336
+ - spec/processor/middleware/logger_spec.rb
337
+ - spec/processor/middleware/parse_html_spec.rb
338
+ - spec/processor/persistence_spec.rb
339
+ - spec/processor/yielder_spec.rb
340
+ - spec/processor_spec.rb
341
+ - spec/runner_spec.rb
342
+ - spec/spec_helper.rb