berkeley_library-av-core 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +7 -0
  2. data/.dockerignore +391 -0
  3. data/.github/workflows/build.yml +30 -0
  4. data/.gitignore +388 -0
  5. data/.idea/av_core.iml +146 -0
  6. data/.idea/codeStyles/Project.xml +12 -0
  7. data/.idea/codeStyles/codeStyleConfig.xml +5 -0
  8. data/.idea/go.imports.xml +6 -0
  9. data/.idea/inspectionProfiles/Project_Default.xml +37 -0
  10. data/.idea/misc.xml +6 -0
  11. data/.idea/modules.xml +8 -0
  12. data/.idea/vcs.xml +6 -0
  13. data/.rubocop.yml +241 -0
  14. data/.ruby-version +1 -0
  15. data/.simplecov +8 -0
  16. data/CHANGES.md +38 -0
  17. data/Gemfile +3 -0
  18. data/Jenkinsfile +16 -0
  19. data/LICENSE.md +21 -0
  20. data/README.md +20 -0
  21. data/Rakefile +20 -0
  22. data/av_core.gemspec +49 -0
  23. data/lib/berkeley_library/av/config.rb +238 -0
  24. data/lib/berkeley_library/av/constants.rb +30 -0
  25. data/lib/berkeley_library/av/core/module_info.rb +18 -0
  26. data/lib/berkeley_library/av/core.rb +7 -0
  27. data/lib/berkeley_library/av/marc/util.rb +114 -0
  28. data/lib/berkeley_library/av/marc.rb +52 -0
  29. data/lib/berkeley_library/av/metadata/README.md +5 -0
  30. data/lib/berkeley_library/av/metadata/field.rb +110 -0
  31. data/lib/berkeley_library/av/metadata/fields.rb +130 -0
  32. data/lib/berkeley_library/av/metadata/link.rb +28 -0
  33. data/lib/berkeley_library/av/metadata/readers/alma.rb +54 -0
  34. data/lib/berkeley_library/av/metadata/readers/base.rb +53 -0
  35. data/lib/berkeley_library/av/metadata/readers/tind.rb +52 -0
  36. data/lib/berkeley_library/av/metadata/readers.rb +2 -0
  37. data/lib/berkeley_library/av/metadata/source.rb +93 -0
  38. data/lib/berkeley_library/av/metadata/tind_html_metadata_da.json +2076 -0
  39. data/lib/berkeley_library/av/metadata/value.rb +121 -0
  40. data/lib/berkeley_library/av/metadata.rb +103 -0
  41. data/lib/berkeley_library/av/record.rb +86 -0
  42. data/lib/berkeley_library/av/record_id.rb +121 -0
  43. data/lib/berkeley_library/av/record_not_found.rb +7 -0
  44. data/lib/berkeley_library/av/restrictions.rb +36 -0
  45. data/lib/berkeley_library/av/track.rb +132 -0
  46. data/lib/berkeley_library/av/types/duration.rb +67 -0
  47. data/lib/berkeley_library/av/types/file_type.rb +84 -0
  48. data/lib/berkeley_library/av/util.rb +65 -0
  49. data/rakelib/bundle.rake +8 -0
  50. data/rakelib/coverage.rake +11 -0
  51. data/rakelib/gem.rake +54 -0
  52. data/rakelib/rubocop.rake +18 -0
  53. data/rakelib/spec.rake +12 -0
  54. data/spec/.rubocop.yml +116 -0
  55. data/spec/data/10.23.19.JessieLaCavalier.02.mrc +3 -0
  56. data/spec/data/alma/991005939359706532-sru.xml +123 -0
  57. data/spec/data/alma/991034756419706532-sru.xml +162 -0
  58. data/spec/data/alma/991047179369706532-sru.xml +210 -0
  59. data/spec/data/alma/991054360089706532-sru.xml +186 -0
  60. data/spec/data/alma/b11082434-sru.xml +165 -0
  61. data/spec/data/alma/b18538031-sru.xml +123 -0
  62. data/spec/data/alma/b20786580-sru.xml +123 -0
  63. data/spec/data/alma/b22139647-sru.xml +171 -0
  64. data/spec/data/alma/b22139658-sru.xml +282 -0
  65. data/spec/data/alma/b23161018-sru.xml +182 -0
  66. data/spec/data/alma/b23305522-sru.xml +144 -0
  67. data/spec/data/alma/b24071548-sru.xml +136 -0
  68. data/spec/data/alma/b24659129-sru.xml +210 -0
  69. data/spec/data/alma/b25207857-sru.xml +217 -0
  70. data/spec/data/alma/b25716973-sru.xml +186 -0
  71. data/spec/data/alma/b25742488-sru.xml +246 -0
  72. data/spec/data/record-(cityarts)00002.xml +78 -0
  73. data/spec/data/record-(cityarts)00773.xml +94 -0
  74. data/spec/data/record-(clir)00020.xml +153 -0
  75. data/spec/data/record-(miscmat)00615.xml +45 -0
  76. data/spec/data/record-(pacradio)00107.xml +85 -0
  77. data/spec/data/record-(pacradio)01469.xml +82 -0
  78. data/spec/data/record-empty-result.xml +4 -0
  79. data/spec/data/record-multiple-998s-disordered.xml +178 -0
  80. data/spec/data/record-multiple-998s.xml +178 -0
  81. data/spec/data/record-physcolloquia-bk00169017b.xml +78 -0
  82. data/spec/data/record-ragged-998-subfields.xml +122 -0
  83. data/spec/data/record-ragged-998s-multiple-fields.xml +160 -0
  84. data/spec/data/record-redirect-to-login.html +288 -0
  85. data/spec/data/record_id/bibs_with_check_digits.txt +151 -0
  86. data/spec/data/search-1993.xml +158 -0
  87. data/spec/data/search-b23305516.xml +81 -0
  88. data/spec/lib/berkeley_library/av/av_spec.rb +12 -0
  89. data/spec/lib/berkeley_library/av/config_spec.rb +250 -0
  90. data/spec/lib/berkeley_library/av/marc/util_spec.rb +150 -0
  91. data/spec/lib/berkeley_library/av/marc_spec.rb +62 -0
  92. data/spec/lib/berkeley_library/av/metadata/field_spec.rb +81 -0
  93. data/spec/lib/berkeley_library/av/metadata/fields_spec.rb +180 -0
  94. data/spec/lib/berkeley_library/av/metadata/metadata_spec.rb +274 -0
  95. data/spec/lib/berkeley_library/av/metadata/source_spec.rb +261 -0
  96. data/spec/lib/berkeley_library/av/metadata/value_spec.rb +29 -0
  97. data/spec/lib/berkeley_library/av/record_id_spec.rb +72 -0
  98. data/spec/lib/berkeley_library/av/record_spec.rb +284 -0
  99. data/spec/lib/berkeley_library/av/track_spec.rb +335 -0
  100. data/spec/lib/berkeley_library/av/types/duration_spec.rb +91 -0
  101. data/spec/lib/berkeley_library/av/types/file_type_spec.rb +98 -0
  102. data/spec/lib/berkeley_library/av/util_spec.rb +30 -0
  103. data/spec/spec_helper.rb +63 -0
  104. metadata +499 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 472efcb19a77e962d85c419d61cbc4fd809d3ce3a963c984a22e68009273258e
4
+ data.tar.gz: e6954a8b128105ac9d416970b0f6fdca9d96c17535a8bd4f28a68be823dc19ca
5
+ SHA512:
6
+ metadata.gz: a4cf4b944c3a3616739bd936334b0d0d1e04ab59ac6098b299d8f06bd8753cec3c5ffb207b049c5ab8974ceaa4088e849c5083bb0e81ec1c309ba47cb196aa37
7
+ data.tar.gz: a56fb208be8b1ff8889d8d83c6c109068ec81b566200fd24a8f76ba8a1106c267e338d39c59d88564939ab283c9520f038bbf4d0f8d0d367974c3dd03acb2b75
data/.dockerignore ADDED
@@ -0,0 +1,391 @@
1
+ ############################################################
2
+ # Custom ignores
3
+
4
+ Dockerfile
5
+ docker-compose.yml
6
+
7
+ # github-markdown-preview previews
8
+ *.md.html
9
+
10
+ # Additional IDEA/RubyMine ignores
11
+ .idea/.rakeTasks
12
+
13
+ # Don't commit Gemfile.lock for libraries
14
+ Gemfile.lock
15
+
16
+ # build artifacts
17
+ /artifacts/
18
+
19
+ ############################################################
20
+ # Generated ignores
21
+
22
+ #### joe made this: http://goel.io/joe
23
+
24
+ #### ruby ####
25
+ *.gem
26
+ *.rbc
27
+ /.config
28
+ /coverage/
29
+ /InstalledFiles
30
+ /pkg/
31
+ /spec/reports/
32
+ /spec/examples.txt
33
+ /test/tmp/
34
+ /test/version_tmp/
35
+ /tmp/
36
+
37
+ # Used by dotenv library to load environment variables.
38
+ # .env
39
+
40
+ # Ignore Byebug command history file.
41
+ .byebug_history
42
+
43
+ ## Specific to RubyMotion:
44
+ .dat*
45
+ .repl_history
46
+ build/
47
+ *.bridgesupport
48
+ build-iPhoneOS/
49
+ build-iPhoneSimulator/
50
+
51
+ ## Specific to RubyMotion (use of CocoaPods):
52
+ #
53
+ # We recommend against adding the Pods directory to your .gitignore. However
54
+ # you should judge for yourself, the pros and cons are mentioned at:
55
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
56
+ #
57
+ # vendor/Pods/
58
+
59
+ ## Documentation cache and generated files:
60
+ /.yardoc/
61
+ /_yardoc/
62
+ /doc/
63
+ /rdoc/
64
+
65
+ ## Environment normalization:
66
+ /.bundle/
67
+ /vendor/bundle
68
+ /lib/bundler/man/
69
+
70
+ # for a library or gem, you might want to ignore these files since the code is
71
+ # intended to run in multiple environments; otherwise, check them in:
72
+ # Gemfile.lock
73
+ # .ruby-version
74
+ # .ruby-gemset
75
+
76
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
77
+ .rvmrc
78
+
79
+
80
+ #### rails ####
81
+ *.rbc
82
+ capybara-*.html
83
+ .rspec
84
+ /db/*.sqlite3
85
+ /db/*.sqlite3-journal
86
+ /db/*.sqlite3-[0-9]*
87
+ /public/system
88
+ /coverage/
89
+ /spec/tmp
90
+ *.orig
91
+ rerun.txt
92
+ pickle-email-*.html
93
+
94
+ # Ignore all logfiles and tempfiles.
95
+ /log/*
96
+ /tmp/*
97
+ !/log/.keep
98
+ !/tmp/.keep
99
+
100
+ # Comment out this rule if you are OK with secrets being uploaded to the repo
101
+ config/initializers/secret_token.rb
102
+ config/master.key
103
+
104
+ # Only include if you have production secrets in this file, which is no longer a Rails default
105
+ # config/secrets.yml
106
+
107
+ # dotenv
108
+ # Comment out this rule if environment variables can be committed
109
+ .env
110
+
111
+ ## Environment normalization:
112
+ /.bundle
113
+ /vendor/bundle
114
+
115
+ # these should all be checked in to normalize the environment:
116
+ # Gemfile.lock, .ruby-version, .ruby-gemset
117
+
118
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
119
+ .rvmrc
120
+
121
+ # if using bower-rails ignore default bower_components path bower.json files
122
+ /vendor/assets/bower_components
123
+ *.bowerrc
124
+ bower.json
125
+
126
+ # Ignore pow environment settings
127
+ .powenv
128
+
129
+ # Ignore Byebug command history file.
130
+ .byebug_history
131
+
132
+ # Ignore node_modules
133
+ node_modules/
134
+
135
+ # Ignore precompiled javascript packs
136
+ /public/packs
137
+ /public/packs-test
138
+ /public/assets
139
+
140
+ # Ignore yarn files
141
+ /yarn-error.log
142
+ yarn-debug.log*
143
+ .yarn-integrity
144
+
145
+ # Ignore uploaded files in development
146
+ /storage/*
147
+ !/storage/.keep
148
+
149
+
150
+ #### node ####
151
+ # Logs
152
+ logs
153
+ *.log
154
+ npm-debug.log*
155
+ yarn-debug.log*
156
+ yarn-error.log*
157
+ lerna-debug.log*
158
+
159
+ # Diagnostic reports (https://nodejs.org/api/report.html)
160
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
161
+
162
+ # Runtime data
163
+ pids
164
+ *.pid
165
+ *.seed
166
+ *.pid.lock
167
+
168
+ # Directory for instrumented libs generated by jscoverage/JSCover
169
+ lib-cov
170
+
171
+ # Coverage directory used by tools like istanbul
172
+ coverage
173
+ *.lcov
174
+
175
+ # nyc test coverage
176
+ .nyc_output
177
+
178
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
179
+ .grunt
180
+
181
+ # Bower dependency directory (https://bower.io/)
182
+ bower_components
183
+
184
+ # node-waf configuration
185
+ .lock-wscript
186
+
187
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
188
+ build/Release
189
+
190
+ # Dependency directories
191
+ node_modules/
192
+ jspm_packages/
193
+
194
+ # TypeScript v1 declaration files
195
+ typings/
196
+
197
+ # TypeScript cache
198
+ *.tsbuildinfo
199
+
200
+ # Optional npm cache directory
201
+ .npm
202
+
203
+ # Optional eslint cache
204
+ .eslintcache
205
+
206
+ # Optional REPL history
207
+ .node_repl_history
208
+
209
+ # Output of 'npm pack'
210
+ *.tgz
211
+
212
+ # Yarn Integrity file
213
+ .yarn-integrity
214
+
215
+ # dotenv environment variables file
216
+ .env
217
+ .env.test
218
+
219
+ # parcel-bundler cache (https://parceljs.org/)
220
+ .cache
221
+
222
+ # next.js build output
223
+ .next
224
+
225
+ # nuxt.js build output
226
+ .nuxt
227
+
228
+ # vuepress build output
229
+ .vuepress/dist
230
+
231
+ # Serverless directories
232
+ .serverless/
233
+
234
+ # FuseBox cache
235
+ .fusebox/
236
+
237
+ # DynamoDB Local files
238
+ .dynamodb/
239
+
240
+
241
+ #### jetbrains ####
242
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
243
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
244
+
245
+ # User-specific stuff
246
+ .idea/**/workspace.xml
247
+ .idea/**/tasks.xml
248
+ .idea/**/usage.statistics.xml
249
+ .idea/**/dictionaries
250
+ .idea/**/shelf
251
+
252
+ # Generated files
253
+ .idea/**/contentModel.xml
254
+
255
+ # Sensitive or high-churn files
256
+ .idea/**/dataSources/
257
+ .idea/**/dataSources.ids
258
+ .idea/**/dataSources.local.xml
259
+ .idea/**/sqlDataSources.xml
260
+ .idea/**/dynamic.xml
261
+ .idea/**/uiDesigner.xml
262
+ .idea/**/dbnavigator.xml
263
+
264
+ # Gradle
265
+ .idea/**/gradle.xml
266
+ .idea/**/libraries
267
+
268
+ # Gradle and Maven with auto-import
269
+ # When using Gradle or Maven with auto-import, you should exclude module files,
270
+ # since they will be recreated, and may cause churn. Uncomment if using
271
+ # auto-import.
272
+ # .idea/modules.xml
273
+ # .idea/*.iml
274
+ # .idea/modules
275
+ # *.iml
276
+ # *.ipr
277
+
278
+ # CMake
279
+ cmake-build-*/
280
+
281
+ # Mongo Explorer plugin
282
+ .idea/**/mongoSettings.xml
283
+
284
+ # File-based project format
285
+ *.iws
286
+
287
+ # IntelliJ
288
+ out/
289
+
290
+ # mpeltonen/sbt-idea plugin
291
+ .idea_modules/
292
+
293
+ # JIRA plugin
294
+ atlassian-ide-plugin.xml
295
+
296
+ # Cursive Clojure plugin
297
+ .idea/replstate.xml
298
+
299
+ # Crashlytics plugin (for Android Studio and IntelliJ)
300
+ com_crashlytics_export_strings.xml
301
+ crashlytics.properties
302
+ crashlytics-build.properties
303
+ fabric.properties
304
+
305
+ # Editor-based Rest Client
306
+ .idea/httpRequests
307
+
308
+ # Android studio 3.1+ serialized cache file
309
+ .idea/caches/build_file_checksums.ser
310
+
311
+
312
+ #### emacs ####
313
+ # -*- mode: gitignore; -*-
314
+ *~
315
+ \#*\#
316
+ /.emacs.desktop
317
+ /.emacs.desktop.lock
318
+ *.elc
319
+ auto-save-list
320
+ tramp
321
+ .\#*
322
+
323
+ # Org-mode
324
+ .org-id-locations
325
+ *_archive
326
+
327
+ # flymake-mode
328
+ *_flymake.*
329
+
330
+ # eshell files
331
+ /eshell/history
332
+ /eshell/lastdir
333
+
334
+ # elpa packages
335
+ /elpa/
336
+
337
+ # reftex files
338
+ *.rel
339
+
340
+ # AUCTeX auto folder
341
+ /auto/
342
+
343
+ # cask packages
344
+ .cask/
345
+ dist/
346
+
347
+ # Flycheck
348
+ flycheck_*.el
349
+
350
+ # server auth directory
351
+ /server/
352
+
353
+ # projectiles files
354
+ .projectile
355
+
356
+ # directory configuration
357
+ .dir-locals.el
358
+
359
+ # network security
360
+ /network-security.data
361
+
362
+
363
+
364
+ #### macos ####
365
+ # General
366
+ .DS_Store
367
+ .AppleDouble
368
+ .LSOverride
369
+
370
+ # Icon must end with two \r
371
+ Icon
372
+
373
+
374
+ # Thumbnails
375
+ ._*
376
+
377
+ # Files that might appear in the root of a volume
378
+ .DocumentRevisions-V100
379
+ .fseventsd
380
+ .Spotlight-V100
381
+ .TemporaryItems
382
+ .Trashes
383
+ .VolumeIcon.icns
384
+ .com.apple.timemachine.donotpresent
385
+
386
+ # Directories potentially created on remote AFP share
387
+ .AppleDB
388
+ .AppleDesktop
389
+ Network Trash Folder
390
+ Temporary Items
391
+ .apdisk
@@ -0,0 +1,30 @@
1
+ name: Build
2
+ on: [ push, pull_request, workflow_dispatch ]
3
+ jobs:
4
+ test:
5
+ strategy:
6
+ fail-fast: false
7
+ matrix:
8
+ os: [ ubuntu-latest, macos-latest ]
9
+ ruby: [ '3.1' ]
10
+ runs-on: ${{ matrix.os }}
11
+
12
+ steps:
13
+ - name: Check out repository
14
+ uses: actions/checkout@v3
15
+
16
+ - name: Set up Ruby
17
+ uses: ruby/setup-ruby@v1
18
+ with:
19
+ ruby-version: ${{ matrix.ruby }}
20
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
21
+
22
+ - name: Run checks
23
+ run: bundle exec rake
24
+
25
+ - name: Upload artifacts
26
+ if: ${{ always() }}
27
+ uses: actions/upload-artifact@v3
28
+ with:
29
+ name: artifacts
30
+ path: artifacts/**