resync 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +42 -0
  3. data/.rubocop.yml +23 -0
  4. data/.ruby-version +1 -0
  5. data/.travis.yml +2 -0
  6. data/Gemfile +3 -0
  7. data/LICENSE.md +22 -0
  8. data/README.md +92 -0
  9. data/Rakefile +56 -0
  10. data/example.rb +100 -0
  11. data/lib/resync/capability_list.rb +85 -0
  12. data/lib/resync/change_dump.rb +15 -0
  13. data/lib/resync/change_dump_manifest.rb +15 -0
  14. data/lib/resync/change_list.rb +15 -0
  15. data/lib/resync/change_list_index.rb +26 -0
  16. data/lib/resync/link.rb +87 -0
  17. data/lib/resync/metadata.rb +112 -0
  18. data/lib/resync/resource.rb +72 -0
  19. data/lib/resync/resource_dump.rb +15 -0
  20. data/lib/resync/resource_dump_manifest.rb +15 -0
  21. data/lib/resync/resource_list.rb +15 -0
  22. data/lib/resync/resource_list_index.rb +15 -0
  23. data/lib/resync/shared/augmented.rb +76 -0
  24. data/lib/resync/shared/base_resource_list.rb +117 -0
  25. data/lib/resync/shared/descriptor.rb +135 -0
  26. data/lib/resync/shared/sitemap_index.rb +32 -0
  27. data/lib/resync/shared/sorted_resource_list.rb +60 -0
  28. data/lib/resync/source_description.rb +14 -0
  29. data/lib/resync/types/change.rb +14 -0
  30. data/lib/resync/types/change_frequency.rb +18 -0
  31. data/lib/resync/types.rb +6 -0
  32. data/lib/resync/version.rb +4 -0
  33. data/lib/resync/xml.rb +216 -0
  34. data/lib/resync/xml_parser.rb +65 -0
  35. data/lib/resync.rb +4 -0
  36. data/resync.gemspec +36 -0
  37. data/spec/acceptance/xml_parser_spec.rb +1049 -0
  38. data/spec/data/examples/README.md +1 -0
  39. data/spec/data/examples/example-1.xml +12 -0
  40. data/spec/data/examples/example-12.xml +25 -0
  41. data/spec/data/examples/example-13.xml +25 -0
  42. data/spec/data/examples/example-14.xml +23 -0
  43. data/spec/data/examples/example-15.xml +21 -0
  44. data/spec/data/examples/example-16.xml +24 -0
  45. data/spec/data/examples/example-17.xml +39 -0
  46. data/spec/data/examples/example-18.xml +25 -0
  47. data/spec/data/examples/example-19.xml +28 -0
  48. data/spec/data/examples/example-2.xml +18 -0
  49. data/spec/data/examples/example-20.xml +22 -0
  50. data/spec/data/examples/example-21.xml +31 -0
  51. data/spec/data/examples/example-22.xml +41 -0
  52. data/spec/data/examples/example-23.xml +41 -0
  53. data/spec/data/examples/example-24.xml +28 -0
  54. data/spec/data/examples/example-25.xml +21 -0
  55. data/spec/data/examples/example-26.xml +18 -0
  56. data/spec/data/examples/example-27.xml +36 -0
  57. data/spec/data/examples/example-28.xml +34 -0
  58. data/spec/data/examples/example-29.xml +27 -0
  59. data/spec/data/examples/example-3.xml +17 -0
  60. data/spec/data/examples/example-30.xml +18 -0
  61. data/spec/data/examples/example-31.xml +16 -0
  62. data/spec/data/examples/example-32.xml +22 -0
  63. data/spec/data/examples/example-33.xml +22 -0
  64. data/spec/data/examples/example-4.xml +10 -0
  65. data/spec/data/examples/example-5.xml +18 -0
  66. data/spec/data/examples/example-6.xml +21 -0
  67. data/spec/data/examples/example-7.xml +13 -0
  68. data/spec/data/examples/example-8.xml +12 -0
  69. data/spec/data/resourcesync.xsd +148 -0
  70. data/spec/data/siteindex.xsd +75 -0
  71. data/spec/data/sitemap.xsd +116 -0
  72. data/spec/rspec_custom_matchers.rb +89 -0
  73. data/spec/spec_helper.rb +31 -0
  74. data/spec/todo.rb +11 -0
  75. data/spec/unit/resync/capability_list_spec.rb +138 -0
  76. data/spec/unit/resync/change_dump_manifest_spec.rb +75 -0
  77. data/spec/unit/resync/change_dump_spec.rb +61 -0
  78. data/spec/unit/resync/change_list_index_spec.rb +49 -0
  79. data/spec/unit/resync/change_list_spec.rb +75 -0
  80. data/spec/unit/resync/link_spec.rb +93 -0
  81. data/spec/unit/resync/metadata_spec.rb +169 -0
  82. data/spec/unit/resync/resource_dump_manifest_spec.rb +59 -0
  83. data/spec/unit/resync/resource_dump_spec.rb +62 -0
  84. data/spec/unit/resync/resource_list_index_spec.rb +53 -0
  85. data/spec/unit/resync/resource_list_spec.rb +60 -0
  86. data/spec/unit/resync/resource_spec.rb +176 -0
  87. data/spec/unit/resync/shared/augmented_examples.rb +58 -0
  88. data/spec/unit/resync/shared/base_resource_list_examples.rb +103 -0
  89. data/spec/unit/resync/shared/descriptor_examples.rb +122 -0
  90. data/spec/unit/resync/shared/descriptor_spec.rb +33 -0
  91. data/spec/unit/resync/shared/sorted_list_examples.rb +134 -0
  92. data/spec/unit/resync/shared/uri_field_examples.rb +36 -0
  93. data/spec/unit/resync/source_description_spec.rb +55 -0
  94. data/spec/unit/resync/xml/timenode_spec.rb +48 -0
  95. data/spec/unit/resync/xml/xml_spec.rb +40 -0
  96. data/spec/unit/resync/xml_parser_spec.rb +82 -0
  97. metadata +340 -0
metadata ADDED
@@ -0,0 +1,340 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: resync
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - David Moles
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-06-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: mime-types
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.5'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.5'
27
+ - !ruby/object:Gem::Dependency
28
+ name: ruby-enum
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.4'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.4'
41
+ - !ruby/object:Gem::Dependency
42
+ name: xml-mapping
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.10'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.10'
55
+ - !ruby/object:Gem::Dependency
56
+ name: equivalent-xml
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.6.0
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.6.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '10.4'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '10.4'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.2'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '3.2'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 0.29.1
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 0.29.1
111
+ - !ruby/object:Gem::Dependency
112
+ name: simplecov
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 0.9.2
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 0.9.2
125
+ - !ruby/object:Gem::Dependency
126
+ name: simplecov-console
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 0.2.0
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 0.2.0
139
+ - !ruby/object:Gem::Dependency
140
+ name: yard
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '0.8'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '0.8'
153
+ description: A Ruby gem for working with the ResourceSync web synchronization framework
154
+ email:
155
+ - david.moles@ucop.edu
156
+ executables: []
157
+ extensions: []
158
+ extra_rdoc_files: []
159
+ files:
160
+ - ".gitignore"
161
+ - ".rubocop.yml"
162
+ - ".ruby-version"
163
+ - ".travis.yml"
164
+ - Gemfile
165
+ - LICENSE.md
166
+ - README.md
167
+ - Rakefile
168
+ - example.rb
169
+ - lib/resync.rb
170
+ - lib/resync/capability_list.rb
171
+ - lib/resync/change_dump.rb
172
+ - lib/resync/change_dump_manifest.rb
173
+ - lib/resync/change_list.rb
174
+ - lib/resync/change_list_index.rb
175
+ - lib/resync/link.rb
176
+ - lib/resync/metadata.rb
177
+ - lib/resync/resource.rb
178
+ - lib/resync/resource_dump.rb
179
+ - lib/resync/resource_dump_manifest.rb
180
+ - lib/resync/resource_list.rb
181
+ - lib/resync/resource_list_index.rb
182
+ - lib/resync/shared/augmented.rb
183
+ - lib/resync/shared/base_resource_list.rb
184
+ - lib/resync/shared/descriptor.rb
185
+ - lib/resync/shared/sitemap_index.rb
186
+ - lib/resync/shared/sorted_resource_list.rb
187
+ - lib/resync/source_description.rb
188
+ - lib/resync/types.rb
189
+ - lib/resync/types/change.rb
190
+ - lib/resync/types/change_frequency.rb
191
+ - lib/resync/version.rb
192
+ - lib/resync/xml.rb
193
+ - lib/resync/xml_parser.rb
194
+ - resync.gemspec
195
+ - spec/acceptance/xml_parser_spec.rb
196
+ - spec/data/examples/README.md
197
+ - spec/data/examples/example-1.xml
198
+ - spec/data/examples/example-12.xml
199
+ - spec/data/examples/example-13.xml
200
+ - spec/data/examples/example-14.xml
201
+ - spec/data/examples/example-15.xml
202
+ - spec/data/examples/example-16.xml
203
+ - spec/data/examples/example-17.xml
204
+ - spec/data/examples/example-18.xml
205
+ - spec/data/examples/example-19.xml
206
+ - spec/data/examples/example-2.xml
207
+ - spec/data/examples/example-20.xml
208
+ - spec/data/examples/example-21.xml
209
+ - spec/data/examples/example-22.xml
210
+ - spec/data/examples/example-23.xml
211
+ - spec/data/examples/example-24.xml
212
+ - spec/data/examples/example-25.xml
213
+ - spec/data/examples/example-26.xml
214
+ - spec/data/examples/example-27.xml
215
+ - spec/data/examples/example-28.xml
216
+ - spec/data/examples/example-29.xml
217
+ - spec/data/examples/example-3.xml
218
+ - spec/data/examples/example-30.xml
219
+ - spec/data/examples/example-31.xml
220
+ - spec/data/examples/example-32.xml
221
+ - spec/data/examples/example-33.xml
222
+ - spec/data/examples/example-4.xml
223
+ - spec/data/examples/example-5.xml
224
+ - spec/data/examples/example-6.xml
225
+ - spec/data/examples/example-7.xml
226
+ - spec/data/examples/example-8.xml
227
+ - spec/data/resourcesync.xsd
228
+ - spec/data/siteindex.xsd
229
+ - spec/data/sitemap.xsd
230
+ - spec/rspec_custom_matchers.rb
231
+ - spec/spec_helper.rb
232
+ - spec/todo.rb
233
+ - spec/unit/resync/capability_list_spec.rb
234
+ - spec/unit/resync/change_dump_manifest_spec.rb
235
+ - spec/unit/resync/change_dump_spec.rb
236
+ - spec/unit/resync/change_list_index_spec.rb
237
+ - spec/unit/resync/change_list_spec.rb
238
+ - spec/unit/resync/link_spec.rb
239
+ - spec/unit/resync/metadata_spec.rb
240
+ - spec/unit/resync/resource_dump_manifest_spec.rb
241
+ - spec/unit/resync/resource_dump_spec.rb
242
+ - spec/unit/resync/resource_list_index_spec.rb
243
+ - spec/unit/resync/resource_list_spec.rb
244
+ - spec/unit/resync/resource_spec.rb
245
+ - spec/unit/resync/shared/augmented_examples.rb
246
+ - spec/unit/resync/shared/base_resource_list_examples.rb
247
+ - spec/unit/resync/shared/descriptor_examples.rb
248
+ - spec/unit/resync/shared/descriptor_spec.rb
249
+ - spec/unit/resync/shared/sorted_list_examples.rb
250
+ - spec/unit/resync/shared/uri_field_examples.rb
251
+ - spec/unit/resync/source_description_spec.rb
252
+ - spec/unit/resync/xml/timenode_spec.rb
253
+ - spec/unit/resync/xml/xml_spec.rb
254
+ - spec/unit/resync/xml_parser_spec.rb
255
+ homepage: http://github.com/dmolesUC3/resync
256
+ licenses:
257
+ - MIT
258
+ metadata: {}
259
+ post_install_message:
260
+ rdoc_options: []
261
+ require_paths:
262
+ - lib
263
+ required_ruby_version: !ruby/object:Gem::Requirement
264
+ requirements:
265
+ - - ">="
266
+ - !ruby/object:Gem::Version
267
+ version: '0'
268
+ required_rubygems_version: !ruby/object:Gem::Requirement
269
+ requirements:
270
+ - - ">="
271
+ - !ruby/object:Gem::Version
272
+ version: '0'
273
+ requirements: []
274
+ rubyforge_project:
275
+ rubygems_version: 2.4.6
276
+ signing_key:
277
+ specification_version: 4
278
+ summary: Utility library for ResourceSync
279
+ test_files:
280
+ - spec/acceptance/xml_parser_spec.rb
281
+ - spec/data/examples/README.md
282
+ - spec/data/examples/example-1.xml
283
+ - spec/data/examples/example-12.xml
284
+ - spec/data/examples/example-13.xml
285
+ - spec/data/examples/example-14.xml
286
+ - spec/data/examples/example-15.xml
287
+ - spec/data/examples/example-16.xml
288
+ - spec/data/examples/example-17.xml
289
+ - spec/data/examples/example-18.xml
290
+ - spec/data/examples/example-19.xml
291
+ - spec/data/examples/example-2.xml
292
+ - spec/data/examples/example-20.xml
293
+ - spec/data/examples/example-21.xml
294
+ - spec/data/examples/example-22.xml
295
+ - spec/data/examples/example-23.xml
296
+ - spec/data/examples/example-24.xml
297
+ - spec/data/examples/example-25.xml
298
+ - spec/data/examples/example-26.xml
299
+ - spec/data/examples/example-27.xml
300
+ - spec/data/examples/example-28.xml
301
+ - spec/data/examples/example-29.xml
302
+ - spec/data/examples/example-3.xml
303
+ - spec/data/examples/example-30.xml
304
+ - spec/data/examples/example-31.xml
305
+ - spec/data/examples/example-32.xml
306
+ - spec/data/examples/example-33.xml
307
+ - spec/data/examples/example-4.xml
308
+ - spec/data/examples/example-5.xml
309
+ - spec/data/examples/example-6.xml
310
+ - spec/data/examples/example-7.xml
311
+ - spec/data/examples/example-8.xml
312
+ - spec/data/resourcesync.xsd
313
+ - spec/data/siteindex.xsd
314
+ - spec/data/sitemap.xsd
315
+ - spec/rspec_custom_matchers.rb
316
+ - spec/spec_helper.rb
317
+ - spec/todo.rb
318
+ - spec/unit/resync/capability_list_spec.rb
319
+ - spec/unit/resync/change_dump_manifest_spec.rb
320
+ - spec/unit/resync/change_dump_spec.rb
321
+ - spec/unit/resync/change_list_index_spec.rb
322
+ - spec/unit/resync/change_list_spec.rb
323
+ - spec/unit/resync/link_spec.rb
324
+ - spec/unit/resync/metadata_spec.rb
325
+ - spec/unit/resync/resource_dump_manifest_spec.rb
326
+ - spec/unit/resync/resource_dump_spec.rb
327
+ - spec/unit/resync/resource_list_index_spec.rb
328
+ - spec/unit/resync/resource_list_spec.rb
329
+ - spec/unit/resync/resource_spec.rb
330
+ - spec/unit/resync/shared/augmented_examples.rb
331
+ - spec/unit/resync/shared/base_resource_list_examples.rb
332
+ - spec/unit/resync/shared/descriptor_examples.rb
333
+ - spec/unit/resync/shared/descriptor_spec.rb
334
+ - spec/unit/resync/shared/sorted_list_examples.rb
335
+ - spec/unit/resync/shared/uri_field_examples.rb
336
+ - spec/unit/resync/source_description_spec.rb
337
+ - spec/unit/resync/xml/timenode_spec.rb
338
+ - spec/unit/resync/xml/xml_spec.rb
339
+ - spec/unit/resync/xml_parser_spec.rb
340
+ has_rdoc: