kinetic_sdk 5.0.5 → 5.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/kinetic_sdk.gemspec +2 -2
- data/lib/kinetic_sdk/core/lib/bridges.rb +21 -21
- data/lib/kinetic_sdk/core/lib/space.rb +2 -1
- data/lib/kinetic_sdk/task/lib/handlers.rb +1 -1
- data/lib/kinetic_sdk/task/lib/sources.rb +1 -1
- data/lib/kinetic_sdk/utils/kinetic-export-utils.rb +6 -1
- data/lib/kinetic_sdk/version.rb +1 -1
- metadata +30 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84466b09a0451770e8dee54b04945dc470471fe6c16200fdf3ff5b45f3ec919f
|
4
|
+
data.tar.gz: adcbed36342f299a9f744230c3602153178b464990f5f8fb87951659f421d17f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e41e92961c079fee7d4fa3aab86a5ab7b007545ac4241d48018b10c813bc6e39ad55f1c6105825de134ef4c5fe3926579496c88b8fc7e2358a0d52c6d18a310b
|
7
|
+
data.tar.gz: c6d84d3d8f269fe6f8c2598ec38143004b780587ae6ff788080f73f9a2f9b32654dfc798ce125e597cf9208f9888fbfe72217497b329f4b7899266151245ea76
|
data/kinetic_sdk.gemspec
CHANGED
@@ -25,9 +25,9 @@ Gem::Specification.new do |spec|
|
|
25
25
|
|
26
26
|
spec.add_development_dependency "kontena-websocket-client", "0.1.1"
|
27
27
|
|
28
|
-
spec.add_development_dependency "bundler", "~> 1.
|
28
|
+
spec.add_development_dependency "bundler", "~> 1.17"
|
29
29
|
spec.add_development_dependency "rake", "~> 13.0.1"
|
30
|
-
spec.add_development_dependency "yard", "~> 0.9.
|
30
|
+
spec.add_development_dependency "yard", "~> 0.9.25"
|
31
31
|
|
32
32
|
spec.metadata["yard.run"] = "yri"
|
33
33
|
end
|
@@ -3,26 +3,26 @@ module KineticSdk
|
|
3
3
|
|
4
4
|
# Add a Bridge
|
5
5
|
#
|
6
|
-
# @param body [Hash] properties associated to the Bridge
|
7
|
-
# - +adapterClass+
|
6
|
+
# @param body [Hash] optional properties associated to the Bridge
|
8
7
|
# - +name+
|
9
|
-
# - +
|
10
|
-
# - +
|
8
|
+
# - +status+
|
9
|
+
# - +url+
|
11
10
|
# @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
|
12
11
|
# @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
|
13
|
-
def add_bridge(body, headers=default_headers)
|
14
|
-
@logger.info("Adding the \"#{body['name']}\"
|
15
|
-
post("#{@
|
12
|
+
def add_bridge(body={}, headers=default_headers)
|
13
|
+
@logger.info("Adding the \"#{body['name']}\" Bridge.")
|
14
|
+
post("#{@api_url}/bridges", body, headers)
|
16
15
|
end
|
17
16
|
|
18
17
|
# Delete a Bridge
|
19
18
|
#
|
20
|
-
# @param
|
19
|
+
# @param name [String] name of the bridge
|
20
|
+
# @param params [Hash] Query parameters that are added to the URL, such as +include+
|
21
21
|
# @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
|
22
22
|
# @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
|
23
|
-
def delete_bridge(
|
24
|
-
@logger.info("Deleting the \"#{
|
25
|
-
delete("#{@
|
23
|
+
def delete_bridge(name, params={}, headers=default_headers)
|
24
|
+
@logger.info("Deleting the \"#{name}\" bridge.")
|
25
|
+
delete("#{@api_url}/bridges/#{encode(name)}", headers)
|
26
26
|
end
|
27
27
|
|
28
28
|
# Find a list of bridges
|
@@ -31,30 +31,30 @@ module KineticSdk
|
|
31
31
|
# @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
|
32
32
|
# @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
|
33
33
|
def find_bridges(params={}, headers=default_headers)
|
34
|
-
@logger.info("Find
|
35
|
-
get("#{@
|
34
|
+
@logger.info("Find Bridges.")
|
35
|
+
get("#{@api_url}/bridges", params, headers)
|
36
36
|
end
|
37
37
|
|
38
38
|
# Find a bridge
|
39
39
|
#
|
40
|
-
# @param
|
40
|
+
# @param name [String] name of the bridge
|
41
41
|
# @param params [Hash] Query parameters that are added to the URL, such as +include+
|
42
42
|
# @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
|
43
43
|
# @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
|
44
|
-
def find_bridge(
|
45
|
-
@logger.info("Finding the \"#{
|
46
|
-
get("#{@
|
44
|
+
def find_bridge(name, params={}, headers=default_headers)
|
45
|
+
@logger.info("Finding the \"#{name}\" Bridge.")
|
46
|
+
get("#{@api_url}/bridges/#{encode(name)}", params, headers)
|
47
47
|
end
|
48
48
|
|
49
49
|
# Update a bridge
|
50
50
|
#
|
51
|
-
# @param
|
51
|
+
# @param name [String] name of the bridge
|
52
52
|
# @param body [Hash] properties of the bridge to update
|
53
53
|
# @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
|
54
54
|
# @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
|
55
|
-
def update_bridge(
|
56
|
-
@logger.info("Updating the \"#{
|
57
|
-
put("#{@
|
55
|
+
def update_bridge(name, body={}, headers=default_headers)
|
56
|
+
@logger.info("Updating the \"#{name}\" Bridge.")
|
57
|
+
put("#{@api_url}/bridges/#{encode(name)}", body, headers)
|
58
58
|
end
|
59
59
|
|
60
60
|
# Add a Bridge Model
|
@@ -69,10 +69,11 @@ module KineticSdk
|
|
69
69
|
"space.kapps.{slug}.categoryAttributeDefinitions",
|
70
70
|
"space.kapps.{slug}.forms.{slug}",
|
71
71
|
"space.kapps.{slug}.formAttributeDefinitions",
|
72
|
-
"space.kapps.{slug}.
|
72
|
+
"space.kapps.{slug}.formTypes",
|
73
73
|
"space.kapps.{slug}.kappAttributeDefinitions",
|
74
74
|
"space.kapps.{slug}.securityPolicyDefinitions",
|
75
75
|
"space.kapps.{slug}.webhooks.{name}",
|
76
|
+
"space.kapps.{slug}.webApis.{slug}",
|
76
77
|
"space.models.{name}",
|
77
78
|
"space.teams.{name}",
|
78
79
|
"space.datastoreFormAttributeDefinitions",
|
@@ -18,7 +18,7 @@ module KineticSdk
|
|
18
18
|
def delete_handlers(headers=header_basic_auth)
|
19
19
|
@logger.info("Deleting all handlers")
|
20
20
|
(find_handlers(headers).content['handlers'] || []).each do |handler|
|
21
|
-
delete("#{@api_url}/handlers/#{handler['
|
21
|
+
delete("#{@api_url}/handlers/#{handler['definitionId']}", headers)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
@@ -60,7 +60,7 @@ module KineticSdk
|
|
60
60
|
# @return nil
|
61
61
|
def export_sources(headers=header_basic_auth)
|
62
62
|
raise StandardError.new "An export directory must be defined to export sources." if @options[:export_directory].nil?
|
63
|
-
response = find_sources({"include" => "policyRules"})
|
63
|
+
response = find_sources({"include" => "policyRules, properties"})
|
64
64
|
(response.content["sourceRoots"] || []).each do |source|
|
65
65
|
# determine which directory to write the file to
|
66
66
|
if source['name'] != "-"
|
@@ -140,11 +140,16 @@ module KineticSdk
|
|
140
140
|
|
141
141
|
# If this is not the "root" object
|
142
142
|
if object_path != '' && !file_contents.empty?
|
143
|
+
# Remove all `/` and `\` characters with ``
|
144
|
+
# Replace all `.` with `/`
|
145
|
+
# Replace all `::` with `-` (this ensures nested Teams/Categories maintain a separator)
|
146
|
+
# Replace all non-slug characters with ``
|
147
|
+
filename = "#{core_path}/#{object_path.gsub('/\\', '').gsub('.', '/').gsub(/::/, '-').gsub(/[^a-zA-Z0-9_\-\/]/, '')}.json"
|
143
148
|
# Write the file_contents based upon the
|
144
|
-
filename = "#{core_path}/#{object_path.gsub('.', '/')}.json"
|
145
149
|
write_object_to_file(filename, file_contents)
|
146
150
|
end
|
147
151
|
|
152
|
+
|
148
153
|
# For each of the child objects
|
149
154
|
child_objects.each do |key, child_object|
|
150
155
|
# Process the export for that object (recursively)
|
data/lib/kinetic_sdk/version.rb
CHANGED
metadata
CHANGED
@@ -1,142 +1,142 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kinetic_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kinetic Data
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: slugify
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
16
|
- - '='
|
18
17
|
- !ruby/object:Gem::Version
|
19
18
|
version: 1.0.7
|
20
|
-
|
19
|
+
name: slugify
|
21
20
|
prerelease: false
|
21
|
+
type: :runtime
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.0.7
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: multipart-post
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
30
29
|
requirements:
|
31
30
|
- - '='
|
32
31
|
- !ruby/object:Gem::Version
|
33
32
|
version: 2.0.0
|
34
|
-
|
33
|
+
name: multipart-post
|
35
34
|
prerelease: false
|
35
|
+
type: :runtime
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 2.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: mime-types
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
44
43
|
requirements:
|
45
44
|
- - '='
|
46
45
|
- !ruby/object:Gem::Version
|
47
46
|
version: '3.1'
|
48
|
-
|
47
|
+
name: mime-types
|
49
48
|
prerelease: false
|
49
|
+
type: :runtime
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name: parallel
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
58
57
|
requirements:
|
59
58
|
- - '='
|
60
59
|
- !ruby/object:Gem::Version
|
61
60
|
version: 1.12.1
|
62
|
-
|
61
|
+
name: parallel
|
63
62
|
prerelease: false
|
63
|
+
type: :runtime
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 1.12.1
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name: ruby-progressbar
|
71
70
|
requirement: !ruby/object:Gem::Requirement
|
72
71
|
requirements:
|
73
72
|
- - '='
|
74
73
|
- !ruby/object:Gem::Version
|
75
74
|
version: 1.9.0
|
76
|
-
|
75
|
+
name: ruby-progressbar
|
77
76
|
prerelease: false
|
77
|
+
type: :runtime
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 1.9.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name: kontena-websocket-client
|
85
84
|
requirement: !ruby/object:Gem::Requirement
|
86
85
|
requirements:
|
87
86
|
- - '='
|
88
87
|
- !ruby/object:Gem::Version
|
89
88
|
version: 0.1.1
|
90
|
-
|
89
|
+
name: kontena-websocket-client
|
91
90
|
prerelease: false
|
91
|
+
type: :development
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 0.1.1
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name: bundler
|
99
98
|
requirement: !ruby/object:Gem::Requirement
|
100
99
|
requirements:
|
101
100
|
- - "~>"
|
102
101
|
- !ruby/object:Gem::Version
|
103
|
-
version: '1.
|
104
|
-
|
102
|
+
version: '1.17'
|
103
|
+
name: bundler
|
105
104
|
prerelease: false
|
105
|
+
type: :development
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '1.
|
110
|
+
version: '1.17'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name: rake
|
113
112
|
requirement: !ruby/object:Gem::Requirement
|
114
113
|
requirements:
|
115
114
|
- - "~>"
|
116
115
|
- !ruby/object:Gem::Version
|
117
116
|
version: 13.0.1
|
118
|
-
|
117
|
+
name: rake
|
119
118
|
prerelease: false
|
119
|
+
type: :development
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 13.0.1
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name: yard
|
127
126
|
requirement: !ruby/object:Gem::Requirement
|
128
127
|
requirements:
|
129
128
|
- - "~>"
|
130
129
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.9.
|
132
|
-
|
130
|
+
version: 0.9.25
|
131
|
+
name: yard
|
133
132
|
prerelease: false
|
133
|
+
type: :development
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.9.
|
139
|
-
description:
|
138
|
+
version: 0.9.25
|
139
|
+
description:
|
140
140
|
email:
|
141
141
|
- support@kineticdata.com
|
142
142
|
executables:
|
@@ -407,7 +407,7 @@ homepage: https://github.com/kineticdata/kinetic-sdk-rb
|
|
407
407
|
licenses: []
|
408
408
|
metadata:
|
409
409
|
yard.run: yri
|
410
|
-
post_install_message:
|
410
|
+
post_install_message:
|
411
411
|
rdoc_options: []
|
412
412
|
require_paths:
|
413
413
|
- lib
|
@@ -422,8 +422,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
422
422
|
- !ruby/object:Gem::Version
|
423
423
|
version: '0'
|
424
424
|
requirements: []
|
425
|
-
|
426
|
-
|
425
|
+
rubyforge_project:
|
426
|
+
rubygems_version: 2.6.11
|
427
|
+
signing_key:
|
427
428
|
specification_version: 4
|
428
429
|
summary: Ruby SDK for Kinetic Data application APIs
|
429
430
|
test_files: []
|