fedora-migrate 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/.travis.yml +6 -8
  4. data/README.md +3 -1
  5. data/fedora-migrate.gemspec +2 -2
  6. data/lib/fedora_migrate/file_configurator.rb +1 -1
  7. data/lib/fedora_migrate/migration_options.rb +5 -0
  8. data/lib/fedora_migrate/migration_report.rb +32 -6
  9. data/lib/fedora_migrate/repository_migrator.rb +53 -30
  10. data/lib/fedora_migrate/version.rb +1 -1
  11. data/spec/fixtures/reports/failed/sufia_5m60qr94g.json +7 -0
  12. data/spec/fixtures/reports/failed/sufia_5m60qr95r.json +58 -0
  13. data/spec/fixtures/reports/failed/sufia_5m60qr961.json +58 -0
  14. data/spec/fixtures/reports/failed/sufia_5m60qr979.json +34 -0
  15. data/spec/fixtures/reports/failed/sufia_rb68xc089.json +7 -0
  16. data/spec/fixtures/reports/failed/sufia_rb68xc09k.json +21 -0
  17. data/spec/fixtures/reports/failed/sufia_rb68xc10b.json +49 -0
  18. data/spec/fixtures/reports/failed/sufia_rb68xc11m.json +49 -0
  19. data/spec/fixtures/reports/failed/sufia_xp68km39w.json +54 -0
  20. data/spec/fixtures/reports/sample/scholarsphere_000000000.json +26 -0
  21. data/spec/fixtures/reports/sample/scholarsphere_000000018.json +102 -0
  22. data/spec/fixtures/reports/sample/scholarsphere_05741r698.json +26 -0
  23. data/spec/fixtures/reports/sample/scholarsphere_6395wb555.json +5 -0
  24. data/spec/fixtures/reports/sample/scholarsphere_x346dm27k.json +5 -0
  25. data/spec/integration/repository_migration_spec.rb +21 -10
  26. data/spec/integration/versions_spec.rb +1 -0
  27. data/spec/spec_helper.rb +1 -0
  28. data/spec/support/example_model.rb +8 -1
  29. data/spec/unit/migration_options_spec.rb +18 -0
  30. data/spec/unit/migration_report_spec.rb +16 -13
  31. data/spec/unit/repository_migrator_spec.rb +2 -8
  32. metadata +35 -11
  33. data/spec/fixtures/failed-report.json +0 -339
  34. data/spec/fixtures/sample-report.json +0 -166
@@ -1,166 +0,0 @@
1
- {
2
- "scholarsphere:000000000": {
3
- "status": true,
4
- "object": {
5
- "id": "000000000",
6
- "class": "Batch",
7
- "content_datastreams": [
8
-
9
- ],
10
- "rdf_datastreams": [
11
- {
12
- "ds": "descMetadata",
13
- "status": [
14
-
15
- ]
16
- }
17
- ],
18
- "permissions": null,
19
- "dates": {
20
- "uploaded": null,
21
- "modified": null
22
- }
23
- },
24
- "relationships": [
25
-
26
- ]
27
- },
28
- "scholarsphere:000000018": {
29
- "status": true,
30
- "object": {
31
- "id": "000000018",
32
- "class": "GenericFile",
33
- "content_datastreams": [
34
- {
35
- "ds": "characterization",
36
- "versions": [
37
- {
38
- "name": "",
39
- "mime_type": "text/xml",
40
- "original_date": "2013-03-15T11:08:21Z"
41
- }
42
- ]
43
- },
44
- {
45
- "ds": "content",
46
- "versions": [
47
- {
48
- "name": "Open_Up_Your_RepositoryWith_a_SWORD_.pdf",
49
- "mime_type": "application/pdf",
50
- "original_date": "2012-09-26T16:09:14Z"
51
- },
52
- {
53
- "name": "Open_Up_Your_RepositoryWith_a_SWORD_.pdf",
54
- "mime_type": "application/pdf",
55
- "original_date": "2012-11-26T03:11:55Z"
56
- },
57
- {
58
- "name": "Open_Up_Your_RepositoryWith_a_SWORD_.pdf",
59
- "mime_type": "application/pdf",
60
- "original_date": "2012-11-26T03:12:07Z"
61
- },
62
- {
63
- "name": "Open_Up_Your_RepositoryWith_a_SWORD_.pdf",
64
- "mime_type": "application/pdf",
65
- "original_date": "2012-11-26T03:12:10Z"
66
- },
67
- {
68
- "name": "Open_Up_Your_RepositoryWith_a_SWORD_.pdf",
69
- "mime_type": "application/pdf",
70
- "original_date": "2012-11-26T03:12:13Z"
71
- },
72
- {
73
- "name": "Open_Up_Your_RepositoryWith_a_SWORD_.pdf",
74
- "mime_type": "application/pdf",
75
- "original_date": "2012-11-26T03:12:17Z"
76
- },
77
- {
78
- "name": "Open_Up_Your_RepositoryWith_a_SWORD_.pdf",
79
- "mime_type": "application/pdf",
80
- "original_date": "2012-11-26T03:13:12Z"
81
- }
82
- ]
83
- },
84
- {
85
- "ds": "thumbnail",
86
- "versions": [
87
- {
88
- "name": "",
89
- "mime_type": "image/jpeg",
90
- "original_date": "2014-09-10T15:12:43Z"
91
- }
92
- ]
93
- },
94
- {
95
- "ds": "full_text",
96
- "versions": [
97
- {
98
- "name": "File Datastream",
99
- "mime_type": "application/octet-stream",
100
- "original_date": "2013-03-14T10:03:13Z"
101
- }
102
- ]
103
- }
104
- ],
105
- "rdf_datastreams": [
106
- {
107
- "ds": "descMetadata",
108
- "status": [
109
-
110
- ]
111
- }
112
- ],
113
- "permissions": [
114
- "read_groups = [\"public\"]",
115
- "edit_groups = []",
116
- "discover_groups = []",
117
- "read_users = []",
118
- "edit_users = [\"mjg36\"]",
119
- "discover_users = []"
120
- ],
121
- "dates": {
122
- "uploaded": "2012-09-26T16:09:13.394Z",
123
- "modified": "2015-01-02T22:16:02.961Z"
124
- }
125
- },
126
- "relationships": [
127
- "http://ssrepo2qa.dlt.psu.edu:8080/SSqaFedora4/rest/prod/00/00/00/01/000000018--info:fedora/fedora-system:def/relations-external#isPartOf--http://ssrepo2qa.dlt.psu.edu:8080/SSqaFedora4/rest/prod/00/00/00/00/000000000"
128
- ]
129
- },
130
- "scholarsphere:05741r698": {
131
- "status": true,
132
- "object": {
133
- "id": "05741r698",
134
- "class": "Batch",
135
- "content_datastreams": [
136
-
137
- ],
138
- "rdf_datastreams": [
139
- {
140
- "ds": "descMetadata",
141
- "status": [
142
-
143
- ]
144
- }
145
- ],
146
- "permissions": null,
147
- "dates": {
148
- "uploaded": null,
149
- "modified": null
150
- }
151
- },
152
- "relationships": [
153
-
154
- ]
155
- },
156
- "scholarsphere:6395wb555": {
157
- "status": false,
158
- "object": "#<Ldp::BadRequest: RDF was not parsable>",
159
- "relationships": "#<FedoraMigrate::Errors::MigrationError: Target object was not found in Fedora 4. Did you migrate it?>"
160
- },
161
- "scholarsphere:x346dm27k": {
162
- "status": false,
163
- "object": "#<Ldp::BadRequest: RDF was not parsable>",
164
- "relationships": "#<FedoraMigrate::Errors::MigrationError: Target object was not found in Fedora 4. Did you migrate it?>"
165
- }
166
- }