isomorfeus-puppetmaster 0.6.15 → 0.6.16
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ce8e229f1fb4ff14d811d9fa84389bde564085254aa0b02334da5a801ee2ed0
|
4
|
+
data.tar.gz: 5d13b3f37c7285797066b9c285e60e2052d71132dba4e30251c165d4ccb898ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90bf2423e99206780512cea1917452aada9f9125d5f995632f23d9620c0ae6670ebe3c19e85101a382a559fa955ecc5cf20efde76173d21776caa677064ed238
|
7
|
+
data.tar.gz: f0de78280ed0d1af7d60e91a0c857eb60c85a46bd8685bad9912df7622d8f10362904d68d336feb91647ec5173b3a46daba871c37016f916eebc2d3cc98c7e02
|
@@ -18,7 +18,6 @@ module Isomorfeus
|
|
18
18
|
unless request.body.nil?
|
19
19
|
request_hash = Oj.load(request.body.read, mode: :strict)
|
20
20
|
if request_hash['key'] != @@request_key
|
21
|
-
STDERR.puts "wrong key"
|
22
21
|
response = Rack::Response.new(Oj.dump({ 'error' => 'wrong key given, execution denied' }),
|
23
22
|
401,
|
24
23
|
'Content-Type' => 'application/json')
|
@@ -29,7 +28,8 @@ module Isomorfeus
|
|
29
28
|
Isomorfeus.store.clear! if Isomorfeus.store.respond_to?(:clear!)
|
30
29
|
end
|
31
30
|
result = TOPLEVEL_BINDING.eval(request_hash['code']) if request_hash['code']
|
32
|
-
|
31
|
+
result = result.value if result.is_a?(Promise)
|
32
|
+
response = Rack::Response.new(Oj.dump({ 'result' => result }, circular: true),
|
33
33
|
200,
|
34
34
|
'Content-Type' => 'application/json')
|
35
35
|
rescue Exception => e
|
@@ -5,6 +5,9 @@ require 'uri'
|
|
5
5
|
require 'net/http'
|
6
6
|
require 'rack'
|
7
7
|
require 'opal'
|
8
|
+
opal_path = Gem::Specification.find_by_name('opal').full_gem_path
|
9
|
+
promise_path = File.join(opal_path, 'stdlib', 'promise.rb')
|
10
|
+
require promise_path
|
8
11
|
require 'parser'
|
9
12
|
|
10
13
|
# isomorfeus needs kwargs
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-puppetmaster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
@@ -92,14 +92,14 @@ dependencies:
|
|
92
92
|
requirements:
|
93
93
|
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: 0.
|
95
|
+
version: 0.42.0
|
96
96
|
type: :runtime
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: 0.
|
102
|
+
version: 0.42.0
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: tty-which
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|