isomorfeus-puppetmaster 0.6.15 → 0.6.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 269dd1f6465a3861c8590f471d3db376b11a0570fa4bf97bd44b9dfb5d9c1e42
4
- data.tar.gz: 0315a46480c8e60a185b5ad3e8fd5649eecb937cb9c606ac6e3ab2e70e57a454
3
+ metadata.gz: 3ce8e229f1fb4ff14d811d9fa84389bde564085254aa0b02334da5a801ee2ed0
4
+ data.tar.gz: 5d13b3f37c7285797066b9c285e60e2052d71132dba4e30251c165d4ccb898ee
5
5
  SHA512:
6
- metadata.gz: d52eb1625c95027d9ef3d7b3f57c7742d07307bf650f7b7545ef222bb6b4135500229670bf95dfc5e2081a41f623536d005cf5fcf392c887c03e7b4c7c75c263
7
- data.tar.gz: c1af261f57a1f1ad3cce47a7cb2b10ad8c3b539300d98e925918db666231de4f72d8c5b606de64089af02cf79f3296596efbcce60a909702dc2a63808a77e8b1
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
- response = Rack::Response.new(Oj.dump({ 'result' => result }),
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
@@ -1,3 +1,3 @@
1
1
  module Isomorfeus
2
- PUPPETMASTER_VERSION = '0.6.15'
2
+ PUPPETMASTER_VERSION = '0.6.16'
3
3
  end
@@ -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.15
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.41.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.41.0
102
+ version: 0.42.0
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: tty-which
105
105
  requirement: !ruby/object:Gem::Requirement