exlibris-aleph 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +8 -0
- data/lib/exlibris/aleph/tab_helper.rb +17 -0
- data/lib/exlibris/aleph/version.rb +1 -1
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -44,6 +44,14 @@ Exlibris::Aleph::TabHelper provides a way to access the various tab settings for
|
|
44
44
|
helper.collection_text({:adm_library_code => "ADM50", :sub_library_code => "SBLIB", :collection_code => "MAIN"}) # Returns the collection display text for the give parameters
|
45
45
|
helper.item_web_text({:adm_library_code => "ADM50", :item_process_status => "Item Process Status"}) # Returns the web text for the given parameters
|
46
46
|
helper.item_web_text({:adm_library_code => "ADM50", :sub_library_code => "SBLIB", :item_process_status_code => "DP"}) # Returns the web text for the given parameters
|
47
|
+
|
48
|
+
=== Configure irrelevant sub libraries in TabHelper
|
49
|
+
To configure the gem to ignore sub libraries pulled from Aleph but not relevant to working with permissions call the following setter with an array of sub library Aleph codes.
|
50
|
+
|
51
|
+
# Place this in an initializer.
|
52
|
+
Exlibris::Aleph::TabHelper.set_irrelevant_sub_libraries(["IRRLIB1", "IRRLIB1"], replace = false)
|
53
|
+
|
54
|
+
If the boolean variable _replace_ is true the array passed in will replace the defaults. If it is false the array passed in will merge with the results. The default value is true.
|
47
55
|
|
48
56
|
== Exlibris::Aleph::BorAuth
|
49
57
|
Exlibris::Aleph::BorAuth provides access to the BorAuth Aleph XService.
|
@@ -32,6 +32,15 @@ module Exlibris
|
|
32
32
|
@@tab_path = nil
|
33
33
|
@@yml_path = nil
|
34
34
|
@@log_path = nil
|
35
|
+
@@irrelevant_sub_libraries = ["USR00", "HOME", "BOX", "ILLDT", "NYU51", "ALEPH", "USM50",
|
36
|
+
"MED", "HYL", "HIL", "LAM", "LAW", "LIT", "MUS", "WID", "EXL", "CIRC", "HILR", "HIL01",
|
37
|
+
"HYL01", "HYL02", "HYL03", "HYL04", "HYL05", "HYL06", "LAM01", "LAM02", "LAM03", "LAW01",
|
38
|
+
"LAW02", "LAW03", "LIT01", "LIT02", "MED01", "MED02", "MUS01", "MUS02", "WID01", "WID02",
|
39
|
+
"WID03", "WID04", "WID05", "U60WD", "U60HL", "U60LA", "U70WD", "CBAB", "BCU", "MBAZU", "USM51",
|
40
|
+
"ELEC5", "GDOC5", "EDUC5", "LINC5", "RRLIN", "OU511", "OR512", "OR513", "OR514", "OR515", "U61ED",
|
41
|
+
"U61EL", "U61LN", "S61GD", "USM53", "ELEC7", "GDOC7", "EDUC7", "LINC7", "USM54", "ELEC4", "USM55",
|
42
|
+
"CUN50", "CLEC5", "CDOC5", "CDUC5", "CINC5", "UNI50", "NARCV", "NELEC", "NRLEC", "NGDOC", "NRDOC",
|
43
|
+
"NEDUC", "NHLTH", "NLINC", "NLAW", "NMUSI", "NSCI", "NUPTN"]
|
35
44
|
|
36
45
|
# Initialize TabHelper based on path to tabs, path to store yml configs,
|
37
46
|
# path for log file, and the ADMs for the Aleph implementation
|
@@ -54,6 +63,12 @@ module Exlibris
|
|
54
63
|
end
|
55
64
|
end
|
56
65
|
|
66
|
+
# Sets class variable of irrelevant sub libraries to be ignored when building sub_libraries YAML
|
67
|
+
def self.set_irrelevant_sub_libraries(irrelevant_sub_libraries, replace = true)
|
68
|
+
@@irrelevant_sub_libraries |= irrelevant_sub_libraries if replace
|
69
|
+
@@irrelevant_sub_libraries = irrelevant_sub_libraries unless replace
|
70
|
+
end
|
71
|
+
|
57
72
|
# Refreshes the yml files that are used to parse the tables.
|
58
73
|
def self.refresh_yml
|
59
74
|
@@alephe_tabs.each do |key, klass|
|
@@ -269,6 +284,8 @@ module Exlibris
|
|
269
284
|
instance_variable_set("@#{key}".to_sym, tab)
|
270
285
|
end
|
271
286
|
end
|
287
|
+
# Delete irrelevant sub libraries from @sub_library
|
288
|
+
@sub_libraries.delete_if {|key,value| @@irrelevant_sub_libraries.include? key }
|
272
289
|
@updated_at = Time.now()
|
273
290
|
end
|
274
291
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exlibris-aleph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|