usd 1.3.5 → 1.3.6
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.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/change_log.md +4 -0
- data/lib/usd.rb +3 -2
- 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: 2f200b7489e39e8790b98cd217f685141c977eea38b009ff4e7c086aa475868a
|
4
|
+
data.tar.gz: e520b09923e8ebc24e2ddf3f03d2c4d455896e99dc708b0439a23c0f37154a61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a66a5e24cf6651dab72a6c5a564c466d8320f7c2d9c3c74a5d832b90eb384a257043d245dcb2636e270631a775cdb25e3dd3ec584bcf3ce01f484485354375b
|
7
|
+
data.tar.gz: c4bb48aa371fcd9770e8fb3e64e4c79dcebed55cf6100aa1ca330f0fe403c66427fc5c94ac7a5ed7fd334376ffd2e62ddb927e1346698d91d1bfef9066091f7b
|
data/README.md
CHANGED
@@ -56,13 +56,14 @@ rusdc get_attachment_of_co <co_name> <filename> # d
|
|
56
56
|
rusdc get_attachment_of_in <incident> <filename> # download an attachment of an Incident and print it out on stdout
|
57
57
|
rusdc help [COMMAND] # Describe available commands or one specific command
|
58
58
|
rusdc in_add_2_chg <changeorder> <incident> # add incident to changeorder
|
59
|
-
rusdc in_add_attachment <in> <file> # attach
|
59
|
+
rusdc in_add_attachment <in> <file> # attach a file to an incident or problem
|
60
60
|
rusdc in_list_child_ins <in> # list all child-incidents of one incident
|
61
61
|
rusdc list_attachments_of_ci <ci_name> # list all attachments of a CI
|
62
62
|
rusdc list_attachments_of_co <co_name> # list all attachments of a changeorder
|
63
|
-
rusdc list_attachments_of_in <in> # list all attachments of an
|
63
|
+
rusdc list_attachments_of_in <in> # list all attachments of an incident or problem
|
64
64
|
rusdc nr_add_attachment <nr> <file> # attach the file to nr
|
65
65
|
rusdc nr_add_child <nr-name> <child-name> # add one child CI to another CI
|
66
|
+
rusdc nr_add_contact <nr> <cnt_email> # add contact to configuration-item
|
66
67
|
rusdc nr_add_org <nr> <org> # add an Organisation to a ConfigurationItem
|
67
68
|
rusdc nr_changes <nr> [inactive-too] # list all open changeorders of one CI
|
68
69
|
rusdc nr_childs <ci-name> # lists all childs CIs of a specific CI
|
data/change_log.md
CHANGED
data/lib/usd.rb
CHANGED
@@ -283,7 +283,8 @@ class Usd
|
|
283
283
|
baseurl =~ /^([^:]+):/
|
284
284
|
server = $1
|
285
285
|
filename = File.basename(file)
|
286
|
-
|
286
|
+
filename_escaped = URI.escape(filename)
|
287
|
+
uri = "/caisd-rest/attmnt?repositoryId=1002&serverName=#{server}&mimeType=Text&description=#{filename_escaped}"
|
287
288
|
url = URI("#{baseurl}#{uri}")
|
288
289
|
http = Net::HTTP.new(url.host, url.port);
|
289
290
|
request = Net::HTTP::Post.new(url)
|
@@ -294,7 +295,7 @@ class Usd
|
|
294
295
|
fileObj = File.open(file, "rb")
|
295
296
|
fileContent = fileObj.read
|
296
297
|
fileObj.close
|
297
|
-
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>#{
|
298
|
+
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_escaped}</orig_file_name> \r\n<attmnt_name>#{filename_escaped}</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_escaped}\"; filename=\"#{filename_escaped}\" \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"
|
298
299
|
response = http.request(request)
|
299
300
|
response.read_body
|
300
301
|
end
|
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.6'
|
4
|
+
spec.date = '2020-09-29'
|
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.6
|
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-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|