blacklight_oai_provider 0.1.0 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +18 -0
  3. data/.rubocop.yml +39 -0
  4. data/.rubocop_todo.yml +130 -0
  5. data/.solr_wrapper +8 -0
  6. data/.travis.yml +16 -0
  7. data/Gemfile +34 -2
  8. data/README.md +131 -0
  9. data/Rakefile +25 -0
  10. data/VERSION +1 -1
  11. data/app/assets/{xsl → stylesheets/blacklight_oai_provider}/oai2.xsl +12 -5
  12. data/app/controllers/concerns/blacklight_oai_provider/controller.rb +38 -0
  13. data/app/models/concerns/blacklight_oai_provider/solr_document.rb +23 -0
  14. data/blacklight_oai_provider.gemspec +17 -10
  15. data/config/initializers/oai_patches.rb +20 -0
  16. data/lib/blacklight_oai_provider/engine.rb +15 -2
  17. data/lib/blacklight_oai_provider/exceptions.rb +9 -0
  18. data/lib/blacklight_oai_provider/resumption_token.rb +51 -0
  19. data/lib/blacklight_oai_provider/routes.rb +15 -0
  20. data/lib/blacklight_oai_provider/solr_document_provider.rb +2 -2
  21. data/lib/blacklight_oai_provider/solr_document_wrapper.rb +55 -27
  22. data/lib/blacklight_oai_provider/version.rb +1 -2
  23. data/lib/blacklight_oai_provider.rb +16 -14
  24. data/lib/generators/blacklight_oai_provider/install_generator.rb +27 -0
  25. data/lib/railties/blacklight_oai_provider.rake +14 -0
  26. data/solr/conf/_rest_managed.json +3 -0
  27. data/solr/conf/admin-extra.html +31 -0
  28. data/solr/conf/elevate.xml +36 -0
  29. data/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
  30. data/solr/conf/protwords.txt +21 -0
  31. data/solr/conf/schema.xml +629 -0
  32. data/solr/conf/scripts.conf +24 -0
  33. data/solr/conf/solrconfig.xml +401 -0
  34. data/solr/conf/spellings.txt +2 -0
  35. data/solr/conf/stopwords.txt +58 -0
  36. data/solr/conf/stopwords_en.txt +58 -0
  37. data/solr/conf/synonyms.txt +31 -0
  38. data/solr/conf/xslt/example.xsl +132 -0
  39. data/solr/conf/xslt/example_atom.xsl +67 -0
  40. data/solr/conf/xslt/example_rss.xsl +66 -0
  41. data/solr/conf/xslt/luke.xsl +337 -0
  42. data/solr/sample_solr_documents.yml +2722 -0
  43. data/spec/controllers/catalog_controller_spec.rb +39 -0
  44. data/spec/features/html_rendering_spec.rb +24 -0
  45. data/spec/models/solr_document_spec.rb +43 -0
  46. data/spec/requests/get_record_spec.rb +47 -0
  47. data/spec/requests/identify_spec.rb +53 -0
  48. data/spec/requests/list_identifiers_spec.rb +80 -0
  49. data/spec/requests/list_metadata_formats_spec.rb +43 -0
  50. data/spec/requests/list_records_spec.rb +126 -0
  51. data/spec/spec_helper.rb +15 -38
  52. data/spec/test_app_templates/config/solr.yml +9 -0
  53. data/spec/test_app_templates/lib/generators/test_app_generator.rb +86 -0
  54. metadata +146 -87
  55. data/Gemfile.lock +0 -187
  56. data/README.rdoc +0 -74
  57. data/config/routes.rb +0 -5
  58. data/lib/blacklight_oai_provider/README.rdoc +0 -0
  59. data/lib/blacklight_oai_provider/controller_extension.rb +0 -29
  60. data/lib/blacklight_oai_provider/route_sets.rb +0 -13
  61. data/lib/blacklight_oai_provider/solr_document_extension.rb +0 -10
  62. data/lib/generators/blacklight_oai_provider/blacklight_oai_provider_generator.rb +0 -27
  63. data/spec/acceptance/blacklight_oai_provider_spec.rb +0 -49
  64. data/spec/integration/blacklight_stub_spec.rb +0 -10
  65. data/spec/internal/app/controllers/application_controller.rb +0 -4
  66. data/spec/internal/app/models/solr_document.rb +0 -3
  67. data/spec/internal/config/database.yml +0 -3
  68. data/spec/internal/config/routes.rb +0 -6
  69. data/spec/internal/config/solr.yml +0 -18
  70. data/spec/internal/db/combustion_test.sqlite +0 -0
  71. data/spec/internal/db/schema.rb +0 -53
  72. data/spec/internal/log/.gitignore +0 -1
  73. data/spec/internal/public/favicon.ico +0 -0
  74. data/spec/lib/solr_document_extension_spec.rb +0 -6
  75. data/spec/vcr_cassettes/solr.yml +0 -113
metadata CHANGED
@@ -1,221 +1,280 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight_oai_provider
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
5
- prerelease:
4
+ version: 4.1.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Chris Beer
8
+ - Carla Galarza
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-16 00:00:00.000000000 Z
12
+ date: 2017-12-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
16
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
17
  requirements:
19
- - - ~>
18
+ - - "~>"
20
19
  - !ruby/object:Gem::Version
21
- version: '3.0'
20
+ version: '4.0'
22
21
  type: :runtime
23
22
  prerelease: false
24
23
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
24
  requirements:
27
- - - ~>
25
+ - - "~>"
28
26
  - !ruby/object:Gem::Version
29
- version: '3.0'
27
+ version: '4.0'
30
28
  - !ruby/object:Gem::Dependency
31
29
  name: blacklight
32
30
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
31
  requirements:
35
- - - ~>
32
+ - - "~>"
36
33
  - !ruby/object:Gem::Version
37
- version: '3.2'
34
+ version: '4.0'
38
35
  type: :runtime
39
36
  prerelease: false
40
37
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
38
  requirements:
43
- - - ~>
39
+ - - "~>"
44
40
  - !ruby/object:Gem::Version
45
- version: '3.2'
41
+ version: '4.0'
46
42
  - !ruby/object:Gem::Dependency
47
43
  name: oai
48
44
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
45
  requirements:
51
- - - ! '>='
46
+ - - ">="
52
47
  - !ruby/object:Gem::Version
53
48
  version: '0'
54
49
  type: :runtime
55
50
  prerelease: false
56
51
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
52
  requirements:
59
- - - ! '>='
53
+ - - ">="
60
54
  - !ruby/object:Gem::Version
61
55
  version: '0'
62
56
  - !ruby/object:Gem::Dependency
63
- name: rspec
57
+ name: rspec-rails
64
58
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
59
  requirements:
67
- - - ! '>='
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '3.0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '3.0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: capybara
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
68
75
  - !ruby/object:Gem::Version
69
76
  version: '0'
70
77
  type: :development
71
78
  prerelease: false
72
79
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
80
  requirements:
75
- - - ! '>='
81
+ - - ">="
76
82
  - !ruby/object:Gem::Version
77
83
  version: '0'
78
84
  - !ruby/object:Gem::Dependency
79
- name: rspec-rails
85
+ name: solr_wrapper
80
86
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
87
  requirements:
83
- - - ! '>='
88
+ - - ">="
84
89
  - !ruby/object:Gem::Version
85
90
  version: '0'
86
91
  type: :development
87
92
  prerelease: false
88
93
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
94
  requirements:
91
- - - ! '>='
95
+ - - ">="
92
96
  - !ruby/object:Gem::Version
93
97
  version: '0'
94
98
  - !ruby/object:Gem::Dependency
95
- name: capybara
99
+ name: engine_cart
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ - !ruby/object:Gem::Dependency
113
+ name: chromedriver-helper
96
114
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
115
  requirements:
99
- - - ! '>='
116
+ - - ">="
100
117
  - !ruby/object:Gem::Version
101
118
  version: '0'
102
119
  type: :development
103
120
  prerelease: false
104
121
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
122
  requirements:
107
- - - ! '>='
123
+ - - ">="
108
124
  - !ruby/object:Gem::Version
109
125
  version: '0'
110
126
  - !ruby/object:Gem::Dependency
111
- name: vcr
127
+ name: selenium-webdriver
112
128
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
129
  requirements:
115
- - - ! '>='
130
+ - - ">="
116
131
  - !ruby/object:Gem::Version
117
132
  version: '0'
118
133
  type: :development
119
134
  prerelease: false
120
135
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
136
  requirements:
123
- - - ! '>='
137
+ - - ">="
124
138
  - !ruby/object:Gem::Version
125
139
  version: '0'
126
140
  - !ruby/object:Gem::Dependency
127
- name: fakeweb
141
+ name: byebug
128
142
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
143
  requirements:
131
- - - ! '>='
144
+ - - ">="
132
145
  - !ruby/object:Gem::Version
133
146
  version: '0'
134
147
  type: :development
135
148
  prerelease: false
136
149
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
150
  requirements:
139
- - - ! '>='
151
+ - - ">="
140
152
  - !ruby/object:Gem::Version
141
153
  version: '0'
154
+ - !ruby/object:Gem::Dependency
155
+ name: rubocop
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - "~>"
159
+ - !ruby/object:Gem::Version
160
+ version: 0.50.0
161
+ type: :development
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - "~>"
166
+ - !ruby/object:Gem::Version
167
+ version: 0.50.0
168
+ - !ruby/object:Gem::Dependency
169
+ name: rubocop-rspec
170
+ requirement: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - "~>"
173
+ - !ruby/object:Gem::Version
174
+ version: 1.18.0
175
+ type: :development
176
+ prerelease: false
177
+ version_requirements: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - "~>"
180
+ - !ruby/object:Gem::Version
181
+ version: 1.18.0
142
182
  description:
143
183
  email:
144
184
  - chris@cbeer.info
185
+ - cmg2228@columbia.edu
145
186
  executables: []
146
187
  extensions: []
147
188
  extra_rdoc_files: []
148
189
  files:
190
+ - ".gitignore"
191
+ - ".rubocop.yml"
192
+ - ".rubocop_todo.yml"
193
+ - ".solr_wrapper"
194
+ - ".travis.yml"
149
195
  - Gemfile
150
- - Gemfile.lock
151
196
  - MIT-LICENSE
152
- - README.rdoc
197
+ - README.md
153
198
  - Rakefile
154
199
  - VERSION
155
- - app/assets/xsl/oai2.xsl
200
+ - app/assets/stylesheets/blacklight_oai_provider/oai2.xsl
201
+ - app/controllers/concerns/blacklight_oai_provider/controller.rb
202
+ - app/models/concerns/blacklight_oai_provider/solr_document.rb
156
203
  - blacklight_oai_provider.gemspec
157
- - config/routes.rb
204
+ - config/initializers/oai_patches.rb
158
205
  - lib/blacklight_oai_provider.rb
159
- - lib/blacklight_oai_provider/README.rdoc
160
- - lib/blacklight_oai_provider/controller_extension.rb
161
206
  - lib/blacklight_oai_provider/engine.rb
162
- - lib/blacklight_oai_provider/route_sets.rb
163
- - lib/blacklight_oai_provider/solr_document_extension.rb
207
+ - lib/blacklight_oai_provider/exceptions.rb
208
+ - lib/blacklight_oai_provider/resumption_token.rb
209
+ - lib/blacklight_oai_provider/routes.rb
164
210
  - lib/blacklight_oai_provider/solr_document_provider.rb
165
211
  - lib/blacklight_oai_provider/solr_document_wrapper.rb
166
212
  - lib/blacklight_oai_provider/version.rb
167
- - lib/generators/blacklight_oai_provider/blacklight_oai_provider_generator.rb
168
- - spec/acceptance/blacklight_oai_provider_spec.rb
169
- - spec/integration/blacklight_stub_spec.rb
170
- - spec/internal/app/controllers/application_controller.rb
171
- - spec/internal/app/models/solr_document.rb
172
- - spec/internal/config/database.yml
173
- - spec/internal/config/routes.rb
174
- - spec/internal/config/solr.yml
175
- - spec/internal/db/combustion_test.sqlite
176
- - spec/internal/db/schema.rb
177
- - spec/internal/log/.gitignore
178
- - spec/internal/public/favicon.ico
179
- - spec/lib/solr_document_extension_spec.rb
213
+ - lib/generators/blacklight_oai_provider/install_generator.rb
214
+ - lib/railties/blacklight_oai_provider.rake
215
+ - solr/conf/_rest_managed.json
216
+ - solr/conf/admin-extra.html
217
+ - solr/conf/elevate.xml
218
+ - solr/conf/mapping-ISOLatin1Accent.txt
219
+ - solr/conf/protwords.txt
220
+ - solr/conf/schema.xml
221
+ - solr/conf/scripts.conf
222
+ - solr/conf/solrconfig.xml
223
+ - solr/conf/spellings.txt
224
+ - solr/conf/stopwords.txt
225
+ - solr/conf/stopwords_en.txt
226
+ - solr/conf/synonyms.txt
227
+ - solr/conf/xslt/example.xsl
228
+ - solr/conf/xslt/example_atom.xsl
229
+ - solr/conf/xslt/example_rss.xsl
230
+ - solr/conf/xslt/luke.xsl
231
+ - solr/sample_solr_documents.yml
232
+ - spec/controllers/catalog_controller_spec.rb
233
+ - spec/features/html_rendering_spec.rb
234
+ - spec/models/solr_document_spec.rb
235
+ - spec/requests/get_record_spec.rb
236
+ - spec/requests/identify_spec.rb
237
+ - spec/requests/list_identifiers_spec.rb
238
+ - spec/requests/list_metadata_formats_spec.rb
239
+ - spec/requests/list_records_spec.rb
180
240
  - spec/spec_helper.rb
181
- - spec/vcr_cassettes/solr.yml
241
+ - spec/test_app_templates/config/solr.yml
242
+ - spec/test_app_templates/lib/generators/test_app_generator.rb
182
243
  homepage: http://projectblacklight.org/
183
244
  licenses: []
184
- post_install_message:
245
+ metadata: {}
246
+ post_install_message: |2+
247
+
248
+ BlacklightOaiProvider v4.1 implements configuration changes. Please visit README for more information.
249
+
185
250
  rdoc_options: []
186
251
  require_paths:
187
252
  - lib
188
253
  required_ruby_version: !ruby/object:Gem::Requirement
189
- none: false
190
254
  requirements:
191
- - - ! '>='
255
+ - - ">="
192
256
  - !ruby/object:Gem::Version
193
257
  version: '0'
194
258
  required_rubygems_version: !ruby/object:Gem::Requirement
195
- none: false
196
259
  requirements:
197
- - - ! '>='
260
+ - - ">="
198
261
  - !ruby/object:Gem::Version
199
262
  version: '0'
200
263
  requirements: []
201
264
  rubyforge_project: blacklight
202
- rubygems_version: 1.8.23
265
+ rubygems_version: 2.5.2
203
266
  signing_key:
204
- specification_version: 3
267
+ specification_version: 4
205
268
  summary: Blacklight Oai Provider plugin
206
269
  test_files:
207
- - spec/acceptance/blacklight_oai_provider_spec.rb
208
- - spec/integration/blacklight_stub_spec.rb
209
- - spec/internal/app/controllers/application_controller.rb
210
- - spec/internal/app/models/solr_document.rb
211
- - spec/internal/config/database.yml
212
- - spec/internal/config/routes.rb
213
- - spec/internal/config/solr.yml
214
- - spec/internal/db/combustion_test.sqlite
215
- - spec/internal/db/schema.rb
216
- - spec/internal/log/.gitignore
217
- - spec/internal/public/favicon.ico
218
- - spec/lib/solr_document_extension_spec.rb
270
+ - spec/controllers/catalog_controller_spec.rb
271
+ - spec/features/html_rendering_spec.rb
272
+ - spec/models/solr_document_spec.rb
273
+ - spec/requests/get_record_spec.rb
274
+ - spec/requests/identify_spec.rb
275
+ - spec/requests/list_identifiers_spec.rb
276
+ - spec/requests/list_metadata_formats_spec.rb
277
+ - spec/requests/list_records_spec.rb
219
278
  - spec/spec_helper.rb
220
- - spec/vcr_cassettes/solr.yml
221
- has_rdoc:
279
+ - spec/test_app_templates/config/solr.yml
280
+ - spec/test_app_templates/lib/generators/test_app_generator.rb
data/Gemfile.lock DELETED
@@ -1,187 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- blacklight_oai_provider (0.0.2)
5
- blacklight
6
- oai
7
- rails (~> 3.0)
8
-
9
- GEM
10
- remote: http://rubygems.org/
11
- specs:
12
- actionmailer (3.2.8)
13
- actionpack (= 3.2.8)
14
- mail (~> 2.4.4)
15
- actionpack (3.2.8)
16
- activemodel (= 3.2.8)
17
- activesupport (= 3.2.8)
18
- builder (~> 3.0.0)
19
- erubis (~> 2.7.0)
20
- journey (~> 1.0.4)
21
- rack (~> 1.4.0)
22
- rack-cache (~> 1.2)
23
- rack-test (~> 0.6.1)
24
- sprockets (~> 2.1.3)
25
- activemodel (3.2.8)
26
- activesupport (= 3.2.8)
27
- builder (~> 3.0.0)
28
- activerecord (3.2.8)
29
- activemodel (= 3.2.8)
30
- activesupport (= 3.2.8)
31
- arel (~> 3.0.2)
32
- tzinfo (~> 0.3.29)
33
- activeresource (3.2.8)
34
- activemodel (= 3.2.8)
35
- activesupport (= 3.2.8)
36
- activesupport (3.2.8)
37
- i18n (~> 0.6)
38
- multi_json (~> 1.0)
39
- addressable (2.3.2)
40
- arel (3.0.2)
41
- blacklight (3.5.0)
42
- compass-rails (~> 1.0.0)
43
- compass-susy-plugin (>= 0.9.0)
44
- kaminari
45
- marc (>= 0.4.3, < 1.1)
46
- nokogiri (~> 1.5)
47
- rails (~> 3.1)
48
- rsolr (~> 1.0.6)
49
- rsolr-ext (~> 1.0.3)
50
- sass-rails
51
- unicode
52
- builder (3.0.0)
53
- capybara (1.1.2)
54
- mime-types (>= 1.16)
55
- nokogiri (>= 1.3.3)
56
- rack (>= 1.0.0)
57
- rack-test (>= 0.5.4)
58
- selenium-webdriver (~> 2.0)
59
- xpath (~> 0.1.4)
60
- childprocess (0.3.5)
61
- ffi (~> 1.0, >= 1.0.6)
62
- chunky_png (1.2.6)
63
- combustion (0.3.2)
64
- rails (>= 3.0.0)
65
- thor (>= 0.14.6)
66
- compass (0.12.2)
67
- chunky_png (~> 1.2)
68
- fssm (>= 0.2.7)
69
- sass (~> 3.1)
70
- compass-rails (1.0.3)
71
- compass (>= 0.12.2, < 0.14)
72
- compass-susy-plugin (0.9)
73
- compass (>= 0.11.1)
74
- diff-lcs (1.1.3)
75
- erubis (2.7.0)
76
- fakeweb (1.3.0)
77
- faraday (0.8.4)
78
- multipart-post (~> 1.1)
79
- faraday_middleware (0.8.8)
80
- faraday (>= 0.7.4, < 0.9)
81
- ffi (1.1.5)
82
- fssm (0.2.9)
83
- hike (1.2.1)
84
- i18n (0.6.0)
85
- journey (1.0.4)
86
- json (1.7.4)
87
- kaminari (0.13.0)
88
- actionpack (>= 3.0.0)
89
- activesupport (>= 3.0.0)
90
- railties (>= 3.0.0)
91
- libwebsocket (0.1.5)
92
- addressable
93
- mail (2.4.4)
94
- i18n (>= 0.4.0)
95
- mime-types (~> 1.16)
96
- treetop (~> 1.4.8)
97
- marc (0.5.0)
98
- mime-types (1.19)
99
- multi_json (1.3.6)
100
- multipart-post (1.1.5)
101
- nokogiri (1.5.5)
102
- oai (0.2.1)
103
- builder (>= 2.0.0)
104
- faraday
105
- faraday_middleware
106
- polyglot (0.3.3)
107
- rack (1.4.1)
108
- rack-cache (1.2)
109
- rack (>= 0.4)
110
- rack-ssl (1.3.2)
111
- rack
112
- rack-test (0.6.1)
113
- rack (>= 1.0)
114
- rails (3.2.8)
115
- actionmailer (= 3.2.8)
116
- actionpack (= 3.2.8)
117
- activerecord (= 3.2.8)
118
- activeresource (= 3.2.8)
119
- activesupport (= 3.2.8)
120
- bundler (~> 1.0)
121
- railties (= 3.2.8)
122
- railties (3.2.8)
123
- actionpack (= 3.2.8)
124
- activesupport (= 3.2.8)
125
- rack-ssl (~> 1.3.2)
126
- rake (>= 0.8.7)
127
- rdoc (~> 3.4)
128
- thor (>= 0.14.6, < 2.0)
129
- rake (0.9.2.2)
130
- rdoc (3.12)
131
- json (~> 1.4)
132
- rsolr (1.0.8)
133
- builder (>= 2.1.2)
134
- rsolr-ext (1.0.3)
135
- rsolr (>= 1.0.2)
136
- rspec (2.11.0)
137
- rspec-core (~> 2.11.0)
138
- rspec-expectations (~> 2.11.0)
139
- rspec-mocks (~> 2.11.0)
140
- rspec-core (2.11.1)
141
- rspec-expectations (2.11.2)
142
- diff-lcs (~> 1.1.3)
143
- rspec-mocks (2.11.2)
144
- rspec-rails (2.11.0)
145
- actionpack (>= 3.0)
146
- activesupport (>= 3.0)
147
- railties (>= 3.0)
148
- rspec (~> 2.11.0)
149
- rubyzip (0.9.9)
150
- sass (3.2.1)
151
- sass-rails (3.2.5)
152
- railties (~> 3.2.0)
153
- sass (>= 3.1.10)
154
- tilt (~> 1.3)
155
- selenium-webdriver (2.25.0)
156
- childprocess (>= 0.2.5)
157
- libwebsocket (~> 0.1.3)
158
- multi_json (~> 1.0)
159
- rubyzip
160
- sprockets (2.1.3)
161
- hike (~> 1.2)
162
- rack (~> 1.0)
163
- tilt (~> 1.1, != 1.3.0)
164
- sqlite3 (1.3.6)
165
- thor (0.16.0)
166
- tilt (1.3.3)
167
- treetop (1.4.10)
168
- polyglot
169
- polyglot (>= 0.3.1)
170
- tzinfo (0.3.33)
171
- unicode (0.4.3)
172
- vcr (2.2.4)
173
- xpath (0.1.4)
174
- nokogiri (~> 1.3)
175
-
176
- PLATFORMS
177
- ruby
178
-
179
- DEPENDENCIES
180
- blacklight_oai_provider!
181
- capybara
182
- combustion
183
- fakeweb
184
- rspec
185
- rspec-rails
186
- sqlite3
187
- vcr
data/README.rdoc DELETED
@@ -1,74 +0,0 @@
1
- BlacklightOaiProvider: OAI-PMH service endpoint for Blacklight applications
2
-
3
- = Description
4
-
5
- The BlacklightOaiProvider plugin provides an Open Archives Initiative Protocolo for Metadata Harvesting (OAI-PMH) <http://www.openarchives.org/pmh/> data provider endpoint, using the ruby-oai gem, that let serice providers harvest that metadata.
6
-
7
- = Requirements
8
-
9
- A Rails app using Blacklight 3.x.
10
-
11
- OAI-PMH requires a timestamp field for all records, so your Solr index should include an appropriate field. By default, the name of this field is simply 'timestamp'.
12
-
13
- = Installation
14
-
15
- Add
16
-
17
- gem "blacklight_oai_provider"
18
-
19
- to your Gemfile and run "bundle install".
20
-
21
- Then run "rails generate blacklight_oai_provider" to install the appropriate extensions into your CatalogController and SolrDocument classes. In you want to do customize the way this installs, instead you may:
22
-
23
- - add this to your Solr Document model:
24
-
25
- use_extension(BlacklightOaiProvider::SolrDocumentExtension)
26
-
27
- - add this to your Controller:
28
-
29
- include BlacklightOaiProvider::ControllerExtension
30
-
31
-
32
- = Configuration
33
-
34
- While the plugin provides some sensible (albeit generic) defaults out of the box, you probably will want to customize the OAI provider configuration. You can provide OAI-PMH provider parameters by placing the following in your blacklight configuration (in ./config/initializers/blacklight_config.rb), e.g.:
35
-
36
- config[:oai] = {
37
- :provider => {
38
- :repository_name => 'Test',
39
- :repository_url => 'http://localhost',
40
- :record_prefix => '',
41
- :admin_email => 'root@localhost'
42
- },
43
- :document => {
44
- :timestamp => 'timestamp',
45
- :limit => 25
46
- }
47
- }
48
-
49
- The "provider" configuration is documented as part of the ruby-oai gem at http://oai.rubyforge.org/
50
-
51
-
52
- == Injection
53
-
54
- This plugin assumes it is in a Blacklight Rails app, uses Blacklight methods, Rails methods, and standard ruby module includes to inject it's behaviors into the app.
55
-
56
- You can turn off this injection if you like, although it will make the plugin less (or non-) functional unless you manually do similar injection. See lib/blacklight_oai_provider.rb#inject! to see exactly what's going on.
57
-
58
- In any initializer, you can set:
59
-
60
- BlacklightOaiProvider.omit_inject = true
61
-
62
- to turn off all injection. The plugin will be completely non-functional if you do this, of course. But perhaps you could try to re-use some of it's classes in a non-Blacklight, highly hacked Blacklight, or even non-Rails application this way.
63
-
64
- You can also turn off injection of individual components, which could be more useful:
65
-
66
- BlacklightOaiProvider.omit_inject = {
67
- :routes => false,
68
- }
69
-
70
- = Tests
71
-
72
- There are none. This is bad I know, sorry. You can test OAI-PMH conformance against http://www.openarchives.org/data/registerasprovider.html#Protocol_Conformance_Testing or browse the data at http://re.cs.uct.ac.za/
73
-
74
-
data/config/routes.rb DELETED
@@ -1,5 +0,0 @@
1
- # We want to add a new collection action to Catalog, without over-writing
2
- # what's already there. This SEEMS to do it.
3
- Rails.application.routes.draw do
4
- end
5
-
File without changes
@@ -1,29 +0,0 @@
1
- # Meant to be applied on top of a controller that implements
2
- # Blacklight::SolrHelper. Will inject range limiting behaviors
3
- # to solr parameters creation.
4
- module BlacklightOaiProvider::ControllerExtension
5
- def self.included(some_class)
6
- some_class.helper_method :oai_config
7
- end
8
-
9
- # Action method of our own!
10
- # Delivers a _partial_ that's a display of a single fields range facets.
11
- # Used when we need a second Solr query to get range facets, after the
12
- # first found min/max from result set.
13
- def oai
14
- options = params.delete_if { |k,v| %w{controller action}.include?(k) }
15
- render :text => oai_provider.process_request(options).gsub('<?xml version="1.0" encoding="UTF-8"?>', "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<?xml-stylesheet type=\"text/xsl\" href=\"#{ ActionController::Base.helpers.asset_path('oai2.xsl')}\" ?>"), :content_type => 'text/xml'
16
- end
17
-
18
- # Uses Blacklight.config, needs to be modified when
19
- # that changes to be controller-based. This is the only method
20
- # in this plugin that accesses Blacklight.config, single point
21
- # of contact.
22
- def oai_config
23
- blacklight_config.oai || {}
24
- end
25
-
26
- def oai_provider
27
- @oai_provider ||= BlacklightOaiProvider::SolrDocumentProvider.new(self, oai_config)
28
- end
29
- end
@@ -1,13 +0,0 @@
1
- module BlacklightOaiProvider
2
- module RouteSets
3
- protected
4
- def catalog
5
- add_routes do |options|
6
- match 'catalog/oai' => 'catalog#oai', :as => 'oai_provider'
7
- end
8
-
9
- super
10
- end
11
- end
12
- end
13
-
@@ -1,10 +0,0 @@
1
- # Meant to be applied on top of SolrDocument to implement
2
- # methods required by the ruby-oai provider
3
- module BlacklightOaiProvider::SolrDocumentExtension
4
- def timestamp
5
- Time.parse get('timestamp')
6
- end
7
- def to_oai_dc
8
- export_as('oai_dc_xml')
9
- end
10
- end