usd 1.3.2 → 1.3.3

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/bin/rusdc +4 -14
  3. data/change_log.md +8 -0
  4. data/usd.gemspec +2 -2
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f3f388a3efedae368a6a99c7169029d78f92e11179ca97ad8edb196a125be5d
4
- data.tar.gz: ed31ec8a487df5132d06fd71cb77e301017b5292fcd6dde662359d169a0a27cb
3
+ metadata.gz: 8341a6edac193e671ccde850088a693d452bd571e7685bdba3ed59b6a10dc9c7
4
+ data.tar.gz: f9688b4546873b2b0d1ae35555080d0c965a2897e69823dc633131df4f6ecd63
5
5
  SHA512:
6
- metadata.gz: 3d0d07c311dcc0b1b20c41ea818a08d3e910ae47e6909c0df1a00e4143ab4c190fdaaa9cf3da522bdbf104e54cf2a6404504261edb4d68e80084ca85cd90eb4d
7
- data.tar.gz: ad097417d07cec1dc9c097dea1785f91fb4b3ff737abb03840e05d4e779b31a2176ed47f5e53e841ce72c261da6dc8fb15cf831fd7887c95f21b9c1a103bff34
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
- 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#{fileContent}\r\n\r\n \r\n--*****MessageBoundary*****--\r\n"
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
@@ -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:
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'usd'
3
- spec.version = '1.3.2'
4
- spec.date = '2020-09-10'
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.2
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-10 00:00:00.000000000 Z
11
+ date: 2020-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor