gloo 0.5.3 → 0.5.4
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/Gemfile.lock +1 -1
- data/lib/gloo/app/info.rb +1 -1
- data/lib/gloo/core/factory.rb +2 -2
- data/lib/gloo/objs/web/http_post.rb +17 -1
- 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: 20f45224b6b8b6007e5f99d8552be6ba63b8f2295c0ad348442a24cf7fe22d03
|
4
|
+
data.tar.gz: be35cae08d277dc082f450ac3d3bab101e1a4b027ac74288a3a828e5f3608430
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 992d33279fa29545b34c0b5218dd92a8ef51db57863ead34aaf16161aeae53731586eff1d9b62a361f09572949309a6158a096c88122aa85afd79f5cef688d33
|
7
|
+
data.tar.gz: 52f91ea8a7966e1a00f21abf8fa6de471540e63ea6199ed07def348b18e98b610ecf9acb0ac2008ca746116dadedd168015fdcf3bec91de74bae4a65c498ed42
|
data/Gemfile.lock
CHANGED
data/lib/gloo/app/info.rb
CHANGED
data/lib/gloo/core/factory.rb
CHANGED
@@ -117,11 +117,11 @@ module Gloo
|
|
117
117
|
end
|
118
118
|
|
119
119
|
if pn.exists? && params[ :squash_duplicates ]
|
120
|
-
$log.debug "Updating existing object: #{
|
120
|
+
$log.debug "Updating existing object: #{obj_name}"
|
121
121
|
return self.update_existing pn, params[ :value ]
|
122
122
|
end
|
123
123
|
|
124
|
-
$log.debug "Creating new object: #{
|
124
|
+
$log.debug "Creating new object: #{obj_name}"
|
125
125
|
return create_new obj_name, params[ :value ], objtype, parent
|
126
126
|
end
|
127
127
|
|
@@ -15,6 +15,7 @@ module Gloo
|
|
15
15
|
KEYWORD_SHORT = 'post'.freeze
|
16
16
|
URL = 'uri'.freeze
|
17
17
|
BODY = 'body'.freeze
|
18
|
+
RESULT = 'result'.freeze
|
18
19
|
|
19
20
|
#
|
20
21
|
# The name of the object type.
|
@@ -57,6 +58,16 @@ module Gloo
|
|
57
58
|
return h.to_json
|
58
59
|
end
|
59
60
|
|
61
|
+
#
|
62
|
+
# Set the result of the API call.
|
63
|
+
#
|
64
|
+
def update_result( data )
|
65
|
+
r = find_child RESULT
|
66
|
+
return nil unless r
|
67
|
+
|
68
|
+
r.set_value data
|
69
|
+
end
|
70
|
+
|
60
71
|
# ---------------------------------------------------------------------
|
61
72
|
# Children
|
62
73
|
# ---------------------------------------------------------------------
|
@@ -97,7 +108,8 @@ module Gloo
|
|
97
108
|
body = self.body_as_json
|
98
109
|
$log.debug "posting body: #{body}"
|
99
110
|
use_ssl = uri.downcase.start_with?( 'https' )
|
100
|
-
Gloo::Objs::HttpPost.post_json uri, body, use_ssl
|
111
|
+
data = Gloo::Objs::HttpPost.post_json uri, body, use_ssl
|
112
|
+
self.update_result data
|
101
113
|
end
|
102
114
|
|
103
115
|
# ---------------------------------------------------------------------
|
@@ -118,6 +130,7 @@ module Gloo
|
|
118
130
|
result = n.start { |http| http.request( request ) }
|
119
131
|
$log.debug result.code
|
120
132
|
$log.debug result.message
|
133
|
+
return result.body
|
121
134
|
end
|
122
135
|
|
123
136
|
# ---------------------------------------------------------------------
|
@@ -141,6 +154,9 @@ module Gloo
|
|
141
154
|
The URI for the HTTP Post.
|
142
155
|
body - container
|
143
156
|
Collection of parameters for the HTTP Post.
|
157
|
+
result - string - Optional parameter
|
158
|
+
The result of the request. Whatever was returned in the body
|
159
|
+
of the HTTP POST.
|
144
160
|
|
145
161
|
MESSAGES
|
146
162
|
run - Run the HTTP Post sending the body data to the
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gloo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Crane
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|