smart_proxy_dynflow 0.1.2 → 0.1.3
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
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 706cb881e90f4d3c7a3553b1b2a078320d7210c6
|
|
4
|
+
data.tar.gz: 700fbaf5da5a1817efe85e80e7dbf238fbe640e0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7aa219682cb40b61da1103ca4a7e708b7f12c0c44c840e31dd06af05d67981c1b616ecd294bb2f5a95d70e0998a865eae73bb378fe1fd44ca85300ff321d5059
|
|
7
|
+
data.tar.gz: df5dc500e1d5c45b1b13770d3a14c8c5dc5749755060db4ca0ada823d633950178722dba6681cb7982aafc5792f4744a22127cfad580daa316b5d8831c428260
|
|
@@ -16,13 +16,6 @@ module Proxy
|
|
|
16
16
|
content_type :json
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
post "/tasks/callback" do
|
|
20
|
-
response = Proxy::Dynflow::Callback::Request.send_to_foreman_tasks(request.body.read)
|
|
21
|
-
logger.info "Callback to foreman #{response.code} - #{response}"
|
|
22
|
-
status response.code
|
|
23
|
-
body response.body
|
|
24
|
-
end
|
|
25
|
-
|
|
26
19
|
post "/*" do
|
|
27
20
|
relay_request
|
|
28
21
|
end
|
|
@@ -3,20 +3,6 @@ require 'proxy/request'
|
|
|
3
3
|
module Proxy
|
|
4
4
|
class Dynflow
|
|
5
5
|
module Callback
|
|
6
|
-
class Request < Proxy::HttpRequest::ForemanRequest
|
|
7
|
-
def callback(payload)
|
|
8
|
-
response = send_request(request_factory.create_post('foreman_tasks/api/tasks/callback', payload))
|
|
9
|
-
if response.code != "200"
|
|
10
|
-
raise "Failed performing callback to Foreman server: #{response.code} #{response.body}"
|
|
11
|
-
end
|
|
12
|
-
response
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def self.send_to_foreman_tasks(payload)
|
|
16
|
-
self.new.callback(payload)
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
|
|
20
6
|
class Core < Proxy::HttpRequest::ForemanRequest
|
|
21
7
|
def uri
|
|
22
8
|
@uri ||= URI.parse Proxy::Dynflow::Plugin.settings.core_url
|
|
@@ -14,7 +14,6 @@ class Proxy::Dynflow
|
|
|
14
14
|
https_rackup_path File.expand_path(rackup_path, File.expand_path("../", __FILE__))
|
|
15
15
|
|
|
16
16
|
settings_file "dynflow.yml"
|
|
17
|
-
default_settings :console_auth => true
|
|
18
17
|
default_settings :core_url => 'http://localhost:8008'
|
|
19
18
|
plugin :dynflow, Proxy::Dynflow::VERSION
|
|
20
19
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: smart_proxy_dynflow
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ivan Nečas
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-06-
|
|
11
|
+
date: 2016-06-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|