usd 0.3 → 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/rusdc +7 -4
- data/change_log.md +4 -0
- data/usd.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3d2a11346d32e1cd5810370fb50b4dbb4d4da9f36375a27cb26cf39325142b9
|
4
|
+
data.tar.gz: 00c0893c1b33408e16619aeaaeae67f6396da165d30aefc85bd6b645cbf11482
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4da79eee6164891fe192dd639d83a28d89593b81f1c816942964991587308299bd1d28a6ced8755c203f8750354ba192615babba1861374bad25b47d0e3bf2b5
|
7
|
+
data.tar.gz: 193d05f6931a377fe1cd8fd3d5cd3a8cb65296719b58ab2717a7711599c005700bd83d5116d434be68232f90d85b13a84931ef087394fb4e723f4802e0ee6a91
|
data/bin/rusdc
CHANGED
@@ -127,6 +127,7 @@ class Rusdc < Thor
|
|
127
127
|
case options[:format]
|
128
128
|
when "json"
|
129
129
|
puts mlr
|
130
|
+
e
|
130
131
|
exit exitcode
|
131
132
|
when "yaml"
|
132
133
|
# keys not sorted, maybe a todo
|
@@ -383,8 +384,8 @@ class Rusdc < Thor
|
|
383
384
|
puts loadcon.update({:type => "json", :data => json})
|
384
385
|
end
|
385
386
|
|
386
|
-
desc "update_ref_attr <obj> <common_name> <key> <value>", "updates a referenced attribute of one object."
|
387
|
-
def update_ref_attr(obj, cn, k, v)
|
387
|
+
desc "update_ref_attr <obj> <common_name> <key> <value> [ref_obj=nr]", "updates a referenced attribute of one object."
|
388
|
+
def update_ref_attr(obj, cn, k, v, ref_obj = "nr")
|
388
389
|
template = ERB.new <<-EOF
|
389
390
|
{
|
390
391
|
"<%= obj %>": {
|
@@ -403,8 +404,10 @@ class Rusdc < Thor
|
|
403
404
|
})
|
404
405
|
data = loadcon.update({:type => "json", :data => json})
|
405
406
|
if data.class == RestClient::BadRequest
|
406
|
-
puts "direkte Ausführung bekommt einen BadRequest, versuche Update über IDs. #{Usd::CN[
|
407
|
-
|
407
|
+
puts "direkte Ausführung bekommt einen BadRequest, versuche Update über IDs. #{Usd::CN[obj]}"
|
408
|
+
cn_id = loadcon.search(obj,{'fields' => "@id","wc" => "#{Usd::CN[obj]} = '#{cn}' and delete_flag = 0"})[0]["@id"]
|
409
|
+
value_id = loadcon.search(ref_obj,{'fields' => "@id","wc" => "#{Usd::CN[obj]} = '#{v}' and delete_flag = 0"})[0]["@id"]
|
410
|
+
invoke "update_ref_attr_by_id", [obj, cn_id, k, value_id]
|
408
411
|
else
|
409
412
|
puts data
|
410
413
|
end
|
data/change_log.md
CHANGED
data/usd.gemspec
CHANGED