usd 1.3.7 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/change_log.md +4 -0
- data/lib/usd.rb +6 -3
- data/usd.gemspec +3 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0f4c4811a43c68772d1caddb04541173cd3ca9818cd4b24519d3935a3434ff2
|
4
|
+
data.tar.gz: e13a6fe87854b0d8f5bcbcf9de6cb159dc35eb1b833f54b7047cffb07414d15e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a39169e0643ec4b4c860b2a01ce6de2ab8f599e23f7b15d1daab7299d0d9ea60c6a8bf94426eae9d08165903bc95e6d64f0f81477b8d188a7d49c2f720a83543
|
7
|
+
data.tar.gz: f83e92536d7541fc3b22cd7cc960acff97e59eb8197662eb4f935b1bcfefdb1a61d0acebb5edec6e4120e8d2bc45aa20f116fd22d155ee7e08bc71c22dfc6873
|
data/change_log.md
CHANGED
data/lib/usd.rb
CHANGED
@@ -11,6 +11,7 @@ require 'tempfile'
|
|
11
11
|
class Usd
|
12
12
|
|
13
13
|
CN={
|
14
|
+
"grc" => "type",
|
14
15
|
"chg" => "chg_ref_num",
|
15
16
|
"cnt" => "combo_name",
|
16
17
|
"arcpur_rule" => "name",
|
@@ -160,10 +161,11 @@ class Usd
|
|
160
161
|
RestClient.log = STDOUT if @debug
|
161
162
|
hash = {:method => "get", :header => header(), :unchanged => false, :json => "", :base_url => @base_url}.update hash
|
162
163
|
puts "request - hash: #{JSON.pretty_generate(hash)}" if @debug
|
164
|
+
parser = URI::RFC2396_Parser.new
|
163
165
|
if (uri !~ /^http/)
|
164
|
-
url =
|
166
|
+
url = parser.escape("#{hash[:base_url]}#{uri}")
|
165
167
|
else
|
166
|
-
url =
|
168
|
+
url = parser.escape(uri)
|
167
169
|
end
|
168
170
|
begin
|
169
171
|
if hash[:method] == "get"
|
@@ -283,7 +285,8 @@ class Usd
|
|
283
285
|
baseurl =~ /^([^:]+):/
|
284
286
|
server = $1
|
285
287
|
filename = File.basename(file)
|
286
|
-
filename_escaped = URI.escape(filename)
|
288
|
+
#filename_escaped = URI.escape(filename)
|
289
|
+
filename_escaped = filename.gsub(/[^0-9A-Za-z.\-]/, '_')
|
287
290
|
uri = "/caisd-rest/attmnt?repositoryId=1002&serverName=#{server}&mimeType=Text&description=#{filename_escaped}"
|
288
291
|
url = URI("#{baseurl}#{uri}")
|
289
292
|
http = Net::HTTP.new(url.host, url.port);
|
data/usd.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'usd'
|
3
|
-
spec.version = '1.
|
4
|
-
spec.date = '2020-
|
3
|
+
spec.version = '1.4.0'
|
4
|
+
spec.date = '2020-11-12'
|
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"]
|
@@ -13,4 +13,5 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.add_runtime_dependency 'thor', '~> 0.20', '>= 0.20.3'
|
14
14
|
spec.add_runtime_dependency 'rest-client', '~> 2.0', '>= 2.0.0'
|
15
15
|
spec.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
16
|
+
spec.license = 'MIT'
|
16
17
|
end
|
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.
|
4
|
+
version: 1.4.0
|
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-
|
11
|
+
date: 2020-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -86,7 +86,8 @@ files:
|
|
86
86
|
- lib/usd.rb
|
87
87
|
- usd.gemspec
|
88
88
|
homepage: https://github.com/ogaida/usd
|
89
|
-
licenses:
|
89
|
+
licenses:
|
90
|
+
- MIT
|
90
91
|
metadata: {}
|
91
92
|
post_install_message:
|
92
93
|
rdoc_options: []
|
@@ -103,8 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
104
|
- !ruby/object:Gem::Version
|
104
105
|
version: '0'
|
105
106
|
requirements: []
|
106
|
-
|
107
|
-
rubygems_version: 2.7.6
|
107
|
+
rubygems_version: 3.1.2
|
108
108
|
signing_key:
|
109
109
|
specification_version: 4
|
110
110
|
summary: SDM REST-API-Calls
|