isomorfeus-puppetmaster 0.6.14 → 0.6.17

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: 602d8e8f04c6eb2290b4f0bda9bf2c2db5903dfbd86bd0cae7bed3489846378b
4
- data.tar.gz: ca32e34cf20340a0c2039a1b625cffa6d5261313b699dd2a2b536e9b994d2f96
3
+ metadata.gz: 72e7c811306c9edf318a669c0d9fd04e1bbb8942be3b8520df0cc92460497851
4
+ data.tar.gz: 4fc9006cdfde519a18beb248de3b142dbb7bb6d581a5a3b542ff0b4f6f9a7800
5
5
  SHA512:
6
- metadata.gz: 1bfc337ba3188881e904feac1ef265a72aad83dee7add3731820cdfb81a940c1b5351963a524df2164f734019ce9e7fb0dfcc6fd1c4c9a85c388add303a419bf
7
- data.tar.gz: 13c2c4858f01844b7cf8bd05ba4d20a04ff25b3d9f3695d2cd8cf178b25501da42e30533df162f6cad778635692058dafc5fd4d221d6bfd32e462a54c072d821
6
+ metadata.gz: 454f7f958754c678e4a2000fe9a6bbf39d8360f89190a64362eb07fafed56e9bcb295cc74ce93d67ba65b7d505400f6036316a8e4438cc5a2af5655f22622a23
7
+ data.tar.gz: 296cabfcdcec71bc13232f3fa3a6bcc556295d46c7fec5d0cb672f8a44f6d041ab7b29fe30495c4463fe9af06e7a3fb255b52e82123e8d269bd991650738d40d
data/README.md CHANGED
@@ -3,9 +3,10 @@
3
3
  <br/>
4
4
  Isomorfeus Puppetmaster<br/>
5
5
  </h1>
6
+
6
7
  A framework for acceptance tests or simply running tests in a headless browser.
7
8
  Allows for writing javascript browser tests in pure ruby.
8
- It is tailored for Isomorfeus and using [puppeteer-ruby](https://github.com/YusukeIwaki/puppeteer-ruby).
9
+ It is tailored for Isomorfeus and using [puppeteer-ruby](https://github.com/YusukeIwaki/puppeteer-ruby)
9
10
 
10
11
  ### Community and Support
11
12
  At the [Isomorfeus Framework Project](https://isomorfeus.com)
@@ -88,7 +89,7 @@ page2.goto('/location')
88
89
 
89
90
  For debugging:
90
91
  ```ruby
91
- page.visit('/', headless: false, devtools: true)
92
+ page = visit('/', headless: false, devtools: true)
92
93
  ```
93
94
  This will close the current browser if the options for headless and devtools dont match, and open a new one with the supplied headless and devtools options.
94
95
 
@@ -28,11 +28,12 @@ module Isomorfeus
28
28
  Isomorfeus.store.clear! if Isomorfeus.store.respond_to?(:clear!)
29
29
  end
30
30
  result = TOPLEVEL_BINDING.eval(request_hash['code']) if request_hash['code']
31
- 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),
32
33
  200,
33
34
  'Content-Type' => 'application/json')
34
35
  rescue Exception => e
35
- response = Rack::Response.new(Oj.dump({ 'error' => "#{e.class}: #{e.message}", 'backtrace' => e.backtrace.join("\n") }),
36
+ response = Rack::Response.new(Oj.dump({ 'error' => "#{e.class}: #{e.message}", 'backtrace' => e.backtrace&.join("\n") }),
36
37
  200,
37
38
  'Content-Type' => 'application/json')
38
39
  end
@@ -85,7 +85,7 @@ module Isomorfeus
85
85
  http.post('/__executor__', Oj.dump(request_hash, mode: :strict))
86
86
  end
87
87
  if response.code == '200'
88
- result_hash = Oj.load(response.body)
88
+ result_hash = Oj.load(response.body, circular: true)
89
89
  if result_hash.key?('error')
90
90
  error = RuntimeError.new(result_hash['error'])
91
91
  error.set_backtrace(result_hash['backtrace'])
@@ -1,3 +1,3 @@
1
1
  module Isomorfeus
2
- PUPPETMASTER_VERSION = '0.6.14'
2
+ PUPPETMASTER_VERSION = '0.6.17'
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,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-puppetmaster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.14
4
+ version: 0.6.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-10 00:00:00.000000000 Z
11
+ date: 2022-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -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