isomorfeus-puppetmaster 0.3.1 → 0.3.2

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: 7123d1c27ed7357e7ac6fff577bb2dcd025bd7d622c2ba849d1232ab9d3086d2
4
- data.tar.gz: 4020f116455824c9ff42c4dca646ef69fb252ee7113986cb3926109cb874d381
3
+ metadata.gz: 427ff7db65720f0b8a7adbde4778b89700671dee6f35a1b766606573b0477a4a
4
+ data.tar.gz: dc73b15d323e81353786ae448f631f1cc61e368e6823eb1ea5fddfbc92483feb
5
5
  SHA512:
6
- metadata.gz: c30ba060532b000fe950b6bbbd0dcde8a22f0957771368b0b4f8862839f4690102ea71b7ce8e74e1f6d1c5aaded08331cb4a387f14adde8dd3b0cd902b3484e7
7
- data.tar.gz: 9418b91dd65c552b9f26fa1c92fe2eeb2e75eb5f807125a6413e1812fd58545d3c6c554474f565b43700acb54f6478add020444b9ee202978758e782ce24ab74
6
+ metadata.gz: 60087609ceac68c2e7f5c92f0501b07db013637ef93152aee9235bb0538c9912672a4f5cb641bc809e8039378636bea6869854a2c35e4b37601695d94890a9ab
7
+ data.tar.gz: 9f60ee61889b2538f48674b2f1faf256ffc937a687fd62616953f9edb5c6ba66538683c40b5334530033f5ef1ac86de1d29ef7dab989c04fa9482a08a8f6e2ea
@@ -79,20 +79,27 @@ module Isomorfeus
79
79
  end
80
80
  evaluate_script <<~JAVASCRIPT
81
81
  (function(){
82
- Opal.gvars.promise_resolved = false;
83
- Opal.await_ruby_exception = null;
84
- try {
85
- return #{compiled_ruby}
86
- } catch (e) {
87
- Opal.await_ruby_exception = e;
88
- Opal.gvars.promise_resolved = true;
82
+ fun = function() {
83
+ if (Opal) {
84
+ Opal.gvars.promise_resolved = false;
85
+ Opal.await_ruby_exception = null;
86
+ try {
87
+ return #{compiled_ruby}
88
+ } catch (e) {
89
+ Opal.await_ruby_exception = e;
90
+ Opal.gvars.promise_resolved = true;
91
+ }
92
+ } else {
93
+ setTimeout(fun, 100);
94
+ }
89
95
  }
96
+ fun();
90
97
  })()
91
98
  JAVASCRIPT
92
99
  have_result = false
93
100
  start = Time.now
94
101
  until have_result do
95
- break if (Time.now - start) > 30
102
+ raise "await_ruby: execution timed out! Is Opal available?" if (Time.now - start) > 30
96
103
  have_result = evaluate_script 'Opal.gvars.promise_resolved'
97
104
  sleep 0.1 unless have_result
98
105
  end
@@ -1,3 +1,3 @@
1
1
  module Isomorfeus
2
- PUPPETMASTER_VERSION = '0.3.1'
2
+ PUPPETMASTER_VERSION = '0.3.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-puppetmaster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-14 00:00:00.000000000 Z
11
+ date: 2020-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport