evergreen_holdings 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/evergreen_holdings.rb +10 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b06100edeee2a0a2ee6bc91b90295a015ef1a73a
|
4
|
+
data.tar.gz: 3fe988a6af5545933d9e16989e4bdf3a35f8ec42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e14954516997254f54fe4c9c833ffca93003ea02691da279c88290a98cb0c4589faf7ac4c6aa3b377f90ef7106fe678b8e522c37e616bfdc5f54f54e71e47426
|
7
|
+
data.tar.gz: c3d372ae1d76b776dc792a0a7d9b0da2553d2fa24235346bae3106c0ba3af7e789492d330dc073e9717f0f4b5cf0e98a1448d64889b80d1a861d9ec08e69646b
|
data/lib/evergreen_holdings.rb
CHANGED
@@ -25,7 +25,16 @@ module EvergreenHoldings
|
|
25
25
|
# If you just want holdings at a specific org_unit: `my_connection.get_holdings 23405, org_unit: 5`
|
26
26
|
def get_holdings tcn, options = {}
|
27
27
|
if options.key?(:org_unit)
|
28
|
-
|
28
|
+
if options[:descendants]
|
29
|
+
params = "format=json&input_format=json&service=open-ils.cat&method=open-ils.cat.asset.copy_tree.retrieve¶m=auth_token_not_needed_for_this_call¶m=#{tcn}"
|
30
|
+
if @org_units[options[:org_unit]][:descendants]
|
31
|
+
@org_units[options[:org_unit]][:descendants].each do |ou|
|
32
|
+
params << + "¶m=#{ou}"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
else
|
36
|
+
params = "format=json&input_format=json&service=open-ils.cat&method=open-ils.cat.asset.copy_tree.retrieve¶m=auth_token_not_needed_for_this_call¶m=#{tcn}¶m=#{options[:org_unit]}"
|
37
|
+
end
|
29
38
|
else
|
30
39
|
params = "format=json&input_format=json&service=open-ils.cat&method=open-ils.cat.asset.copy_tree.global.retrieve¶m=auth_token_not_needed_for_this_call¶m=#{tcn}"
|
31
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evergreen_holdings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jane Sandberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|