usd 1.3.2 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/rusdc +4 -14
- data/change_log.md +8 -0
- data/usd.gemspec +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8341a6edac193e671ccde850088a693d452bd571e7685bdba3ed59b6a10dc9c7
|
4
|
+
data.tar.gz: f9688b4546873b2b0d1ae35555080d0c965a2897e69823dc633131df4f6ecd63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab1cede636c31e94a3b5d4834c894db2d655638c5582e737e00c372617620dce66dc11839ff5d9ce22da4c378b5a91b027591a68d59ef41e0898fe1d1a6961ef
|
7
|
+
data.tar.gz: ea878deaa14d2ed86591b67b54851584055e11e80b46bf104572f4784b90f16616e154ef779da4d10fdf339cab5550f53a8f48e0165a75396bc128a2097ae807
|
data/bin/rusdc
CHANGED
@@ -575,26 +575,16 @@ END:VCARD
|
|
575
575
|
filename = File.basename(file)
|
576
576
|
uri = "/caisd-rest/attmnt?repositoryId=1002&serverName=#{server}&mimeType=Text&description=#{filename}"
|
577
577
|
url = URI("#{baseurl}#{uri}")
|
578
|
-
tempfile = Tempfile.new('base64_encoding')
|
579
|
-
temp_path=tempfile.path
|
580
|
-
tempfile.write("")
|
581
|
-
tempfile.close
|
582
|
-
cmd = %(base64 "#{file}" > #{temp_path})
|
583
|
-
`#{cmd}`
|
584
|
-
cmd = %(unix2dos #{tempfile.path})
|
585
|
-
`#{cmd}`
|
586
|
-
fileObj = File.open(temp_path, "rb")
|
587
|
-
fileContent = fileObj.read
|
588
|
-
fileObj.close
|
589
|
-
tempfile.unlink
|
590
578
|
http = Net::HTTP.new(url.host, url.port);
|
591
579
|
request = Net::HTTP::Post.new(url)
|
592
580
|
request["X-AccessKey"] = ak
|
593
581
|
request["Content-Type"] = "multipart/form-data; BOUNDARY=*****MessageBoundary*****"
|
594
582
|
request["accept"] = "application/json"
|
595
583
|
request["Cache-Control"] = "no-cache"
|
596
|
-
|
597
|
-
|
584
|
+
fileObj = File.open(file, "rb")
|
585
|
+
fileContent = fileObj.read
|
586
|
+
fileObj.close
|
587
|
+
request.body = "--*****MessageBoundary*****\r\n \r\nContent-Disposition: form-data; name=\"payload\" \r\nContent-Type: application/xml; CHARACTERSET=UTF-8 \r\n\r\n \r\n<attmnt> \r\n<repository id=\"1002\"></repository> \r\n<orig_file_name>#{filename}</orig_file_name> \r\n<attmnt_name>#{filename}</attmnt_name> \r\n<description>Uploaded with rusdc from rubygem usd</description> \r\n</attmnt> \r\n\r\n \r\n--*****MessageBoundary*****\r\n \r\nContent-Disposition: form-data; name=\"#{filename}\"; filename=\"#{filename}\" \r\nContent-Type: application/octet-stream \r\nContent-Transfer-Encoding: base64\r\n\r\n#{Base64.encode64(fileContent)}\r\n\r\n \r\n--*****MessageBoundary*****--\r\n"
|
598
588
|
response = http.request(request)
|
599
589
|
response.read_body
|
600
590
|
end
|
data/change_log.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# rusdc changelog
|
2
2
|
|
3
|
+
## 1.3.3
|
4
|
+
|
5
|
+
- private `Usd` Class funktion changed. Instead using `base64` and `unix2dos` binaries, we use Base64-Ruby-Class now. It is already required by usd.
|
6
|
+
|
7
|
+
## 1.3.2
|
8
|
+
|
9
|
+
- fixed error in Usd.search. which comes with 1.3.1 .
|
10
|
+
|
3
11
|
## 1.3.1
|
4
12
|
|
5
13
|
- new functions:
|
data/usd.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'usd'
|
3
|
-
spec.version = '1.3.
|
4
|
-
spec.date = '2020-09-
|
3
|
+
spec.version = '1.3.3'
|
4
|
+
spec.date = '2020-09-11'
|
5
5
|
spec.summary = "SDM REST-API-Calls"
|
6
6
|
spec.description = "a Ruby class and a commandlinetool for SDM REST-API-Calls"
|
7
7
|
spec.authors = ["Oliver Gaida"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: usd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oliver Gaida
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|