spotlight-oaipmh-resources 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +56 -0
  3. data/app/controllers/spotlight/resources/harvester_controller.rb +58 -0
  4. data/app/jobs/spotlight/resources/perform_harvests_job.rb +44 -0
  5. data/app/mailer/spotlight/harvesting_complete_mailer.rb +20 -0
  6. data/app/models/spotlight/resources/exceptions.rb +17 -0
  7. data/app/models/spotlight/resources/harvest_type.rb +7 -0
  8. data/app/models/spotlight/resources/harvester.rb +46 -0
  9. data/app/models/spotlight/resources/oaipmh_harvester.rb +41 -0
  10. data/app/models/spotlight/resources/oaipmh_mods_converter.rb +468 -0
  11. data/app/models/spotlight/resources/oaipmh_mods_item.rb +61 -0
  12. data/app/models/spotlight/resources/solr_converter.rb +180 -0
  13. data/app/models/spotlight/resources/solr_harvester.rb +42 -0
  14. data/app/models/spotlight/resources/solr_harvesting_item.rb +50 -0
  15. data/app/services/spotlight/resources/oaipmh_builder.rb +166 -0
  16. data/app/services/spotlight/resources/solr_harvesting_builder.rb +115 -0
  17. data/app/views/catalog/_show.html.erb +10 -0
  18. data/app/views/spotlight/harvesting_complete_mailer/harvest_failed.html.erb +6 -0
  19. data/app/views/spotlight/harvesting_complete_mailer/harvest_indexed.html.erb +13 -0
  20. data/app/views/spotlight/resources/harvester/_form.html.erb +36 -0
  21. data/config/default_solr_mapping.yml +20 -0
  22. data/config/locales/en.yml +32 -0
  23. data/config/mapping.yml +172 -0
  24. data/config/marc_mapping.yml +190 -0
  25. data/config/routes.rb +5 -0
  26. data/lib/generators/spotlight/oaipmh/resources/install_generator.rb +16 -0
  27. data/lib/spotlight/oaipmh/resources.rb +11 -0
  28. data/lib/spotlight/oaipmh/resources/engine.rb +23 -0
  29. data/lib/spotlight/oaipmh/resources/version.rb +8 -0
  30. metadata +253 -0
data/config/routes.rb ADDED
@@ -0,0 +1,5 @@
1
+ Spotlight::Oaipmh::Resources::Engine.routes.draw do
2
+ resources :exhibits, path: '/', only: [] do
3
+ resource :harvester, controller: :"spotlight/resources/harvester", only: [:create, :update]
4
+ end
5
+ end
@@ -0,0 +1,16 @@
1
+ require 'rails/generators'
2
+
3
+ module Spotlight
4
+ module Oaipmh
5
+ module Resources
6
+ # :nodoc:
7
+ class InstallGenerator < Rails::Generators::Base
8
+ desc 'This generator mounts the Spotlight::Oaipmh::Resources::Engine engine'
9
+
10
+ def inject_spotlight_oaipmh_resources_routes
11
+ route "mount Spotlight::Oaipmh::Resources::Engine, at: 'spotlight_oaipmh_resources'"
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,11 @@
1
+ require 'spotlight/oaipmh/resources/version'
2
+ require 'spotlight'
3
+
4
+
5
+ module Spotlight
6
+ module Oaipmh
7
+ module Resources
8
+ require "spotlight/oaipmh/resources/engine"
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,23 @@
1
+ require 'spotlight/engine'
2
+
3
+ module Spotlight::Oaipmh::Resources
4
+ class Engine < ::Rails::Engine
5
+
6
+ Spotlight::Oaipmh::Resources::Engine.config.resource_partial = 'spotlight/resources/harvester/form'
7
+ #The maximum number of records to harvest in one batch using OAI
8
+ #Use -1 to set no boundary
9
+ config.oai_harvest_batch_max = 10000
10
+ #The maximum number of records to harvest in one batch using Solr
11
+ #Use -1 to set no boundary
12
+ config.solr_harvest_batch_max = 10000
13
+
14
+ initializer 'spotlight.oaipmh.initialize' do
15
+ Spotlight::Engine.config.external_resources_partials ||= []
16
+ Spotlight::Engine.config.external_resources_partials << Spotlight::Oaipmh::Resources::Engine.config.resource_partial
17
+ end
18
+ config.generators do |g|
19
+ g.test_framework :rspec
20
+ end
21
+
22
+ end
23
+ end
@@ -0,0 +1,8 @@
1
+ module Spotlight
2
+ module Oaipmh
3
+ # :nodoc:
4
+ module Resources
5
+ VERSION = "0.3.6"
6
+ end
7
+ end
8
+ end
metadata ADDED
@@ -0,0 +1,253 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: spotlight-oaipmh-resources
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.6
5
+ platform: ruby
6
+ authors:
7
+ - Dee Dee Crema
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-04-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: oai
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: mods
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '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'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec-rails
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
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: capybara
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: factory_bot_rails
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: riiif
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: libxml-ruby
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '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'
139
+ - !ruby/object:Gem::Dependency
140
+ name: engine_cart
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - '='
144
+ - !ruby/object:Gem::Version
145
+ version: 2.2.1
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - '='
151
+ - !ruby/object:Gem::Version
152
+ version: 2.2.1
153
+ - !ruby/object:Gem::Dependency
154
+ name: database_cleaner
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '1.3'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '1.3'
167
+ - !ruby/object:Gem::Dependency
168
+ name: blacklight-gallery
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: sitemap_generator
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
195
+ description:
196
+ email:
197
+ - valdeva_crema@harvard.edu
198
+ executables: []
199
+ extensions: []
200
+ extra_rdoc_files: []
201
+ files:
202
+ - Rakefile
203
+ - app/controllers/spotlight/resources/harvester_controller.rb
204
+ - app/jobs/spotlight/resources/perform_harvests_job.rb
205
+ - app/mailer/spotlight/harvesting_complete_mailer.rb
206
+ - app/models/spotlight/resources/exceptions.rb
207
+ - app/models/spotlight/resources/harvest_type.rb
208
+ - app/models/spotlight/resources/harvester.rb
209
+ - app/models/spotlight/resources/oaipmh_harvester.rb
210
+ - app/models/spotlight/resources/oaipmh_mods_converter.rb
211
+ - app/models/spotlight/resources/oaipmh_mods_item.rb
212
+ - app/models/spotlight/resources/solr_converter.rb
213
+ - app/models/spotlight/resources/solr_harvester.rb
214
+ - app/models/spotlight/resources/solr_harvesting_item.rb
215
+ - app/services/spotlight/resources/oaipmh_builder.rb
216
+ - app/services/spotlight/resources/solr_harvesting_builder.rb
217
+ - app/views/catalog/_show.html.erb
218
+ - app/views/spotlight/harvesting_complete_mailer/harvest_failed.html.erb
219
+ - app/views/spotlight/harvesting_complete_mailer/harvest_indexed.html.erb
220
+ - app/views/spotlight/resources/harvester/_form.html.erb
221
+ - config/default_solr_mapping.yml
222
+ - config/locales/en.yml
223
+ - config/mapping.yml
224
+ - config/marc_mapping.yml
225
+ - config/routes.rb
226
+ - lib/generators/spotlight/oaipmh/resources/install_generator.rb
227
+ - lib/spotlight/oaipmh/resources.rb
228
+ - lib/spotlight/oaipmh/resources/engine.rb
229
+ - lib/spotlight/oaipmh/resources/version.rb
230
+ homepage:
231
+ licenses:
232
+ - MIT
233
+ metadata: {}
234
+ post_install_message:
235
+ rdoc_options: []
236
+ require_paths:
237
+ - lib
238
+ required_ruby_version: !ruby/object:Gem::Requirement
239
+ requirements:
240
+ - - ">="
241
+ - !ruby/object:Gem::Version
242
+ version: '0'
243
+ required_rubygems_version: !ruby/object:Gem::Requirement
244
+ requirements:
245
+ - - ">="
246
+ - !ruby/object:Gem::Version
247
+ version: '0'
248
+ requirements: []
249
+ rubygems_version: 3.0.6
250
+ signing_key:
251
+ specification_version: 4
252
+ summary: Ingest of OaiPmh harvests into Spotlight
253
+ test_files: []