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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d3c1b097b88823cb4f2295c3f5c78cea3d03f5150c77417e013678dcec59b6ee
4
- data.tar.gz: 73ecf73cc7d4879c1abd1cad7a2fb9f8a60bdcc39eccf77671c2f2d44583a6f5
3
+ metadata.gz: 20f45224b6b8b6007e5f99d8552be6ba63b8f2295c0ad348442a24cf7fe22d03
4
+ data.tar.gz: be35cae08d277dc082f450ac3d3bab101e1a4b027ac74288a3a828e5f3608430
5
5
  SHA512:
6
- metadata.gz: 8a108a19699bc347f4dced3b53863a39f6eec154861c40cd673d6964d27549b38607e5e276c5c74313d1648fd454db9667296ee0429abed3a793a687261b67c3
7
- data.tar.gz: 0e0e9e2540d76a57ae268f1f70e51e8735575743819a5d89e7c3947bdb6cdfb3d44566cbc0359081056bd93e0f75c745046686cb3a5183f94681bd09d410f9c1
6
+ metadata.gz: 992d33279fa29545b34c0b5218dd92a8ef51db57863ead34aaf16161aeae53731586eff1d9b62a361f09572949309a6158a096c88122aa85afd79f5cef688d33
7
+ data.tar.gz: 52f91ea8a7966e1a00f21abf8fa6de471540e63ea6199ed07def348b18e98b610ecf9acb0ac2008ca746116dadedd168015fdcf3bec91de74bae4a65c498ed42
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gloo (0.5.2)
4
+ gloo (0.5.4)
5
5
  activesupport (~> 5.2, >= 5.2.4.3)
6
6
  chronic (~> 0.10, >= 0.10.2)
7
7
  colorize (~> 0.8, >= 0.8.1)
@@ -8,7 +8,7 @@ module Gloo
8
8
  module App
9
9
  class Info
10
10
 
11
- VERSION = '0.5.3'.freeze
11
+ VERSION = '0.5.4'.freeze
12
12
  APP_NAME = 'Gloo'.freeze
13
13
 
14
14
  # Get the application display title.
@@ -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: #{name}"
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: #{name}"
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.3
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-13 00:00:00.000000000 Z
11
+ date: 2020-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler