locabulary 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fbe9468e2613d56ef275ce2e7fc13886302f6cd7
4
- data.tar.gz: 9219a0be43d0193f9af9a73fc279cc54148fa35d
3
+ metadata.gz: b507a60d29bbce758b30cc6677f2ffdcbdd73948
4
+ data.tar.gz: 6ad60ecdb804de8857d9cc93d8cb1d3c31912993
5
5
  SHA512:
6
- metadata.gz: 377e7ce77061a58435943025e19baf497c930610b57415ad343bb99510ed69e01504b8b810fb9111fb005653edc07f12aeee2e0e897837de2dd20d5a7bf16247
7
- data.tar.gz: e68c7bf90a8fd180aedba2f22c927511c3e34470ac343b0f015d572bc3bff00b1677da41cf9bb732b216ecec8a1e3b723b3d30ab78fd02a65c6a8a0c4b7dda2d
6
+ metadata.gz: 576a816cd5943250d4f3012bd947ab41f621bd95fd7383731e351bca7e5f5f986e1d9ddf550ef7eb11bfb6764378ed466ff1fdb64ee3acb4e9f25b68c9f0c69c
7
+ data.tar.gz: 2b8f585f8ebfd012a17285ac15a82416b416281779672c237778a179365de76cb7285af54860423accbb7c38092376338ca350a1f61c86b1b1df5cdf031f60ce
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ /config/client_secrets.yml
@@ -0,0 +1,3 @@
1
+ # Please get the client_secrets.yml file from secrets_staging/locabulary
2
+ client_id: '12345678910'
3
+ client_secret: 'eiuwheuh29834723nvijdh9348r'
@@ -0,0 +1,778 @@
1
+ [
2
+ {
3
+ "predicate_name": "administrative_units",
4
+ "term_label": "University of Notre Dame",
5
+ "term_uri": null,
6
+ "default_presentation_sequence": 100,
7
+ "activated_on": "2015-07-22",
8
+ "deactivated_on": null
9
+ },
10
+ {
11
+ "predicate_name": "administrative_units",
12
+ "term_label": "University of Notre Dame::School of Architecture",
13
+ "term_uri": null,
14
+ "default_presentation_sequence": 200,
15
+ "activated_on": "2015-07-22",
16
+ "deactivated_on": null
17
+ },
18
+ {
19
+ "predicate_name": "administrative_units",
20
+ "term_label": "University of Notre Dame::School of Architecture::Center for Building Communities",
21
+ "term_uri": null,
22
+ "default_presentation_sequence": 500,
23
+ "activated_on": "2015-07-22",
24
+ "deactivated_on": null
25
+ },
26
+ {
27
+ "predicate_name": "administrative_units",
28
+ "term_label": "University of Notre Dame::Mendoza College of Business",
29
+ "term_uri": null,
30
+ "default_presentation_sequence": 200,
31
+ "activated_on": "2015-07-22",
32
+ "deactivated_on": null
33
+ },
34
+ {
35
+ "predicate_name": "administrative_units",
36
+ "term_label": "University of Notre Dame::Mendoza College of Business::Accountancy",
37
+ "term_uri": null,
38
+ "default_presentation_sequence": 300,
39
+ "activated_on": "2015-07-22",
40
+ "deactivated_on": null
41
+ },
42
+ {
43
+ "predicate_name": "administrative_units",
44
+ "term_label": "University of Notre Dame::Mendoza College of Business::Finance",
45
+ "term_uri": null,
46
+ "default_presentation_sequence": 300,
47
+ "activated_on": "2015-07-22",
48
+ "deactivated_on": null
49
+ },
50
+ {
51
+ "predicate_name": "administrative_units",
52
+ "term_label": "University of Notre Dame::Mendoza College of Business::Management",
53
+ "term_uri": null,
54
+ "default_presentation_sequence": 300,
55
+ "activated_on": "2015-07-22",
56
+ "deactivated_on": null
57
+ },
58
+ {
59
+ "predicate_name": "administrative_units",
60
+ "term_label": "University of Notre Dame::Mendoza College of Business::Marketing",
61
+ "term_uri": null,
62
+ "default_presentation_sequence": 300,
63
+ "activated_on": "2015-07-22",
64
+ "deactivated_on": null
65
+ },
66
+ {
67
+ "predicate_name": "administrative_units",
68
+ "term_label": "University of Notre Dame::Mendoza College of Business::Center for Accounting Research and Education (CARE)",
69
+ "term_uri": null,
70
+ "default_presentation_sequence": 500,
71
+ "activated_on": "2015-07-22",
72
+ "deactivated_on": null
73
+ },
74
+ {
75
+ "predicate_name": "administrative_units",
76
+ "term_label": "University of Notre Dame::Mendoza College of Business::Center for Ethics and Religious Values in Business",
77
+ "term_uri": null,
78
+ "default_presentation_sequence": 500,
79
+ "activated_on": "2015-07-22",
80
+ "deactivated_on": null
81
+ },
82
+ {
83
+ "predicate_name": "administrative_units",
84
+ "term_label": "University of Notre Dame::Mendoza College of Business::Center for the Study of Financial Regulation",
85
+ "term_uri": null,
86
+ "default_presentation_sequence": 500,
87
+ "activated_on": "2015-07-22",
88
+ "deactivated_on": null
89
+ },
90
+ {
91
+ "predicate_name": "administrative_units",
92
+ "term_label": "University of Notre Dame::Mendoza College of Business::Deloitte Center for Ethical Leadership",
93
+ "term_uri": null,
94
+ "default_presentation_sequence": 500,
95
+ "activated_on": "2015-07-22",
96
+ "deactivated_on": null
97
+ },
98
+ {
99
+ "predicate_name": "administrative_units",
100
+ "term_label": "University of Notre Dame::Mendoza College of Business::Fanning Center for Business Communication",
101
+ "term_uri": null,
102
+ "default_presentation_sequence": 500,
103
+ "activated_on": "2015-07-22",
104
+ "deactivated_on": null
105
+ },
106
+ {
107
+ "predicate_name": "administrative_units",
108
+ "term_label": "University of Notre Dame::Mendoza College of Business::Gigot Center for Entrepreneurship",
109
+ "term_uri": null,
110
+ "default_presentation_sequence": 500,
111
+ "activated_on": "2015-07-22",
112
+ "deactivated_on": null
113
+ },
114
+ {
115
+ "predicate_name": "administrative_units",
116
+ "term_label": "University of Notre Dame::Mendoza College of Business::Institute for Ethical Business Worldwide",
117
+ "term_uri": null,
118
+ "default_presentation_sequence": 500,
119
+ "activated_on": "2015-07-22",
120
+ "deactivated_on": null
121
+ },
122
+ {
123
+ "predicate_name": "administrative_units",
124
+ "term_label": "University of Notre Dame::College of Engineering",
125
+ "term_uri": null,
126
+ "default_presentation_sequence": 200,
127
+ "activated_on": "2015-07-22",
128
+ "deactivated_on": null
129
+ },
130
+ {
131
+ "predicate_name": "administrative_units",
132
+ "term_label": "University of Notre Dame::College of Engineering::Aerospace and Mechanical Engineering",
133
+ "term_uri": null,
134
+ "default_presentation_sequence": 300,
135
+ "activated_on": "2015-07-22",
136
+ "deactivated_on": null
137
+ },
138
+ {
139
+ "predicate_name": "administrative_units",
140
+ "term_label": "University of Notre Dame::College of Engineering::Chemical and Biomolecular Engineering",
141
+ "term_uri": null,
142
+ "default_presentation_sequence": 300,
143
+ "activated_on": "2015-07-22",
144
+ "deactivated_on": null
145
+ },
146
+ {
147
+ "predicate_name": "administrative_units",
148
+ "term_label": "University of Notre Dame::College of Engineering::Civil & Environmental Engineering & Earth Sciences",
149
+ "term_uri": null,
150
+ "default_presentation_sequence": 300,
151
+ "activated_on": "2015-07-22",
152
+ "deactivated_on": null
153
+ },
154
+ {
155
+ "predicate_name": "administrative_units",
156
+ "term_label": "University of Notre Dame::College of Engineering::Computer Science and Engineering",
157
+ "term_uri": null,
158
+ "default_presentation_sequence": 300,
159
+ "activated_on": "2015-07-22",
160
+ "deactivated_on": null
161
+ },
162
+ {
163
+ "predicate_name": "administrative_units",
164
+ "term_label": "University of Notre Dame::College of Engineering::Electrical Engineering",
165
+ "term_uri": null,
166
+ "default_presentation_sequence": 300,
167
+ "activated_on": "2015-07-22",
168
+ "deactivated_on": null
169
+ },
170
+ {
171
+ "predicate_name": "administrative_units",
172
+ "term_label": "University of Notre Dame::College of Engineering::NDnano",
173
+ "term_uri": null,
174
+ "default_presentation_sequence": 400,
175
+ "activated_on": "2015-07-22",
176
+ "deactivated_on": null
177
+ },
178
+ {
179
+ "predicate_name": "administrative_units",
180
+ "term_label": "University of Notre Dame::College of Engineering::Wireless Institute",
181
+ "term_uri": null,
182
+ "default_presentation_sequence": 400,
183
+ "activated_on": "2015-07-22",
184
+ "deactivated_on": null
185
+ },
186
+ {
187
+ "predicate_name": "administrative_units",
188
+ "term_label": "University of Notre Dame::College of Engineering::Institute for Flow Physics and Control",
189
+ "term_uri": null,
190
+ "default_presentation_sequence": 400,
191
+ "activated_on": "2015-07-22",
192
+ "deactivated_on": null
193
+ },
194
+ {
195
+ "predicate_name": "administrative_units",
196
+ "term_label": "University of Notre Dame::College of Engineering::Midwest Institute for Nanoelectronics Discovery",
197
+ "term_uri": null,
198
+ "default_presentation_sequence": 400,
199
+ "activated_on": "2015-07-22",
200
+ "deactivated_on": null
201
+ },
202
+ {
203
+ "predicate_name": "administrative_units",
204
+ "term_label": "University of Notre Dame::College of Engineering::Center for Microfluidics and Medical Diagnostics",
205
+ "term_uri": null,
206
+ "default_presentation_sequence": 500,
207
+ "activated_on": "2015-07-22",
208
+ "deactivated_on": null
209
+ },
210
+ {
211
+ "predicate_name": "administrative_units",
212
+ "term_label": "University of Notre Dame::College of Engineering::Center for Environmental Science and Technology",
213
+ "term_uri": null,
214
+ "default_presentation_sequence": 500,
215
+ "activated_on": "2015-07-22",
216
+ "deactivated_on": null
217
+ },
218
+ {
219
+ "predicate_name": "administrative_units",
220
+ "term_label": "University of Notre Dame::College of Science",
221
+ "term_uri": null,
222
+ "default_presentation_sequence": 200,
223
+ "activated_on": "2015-07-22",
224
+ "deactivated_on": null
225
+ },
226
+ {
227
+ "predicate_name": "administrative_units",
228
+ "term_label": "University of Notre Dame::College of Science::Applied and Computational Mathematics and Statistics",
229
+ "term_uri": null,
230
+ "default_presentation_sequence": 300,
231
+ "activated_on": "2015-07-22",
232
+ "deactivated_on": null
233
+ },
234
+ {
235
+ "predicate_name": "administrative_units",
236
+ "term_label": "University of Notre Dame::College of Science::Biology",
237
+ "term_uri": null,
238
+ "default_presentation_sequence": 300,
239
+ "activated_on": "2015-07-22",
240
+ "deactivated_on": null
241
+ },
242
+ {
243
+ "predicate_name": "administrative_units",
244
+ "term_label": "University of Notre Dame::College of Science::Chemistry and Biochemistry",
245
+ "term_uri": null,
246
+ "default_presentation_sequence": 300,
247
+ "activated_on": "2015-07-22",
248
+ "deactivated_on": null
249
+ },
250
+ {
251
+ "predicate_name": "administrative_units",
252
+ "term_label": "University of Notre Dame::College of Science::Mathematics",
253
+ "term_uri": null,
254
+ "default_presentation_sequence": 300,
255
+ "activated_on": "2015-07-22",
256
+ "deactivated_on": null
257
+ },
258
+ {
259
+ "predicate_name": "administrative_units",
260
+ "term_label": "University of Notre Dame::College of Science::Physics",
261
+ "term_uri": null,
262
+ "default_presentation_sequence": 300,
263
+ "activated_on": "2015-07-22",
264
+ "deactivated_on": null
265
+ },
266
+ {
267
+ "predicate_name": "administrative_units",
268
+ "term_label": "University of Notre Dame::College of Science::Environmental Research Center (UNDERC)",
269
+ "term_uri": null,
270
+ "default_presentation_sequence": 400,
271
+ "activated_on": "2015-07-22",
272
+ "deactivated_on": null
273
+ },
274
+ {
275
+ "predicate_name": "administrative_units",
276
+ "term_label": "University of Notre Dame::College of Science::Harper Cancer Research Institute",
277
+ "term_uri": null,
278
+ "default_presentation_sequence": 400,
279
+ "activated_on": "2015-07-22",
280
+ "deactivated_on": null
281
+ },
282
+ {
283
+ "predicate_name": "administrative_units",
284
+ "term_label": "University of Notre Dame::College of Science::Center for Astrophysics (CANDU)",
285
+ "term_uri": null,
286
+ "default_presentation_sequence": 500,
287
+ "activated_on": "2015-07-22",
288
+ "deactivated_on": null
289
+ },
290
+ {
291
+ "predicate_name": "administrative_units",
292
+ "term_label": "University of Notre Dame::College of Science::Center for Health Sciences Advising",
293
+ "term_uri": null,
294
+ "default_presentation_sequence": 500,
295
+ "activated_on": "2015-07-22",
296
+ "deactivated_on": null
297
+ },
298
+ {
299
+ "predicate_name": "administrative_units",
300
+ "term_label": "University of Notre Dame::College of Science::Center for Mathematics",
301
+ "term_uri": null,
302
+ "default_presentation_sequence": 500,
303
+ "activated_on": "2015-07-22",
304
+ "deactivated_on": null
305
+ },
306
+ {
307
+ "predicate_name": "administrative_units",
308
+ "term_label": "University of Notre Dame::College of Science::Center for Stem Cells and Regenerative Medicine",
309
+ "term_uri": null,
310
+ "default_presentation_sequence": 500,
311
+ "activated_on": "2015-07-22",
312
+ "deactivated_on": null
313
+ },
314
+ {
315
+ "predicate_name": "administrative_units",
316
+ "term_label": "University of Notre Dame::College of Science::Center for Zebrafish Research",
317
+ "term_uri": null,
318
+ "default_presentation_sequence": 500,
319
+ "activated_on": "2015-07-22",
320
+ "deactivated_on": null
321
+ },
322
+ {
323
+ "predicate_name": "administrative_units",
324
+ "term_label": "University of Notre Dame::College of Science::iCeNSA",
325
+ "term_uri": null,
326
+ "default_presentation_sequence": 500,
327
+ "activated_on": "2015-07-22",
328
+ "deactivated_on": null
329
+ },
330
+ {
331
+ "predicate_name": "administrative_units",
332
+ "term_label": "University of Notre Dame::College of Science::Institute for Theoretical Sciences",
333
+ "term_uri": null,
334
+ "default_presentation_sequence": 500,
335
+ "activated_on": "2015-07-22",
336
+ "deactivated_on": null
337
+ },
338
+ {
339
+ "predicate_name": "administrative_units",
340
+ "term_label": "University of Notre Dame::College of Science::Interdisciplinary Center for the Study of Biocomplexity",
341
+ "term_uri": null,
342
+ "default_presentation_sequence": 500,
343
+ "activated_on": "2015-07-22",
344
+ "deactivated_on": null
345
+ },
346
+ {
347
+ "predicate_name": "administrative_units",
348
+ "term_label": "University of Notre Dame::College of Science::ISNAP",
349
+ "term_uri": null,
350
+ "default_presentation_sequence": 500,
351
+ "activated_on": "2015-07-22",
352
+ "deactivated_on": null
353
+ },
354
+ {
355
+ "predicate_name": "administrative_units",
356
+ "term_label": "University of Notre Dame::College of Arts and Letters::John J. Reilly Center for Science, Technology and Values",
357
+ "term_uri": null,
358
+ "default_presentation_sequence": 500,
359
+ "activated_on": "2015-07-22",
360
+ "deactivated_on": null
361
+ },
362
+ {
363
+ "predicate_name": "administrative_units",
364
+ "term_label": "University of Notre Dame::College of Science::QuarkNet Center",
365
+ "term_uri": null,
366
+ "default_presentation_sequence": 500,
367
+ "activated_on": "2015-07-22",
368
+ "deactivated_on": null
369
+ },
370
+ {
371
+ "predicate_name": "administrative_units",
372
+ "term_label": "University of Notre Dame::College of Science::Ruth M. Hillebrand Center for Compassionate Care in Medicine",
373
+ "term_uri": null,
374
+ "default_presentation_sequence": 500,
375
+ "activated_on": "2015-07-22",
376
+ "deactivated_on": null
377
+ },
378
+ {
379
+ "predicate_name": "administrative_units",
380
+ "term_label": "University of Notre Dame::College of Arts and Letters",
381
+ "term_uri": null,
382
+ "default_presentation_sequence": 200,
383
+ "activated_on": "2015-07-22",
384
+ "deactivated_on": null
385
+ },
386
+ {
387
+ "predicate_name": "administrative_units",
388
+ "term_label": "University of Notre Dame::College of Arts and Letters::Africana Studies",
389
+ "term_uri": null,
390
+ "default_presentation_sequence": 300,
391
+ "activated_on": "2015-07-22",
392
+ "deactivated_on": null
393
+ },
394
+ {
395
+ "predicate_name": "administrative_units",
396
+ "term_label": "University of Notre Dame::College of Arts and Letters::American Studies",
397
+ "term_uri": null,
398
+ "default_presentation_sequence": 300,
399
+ "activated_on": "2015-07-22",
400
+ "deactivated_on": null
401
+ },
402
+ {
403
+ "predicate_name": "administrative_units",
404
+ "term_label": "University of Notre Dame::College of Arts and Letters::Classics",
405
+ "term_uri": null,
406
+ "default_presentation_sequence": 300,
407
+ "activated_on": "2015-07-22",
408
+ "deactivated_on": null
409
+ },
410
+ {
411
+ "predicate_name": "administrative_units",
412
+ "term_label": "University of Notre Dame::College of Arts and Letters::East Asian Languages and Cultures",
413
+ "term_uri": null,
414
+ "default_presentation_sequence": 300,
415
+ "activated_on": "2015-07-22",
416
+ "deactivated_on": null
417
+ },
418
+ {
419
+ "predicate_name": "administrative_units",
420
+ "term_label": "University of Notre Dame::College of Arts and Letters::English",
421
+ "term_uri": null,
422
+ "default_presentation_sequence": 300,
423
+ "activated_on": "2015-07-22",
424
+ "deactivated_on": null
425
+ },
426
+ {
427
+ "predicate_name": "administrative_units",
428
+ "term_label": "University of Notre Dame::College of Arts and Letters::German and Russian Languages and Literatures",
429
+ "term_uri": null,
430
+ "default_presentation_sequence": 300,
431
+ "activated_on": "2015-07-22",
432
+ "deactivated_on": null
433
+ },
434
+ {
435
+ "predicate_name": "administrative_units",
436
+ "term_label": "University of Notre Dame::College of Arts and Letters::History",
437
+ "term_uri": null,
438
+ "default_presentation_sequence": 300,
439
+ "activated_on": "2015-07-22",
440
+ "deactivated_on": null
441
+ },
442
+ {
443
+ "predicate_name": "administrative_units",
444
+ "term_label": "University of Notre Dame::College of Arts and Letters::Irish Language and Literature",
445
+ "term_uri": null,
446
+ "default_presentation_sequence": 300,
447
+ "activated_on": "2015-07-22",
448
+ "deactivated_on": null
449
+ },
450
+ {
451
+ "predicate_name": "administrative_units",
452
+ "term_label": "University of Notre Dame::College of Arts and Letters::Philosophy",
453
+ "term_uri": null,
454
+ "default_presentation_sequence": 300,
455
+ "activated_on": "2015-07-22",
456
+ "deactivated_on": null
457
+ },
458
+ {
459
+ "predicate_name": "administrative_units",
460
+ "term_label": "University of Notre Dame::College of Arts and Letters::Program of Liberal Studies",
461
+ "term_uri": null,
462
+ "default_presentation_sequence": 300,
463
+ "activated_on": "2015-07-22",
464
+ "deactivated_on": null
465
+ },
466
+ {
467
+ "predicate_name": "administrative_units",
468
+ "term_label": "University of Notre Dame::College of Arts and Letters::Romance Languages and Literatures",
469
+ "term_uri": null,
470
+ "default_presentation_sequence": 300,
471
+ "activated_on": "2015-07-22",
472
+ "deactivated_on": null
473
+ },
474
+ {
475
+ "predicate_name": "administrative_units",
476
+ "term_label": "University of Notre Dame::College of Arts and Letters::Theology",
477
+ "term_uri": null,
478
+ "default_presentation_sequence": 300,
479
+ "activated_on": "2015-07-22",
480
+ "deactivated_on": null
481
+ },
482
+ {
483
+ "predicate_name": "administrative_units",
484
+ "term_label": "University of Notre Dame::College of Arts and Letters::Art, Art History & Design",
485
+ "term_uri": null,
486
+ "default_presentation_sequence": 300,
487
+ "activated_on": "2015-07-22",
488
+ "deactivated_on": null
489
+ },
490
+ {
491
+ "predicate_name": "administrative_units",
492
+ "term_label": "University of Notre Dame::College of Arts and Letters::Film, Television, and Theatre",
493
+ "term_uri": null,
494
+ "default_presentation_sequence": 300,
495
+ "activated_on": "2015-07-22",
496
+ "deactivated_on": null
497
+ },
498
+ {
499
+ "predicate_name": "administrative_units",
500
+ "term_label": "University of Notre Dame::College of Arts and Letters::Music",
501
+ "term_uri": null,
502
+ "default_presentation_sequence": 300,
503
+ "activated_on": "2015-07-22",
504
+ "deactivated_on": null
505
+ },
506
+ {
507
+ "predicate_name": "administrative_units",
508
+ "term_label": "University of Notre Dame::College of Arts and Letters::Anthropology",
509
+ "term_uri": null,
510
+ "default_presentation_sequence": 300,
511
+ "activated_on": "2015-07-22",
512
+ "deactivated_on": null
513
+ },
514
+ {
515
+ "predicate_name": "administrative_units",
516
+ "term_label": "University of Notre Dame::College of Arts and Letters::Economics",
517
+ "term_uri": null,
518
+ "default_presentation_sequence": 300,
519
+ "activated_on": "2015-07-22",
520
+ "deactivated_on": null
521
+ },
522
+ {
523
+ "predicate_name": "administrative_units",
524
+ "term_label": "University of Notre Dame::College of Arts and Letters::Political Science",
525
+ "term_uri": null,
526
+ "default_presentation_sequence": 300,
527
+ "activated_on": "2015-07-22",
528
+ "deactivated_on": null
529
+ },
530
+ {
531
+ "predicate_name": "administrative_units",
532
+ "term_label": "University of Notre Dame::College of Arts and Letters::Psychology",
533
+ "term_uri": null,
534
+ "default_presentation_sequence": 300,
535
+ "activated_on": "2015-07-22",
536
+ "deactivated_on": null
537
+ },
538
+ {
539
+ "predicate_name": "administrative_units",
540
+ "term_label": "University of Notre Dame::College of Arts and Letters::Sociology",
541
+ "term_uri": null,
542
+ "default_presentation_sequence": 300,
543
+ "activated_on": "2015-07-22",
544
+ "deactivated_on": null
545
+ },
546
+ {
547
+ "predicate_name": "administrative_units",
548
+ "term_label": "University of Notre Dame::College of Arts and Letters::Institute for Latino Studies",
549
+ "term_uri": null,
550
+ "default_presentation_sequence": 400,
551
+ "activated_on": "2015-07-22",
552
+ "deactivated_on": null
553
+ },
554
+ {
555
+ "predicate_name": "administrative_units",
556
+ "term_label": "University of Notre Dame::College of Arts and Letters::Liu Institute for Asia and Asian Studies",
557
+ "term_uri": null,
558
+ "default_presentation_sequence": 400,
559
+ "activated_on": "2015-07-22",
560
+ "deactivated_on": null
561
+ },
562
+ {
563
+ "predicate_name": "administrative_units",
564
+ "term_label": "University of Notre Dame::College of Arts and Letters::Center for Ethics and Culture",
565
+ "term_uri": null,
566
+ "default_presentation_sequence": 500,
567
+ "activated_on": "2015-07-22",
568
+ "deactivated_on": null
569
+ },
570
+ {
571
+ "predicate_name": "administrative_units",
572
+ "term_label": "University of Notre Dame::College of Arts and Letters::Center for Philosophy of Religion",
573
+ "term_uri": null,
574
+ "default_presentation_sequence": 500,
575
+ "activated_on": "2015-07-22",
576
+ "deactivated_on": null
577
+ },
578
+ {
579
+ "predicate_name": "administrative_units",
580
+ "term_label": "University of Notre Dame::College of Arts and Letters::Center for Research on Educational Opportunity",
581
+ "term_uri": null,
582
+ "default_presentation_sequence": 500,
583
+ "activated_on": "2015-07-22",
584
+ "deactivated_on": null
585
+ },
586
+ {
587
+ "predicate_name": "administrative_units",
588
+ "term_label": "University of Notre Dame::College of Arts and Letters::Center for the Study of Religion and Society",
589
+ "term_uri": null,
590
+ "default_presentation_sequence": 500,
591
+ "activated_on": "2015-07-22",
592
+ "deactivated_on": null
593
+ },
594
+ {
595
+ "predicate_name": "administrative_units",
596
+ "term_label": "University of Notre Dame::College of Arts and Letters::Center for the Study of Social Movements",
597
+ "term_uri": null,
598
+ "default_presentation_sequence": 500,
599
+ "activated_on": "2015-07-22",
600
+ "deactivated_on": null
601
+ },
602
+ {
603
+ "predicate_name": "administrative_units",
604
+ "term_label": "University of Notre Dame::College of Arts and Letters::Cushwa Center for the Study of American Catholicism",
605
+ "term_uri": null,
606
+ "default_presentation_sequence": 500,
607
+ "activated_on": "2015-07-22",
608
+ "deactivated_on": null
609
+ },
610
+ {
611
+ "predicate_name": "administrative_units",
612
+ "term_label": "University of Notre Dame::College of Arts and Letters::Rooney Center for the Study of American Democracy",
613
+ "term_uri": null,
614
+ "default_presentation_sequence": 500,
615
+ "activated_on": "2015-07-22",
616
+ "deactivated_on": null
617
+ },
618
+ {
619
+ "predicate_name": "administrative_units",
620
+ "term_label": "University of Notre Dame::College of Arts and Letters::William J. Shaw Center for Children and Families",
621
+ "term_uri": null,
622
+ "default_presentation_sequence": 500,
623
+ "activated_on": "2015-07-22",
624
+ "deactivated_on": null
625
+ },
626
+ {
627
+ "predicate_name": "administrative_units",
628
+ "term_label": "University of Notre Dame::Center for Social Concerns",
629
+ "term_uri": null,
630
+ "default_presentation_sequence": 400,
631
+ "activated_on": "2015-07-22",
632
+ "deactivated_on": null
633
+ },
634
+ {
635
+ "predicate_name": "administrative_units",
636
+ "term_label": "University of Notre Dame::Eck Institute for Global Health",
637
+ "term_uri": null,
638
+ "default_presentation_sequence": 400,
639
+ "activated_on": "2015-07-22",
640
+ "deactivated_on": null
641
+ },
642
+ {
643
+ "predicate_name": "administrative_units",
644
+ "term_label": "University of Notre Dame::Institute for Church Life",
645
+ "term_uri": null,
646
+ "default_presentation_sequence": 400,
647
+ "activated_on": "2015-07-22",
648
+ "deactivated_on": null
649
+ },
650
+ {
651
+ "predicate_name": "administrative_units",
652
+ "term_label": "University of Notre Dame::Institute for Educational Initiatives",
653
+ "term_uri": null,
654
+ "default_presentation_sequence": 400,
655
+ "activated_on": "2015-07-22",
656
+ "deactivated_on": null
657
+ },
658
+ {
659
+ "predicate_name": "administrative_units",
660
+ "term_label": "University of Notre Dame::Institute for Educational Initiatives::Center for STEM Education",
661
+ "term_uri": null,
662
+ "default_presentation_sequence": 500,
663
+ "activated_on": "2015-07-22",
664
+ "deactivated_on": null
665
+ },
666
+ {
667
+ "predicate_name": "administrative_units",
668
+ "term_label": "University of Notre Dame::JINA-CEE",
669
+ "term_uri": null,
670
+ "default_presentation_sequence": 400,
671
+ "activated_on": "2015-07-22",
672
+ "deactivated_on": null
673
+ },
674
+ {
675
+ "predicate_name": "administrative_units",
676
+ "term_label": "University of Notre Dame::Kellogg Institute for International Studies",
677
+ "term_uri": null,
678
+ "default_presentation_sequence": 400,
679
+ "activated_on": "2015-07-22",
680
+ "deactivated_on": null
681
+ },
682
+ {
683
+ "predicate_name": "administrative_units",
684
+ "term_label": "University of Notre Dame::Keough-Naughton Institute for Irish Studies",
685
+ "term_uri": null,
686
+ "default_presentation_sequence": 400,
687
+ "activated_on": "2015-07-22",
688
+ "deactivated_on": null
689
+ },
690
+ {
691
+ "predicate_name": "administrative_units",
692
+ "term_label": "University of Notre Dame::Kroc Institute for International Peace Studies",
693
+ "term_uri": null,
694
+ "default_presentation_sequence": 400,
695
+ "activated_on": "2015-07-22",
696
+ "deactivated_on": null
697
+ },
698
+ {
699
+ "predicate_name": "administrative_units",
700
+ "term_label": "University of Notre Dame::Medieval Institute",
701
+ "term_uri": null,
702
+ "default_presentation_sequence": 400,
703
+ "activated_on": "2015-07-22",
704
+ "deactivated_on": null
705
+ },
706
+ {
707
+ "predicate_name": "administrative_units",
708
+ "term_label": "University of Notre Dame::Nanovic Institute for European Studies",
709
+ "term_uri": null,
710
+ "default_presentation_sequence": 400,
711
+ "activated_on": "2015-07-22",
712
+ "deactivated_on": null
713
+ },
714
+ {
715
+ "predicate_name": "administrative_units",
716
+ "term_label": "University of Notre Dame::Notre Dame Radiation Laboratory",
717
+ "term_uri": null,
718
+ "default_presentation_sequence": 400,
719
+ "activated_on": "2015-07-22",
720
+ "deactivated_on": null
721
+ },
722
+ {
723
+ "predicate_name": "administrative_units",
724
+ "term_label": "University of Notre Dame::Tantur Ecumenical Institute",
725
+ "term_uri": null,
726
+ "default_presentation_sequence": 400,
727
+ "activated_on": "2015-07-22",
728
+ "deactivated_on": null
729
+ },
730
+ {
731
+ "predicate_name": "administrative_units",
732
+ "term_label": "University of Notre Dame::W. M. Keck Center For Transgene Research",
733
+ "term_uri": null,
734
+ "default_presentation_sequence": 400,
735
+ "activated_on": "2015-07-22",
736
+ "deactivated_on": null
737
+ },
738
+ {
739
+ "predicate_name": "administrative_units",
740
+ "term_label": "University of Notre Dame::Center for Civil and Human Rights",
741
+ "term_uri": null,
742
+ "default_presentation_sequence": 500,
743
+ "activated_on": "2015-07-22",
744
+ "deactivated_on": null
745
+ },
746
+ {
747
+ "predicate_name": "administrative_units",
748
+ "term_label": "University of Notre Dame::Center for Rare and Neglected Diseases",
749
+ "term_uri": null,
750
+ "default_presentation_sequence": 500,
751
+ "activated_on": "2015-07-22",
752
+ "deactivated_on": null
753
+ },
754
+ {
755
+ "predicate_name": "administrative_units",
756
+ "term_label": "University of Notre Dame::Center for Theology, Science, and Human Flourishing",
757
+ "term_uri": null,
758
+ "default_presentation_sequence": 500,
759
+ "activated_on": "2015-07-22",
760
+ "deactivated_on": null
761
+ },
762
+ {
763
+ "predicate_name": "administrative_units",
764
+ "term_label": "University of Notre Dame::NDEnergy",
765
+ "term_uri": null,
766
+ "default_presentation_sequence": 500,
767
+ "activated_on": "2015-07-22",
768
+ "deactivated_on": null
769
+ },
770
+ {
771
+ "predicate_name": "administrative_units",
772
+ "term_label": "University of Notre Dame::Interdisciplinary Center for Network Science and Applications",
773
+ "term_uri": null,
774
+ "default_presentation_sequence": 500,
775
+ "activated_on": "2015-07-22",
776
+ "deactivated_on": null
777
+ }
778
+ ]
@@ -0,0 +1,50 @@
1
+ [
2
+ {
3
+ "predicate_name": "colleges",
4
+ "term_label": "School of Architecture",
5
+ "term_uri": null,
6
+ "default_presentation_sequence": 60,
7
+ "activated_on": "2015-07-22",
8
+ "deactivated_on": null
9
+ },
10
+ {
11
+ "predicate_name": "colleges",
12
+ "term_label": "Mendoza College of Business",
13
+ "term_uri": null,
14
+ "default_presentation_sequence": 50,
15
+ "activated_on": "2015-07-22",
16
+ "deactivated_on": null
17
+ },
18
+ {
19
+ "predicate_name": "colleges",
20
+ "term_label": "College of Engineering",
21
+ "term_uri": null,
22
+ "default_presentation_sequence": 20,
23
+ "activated_on": "2015-07-22",
24
+ "deactivated_on": null
25
+ },
26
+ {
27
+ "predicate_name": "colleges",
28
+ "term_label": "College of Science",
29
+ "term_uri": null,
30
+ "default_presentation_sequence": 30,
31
+ "activated_on": "2015-07-22",
32
+ "deactivated_on": null
33
+ },
34
+ {
35
+ "predicate_name": "colleges",
36
+ "term_label": "College of Arts and Letters",
37
+ "term_uri": null,
38
+ "default_presentation_sequence": 10,
39
+ "activated_on": "2015-07-22",
40
+ "deactivated_on": null
41
+ },
42
+ {
43
+ "predicate_name": "colleges",
44
+ "term_label": "First Year Studies",
45
+ "term_uri": null,
46
+ "default_presentation_sequence": 40,
47
+ "activated_on": "2015-12-14",
48
+ "deactivated_on": null
49
+ }
50
+ ]
data/lib/locabulary.rb CHANGED
@@ -3,7 +3,7 @@ require 'json'
3
3
 
4
4
  # @since 0.1.0
5
5
  module Locabulary
6
- VERSION='0.1.4'.freeze
6
+ VERSION='0.1.5'.freeze
7
7
  DATA_DIRECTORY = File.expand_path("../../data/", __FILE__).freeze
8
8
 
9
9
  class RuntimeError < ::RuntimeError
@@ -85,6 +85,12 @@ module Locabulary
85
85
  active_items_for(predicate_name: predicate_name).map(&:term_label)
86
86
  end
87
87
 
88
+
89
+ # @api public
90
+ def active_nested_labels_for(options = {})
91
+ format_active_items_for(active_labels_for(options))
92
+ end
93
+
88
94
  # @api private
89
95
  def filename_for_predicate_name(options = {})
90
96
  predicate_name = options.fetch(:predicate_name)
@@ -102,4 +108,28 @@ module Locabulary
102
108
  def reset_active_cache!
103
109
  @active_cache = nil
104
110
  end
111
+
112
+ # @api private
113
+ def format_active_items_for(items)
114
+ root = {}
115
+ items.each do |item|
116
+ key, value = build_key_and_value(item)
117
+ root[key] ||= []
118
+ root[key] << value
119
+ end
120
+ root
121
+ end
122
+
123
+ # @api private
124
+ def build_key_and_value(text)
125
+ text_array = text.split(/(::)/)
126
+ return text, text if text_array.size == 1
127
+ return text, text_array.last if text_array.size == 3
128
+ key = ""
129
+ (0..(text_array.size-3)).each do |index|
130
+ key << text_array[index]
131
+ end
132
+ value = text_array.last
133
+ return key, value
134
+ end
105
135
  end
data/locabulary.gemspec CHANGED
@@ -23,4 +23,6 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "minitest"
24
24
  spec.add_development_dependency "rake", "~> 10.0"
25
25
  spec.add_dependency "json", "~> 1.8"
26
+ spec.add_development_dependency 'google_drive'
27
+ spec.add_development_dependency 'highline'
26
28
  end
@@ -0,0 +1,115 @@
1
+ require "google/api_client"
2
+ require "google_drive"
3
+ require 'highline/import'
4
+ require 'json'
5
+
6
+ class JsonCreator
7
+
8
+ def initialize(document_key, vocabulary, data_fetcher = default_data_fetcher)
9
+ @document_key = document_key
10
+ @vocabulary = vocabulary
11
+ @output_filepath = "data/#{vocabulary}.json"
12
+ @data_fetcher = data_fetcher
13
+ end
14
+
15
+ attr_reader :document_key, :vocabulary, :data_fetcher, :spreadsheet_data, :json_data
16
+ attr_accessor :output_filepath
17
+ ORDER = {
18
+ "University" => 100,
19
+ "College" => 200,
20
+ "Center" => 500,
21
+ "Department" => 300,
22
+ "Institute" => 400
23
+ }
24
+
25
+ def create_or_update
26
+ @spreadsheet_data = data_fetcher.call(document_key)
27
+ convert_to_json(get_required_data_from_spreadsheet)
28
+ end
29
+
30
+ def write_to_file
31
+ File.open(output_filepath, "w") do |f|
32
+ f.puts json_data
33
+ end
34
+ end
35
+
36
+ private
37
+
38
+ def default_data_fetcher
39
+ ->(document_key) { GoogleSpreadsheet.new(document_key).read_spreadsheet }
40
+ end
41
+
42
+ class GoogleSpreadsheet
43
+ attr_reader :access_token, :document_key
44
+ FILE_PATH = __FILE__
45
+
46
+ def initialize(document_key)
47
+ @document_key = document_key
48
+ configure_oauth!
49
+ end
50
+
51
+ def configure_oauth!
52
+ client = Google::APIClient.new
53
+ auth = client.authorization
54
+ auth.client_id = client_secrets.fetch('client_id')
55
+ auth.client_secret = client_secrets.fetch('client_secret')
56
+ auth.scope = ["https://www.googleapis.com/auth/drive.readonly"]
57
+ auth.redirect_uri = "urn:ietf:wg:oauth:2.0:oob"
58
+ puts "\n Open the following URL, login with your credentials and get the authorization code \n\n #{auth.authorization_uri}\n\n"
59
+ auth.code = ask('Authorization Code: ')
60
+ auth.fetch_access_token!
61
+ @access_token = auth.access_token
62
+ end
63
+
64
+ def read_spreadsheet
65
+ session = GoogleDrive.login_with_oauth(access_token)
66
+ ws = session.spreadsheet_by_key(document_key).worksheets[0]
67
+ spreadsheet_data = []
68
+ (1..ws.num_rows).each do |row|
69
+ row_data = []
70
+ (1..ws.num_cols).each do |col|
71
+ row_data << ws[row, col]
72
+ end
73
+ spreadsheet_data << row_data
74
+ end
75
+ spreadsheet_data
76
+ end
77
+
78
+ def client_secrets
79
+ return @secrets if @secrets
80
+ secrets_path = File.join(File.dirname(FILE_PATH), '../config/client_secrets.example.yml')
81
+ secrets_path = File.join(File.dirname(FILE_PATH), '../config/client_secrets.yml') if File.exist? File.join(File.dirname(FILE_PATH), '../config/client_secrets.yml')
82
+ @secrets = YAML.load(File.open(File.join(secrets_path)))
83
+ end
84
+ end
85
+
86
+ def get_required_data_from_spreadsheet
87
+ final = {}
88
+ line = []
89
+ spreadsheet_data.shift
90
+ spreadsheet_data.each do |row|
91
+ line << row[0]
92
+ line << row[1] if row[1] && !row[1].empty?
93
+ line << row[2] if row[2] && !row[2].empty?
94
+ final[ line.join('::') ] = row[3]
95
+ line = []
96
+ end
97
+ final
98
+ end
99
+
100
+ def convert_to_json(data)
101
+ json_array = []
102
+ data.each do |key, value|
103
+ data_map = {
104
+ "predicate_name" => vocabulary,
105
+ "term_label" => key,
106
+ "term_uri" => nil,
107
+ "default_presentation_sequence" => ORDER[value],
108
+ "activated_on" => "2015-07-22",
109
+ "deactivated_on" => nil
110
+ }
111
+ json_array << data_map
112
+ end
113
+ @json_data = JSON.pretty_generate(json_array)
114
+ end
115
+ end
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby -U
2
+
3
+ require_relative 'json_creator'
4
+
5
+ puts "Updating Administrative Units"
6
+ json_creator = JsonCreator.new "1oBW5FCTtYXsUi8roBiMRBLFY3dXamhTqy-kiG2rqu5Q", "administrative_units"
7
+ json_creator.create_or_update
8
+ json_creator.write_to_file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locabulary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Friesen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-10 00:00:00.000000000 Z
11
+ date: 2015-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -66,6 +66,34 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.8'
69
+ - !ruby/object:Gem::Dependency
70
+ name: google_drive
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: highline
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'
69
97
  description: An extraction of limited localized vocabulary for Sipity and CurateND.
70
98
  email:
71
99
  - jeremy.n.friesen@gmail.com
@@ -80,10 +108,13 @@ files:
80
108
  - LICENSE
81
109
  - README.md
82
110
  - Rakefile
111
+ - config/client_secrets.example.yml
112
+ - data/administrative_units.json
83
113
  - data/affiliation.json
84
114
  - data/award_category.json
85
115
  - data/citation_style.json
86
116
  - data/collaborator.json
117
+ - data/colleges.json
87
118
  - data/copyright.json
88
119
  - data/degree.json
89
120
  - data/organization.json
@@ -93,6 +124,8 @@ files:
93
124
  - data/work_publication_strategy.json
94
125
  - lib/locabulary.rb
95
126
  - locabulary.gemspec
127
+ - script/json_creator.rb
128
+ - script/update_data_files.sh
96
129
  homepage: https://github.com/ndlib/locabulary
97
130
  licenses:
98
131
  - APACHE2