isomorfeus-puppetmaster 0.6.2 → 0.6.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 +4 -4
- data/lib/isomorfeus/puppetmaster/session.rb +7 -3
- data/lib/isomorfeus/puppetmaster/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b331458dc7edd860f8c85ee68ba81ef4a7b18e43de0db41f3e8b5246cfd6f78
|
4
|
+
data.tar.gz: 250af210fc9adca4077cbe57ffb5490e5e8f0a0b74b018513db3bd81c2254763
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 638061fd42b4a70c18db00543eb70c1f830165b3b059ea14cda1d9b5d9cadfee69f5ff2365ba5b87f317646701d76ddc645333a5068801841bee725ce89b0d49
|
7
|
+
data.tar.gz: 64835b4b1e4a5c88e0457bc1338007f55bd8ff806c24d1596b15a6e1f206833af7331dfe1b0a233d9fbc793c6848a09f645e1b3b49a3bc8213e1b237e9727bf4
|
@@ -24,6 +24,10 @@ module Isomorfeus
|
|
24
24
|
ObjectSpace.define_finalizer(self, self.class.close_browser(self))
|
25
25
|
end
|
26
26
|
|
27
|
+
def close
|
28
|
+
@browser.close
|
29
|
+
end
|
30
|
+
|
27
31
|
def devices
|
28
32
|
::Puppeteer::DEVICES
|
29
33
|
end
|
@@ -39,7 +43,7 @@ module Isomorfeus
|
|
39
43
|
def goto(uri, referer: nil, timeout: nil, wait_until: 'networkidle0')
|
40
44
|
parsed_uri = parse_uri(uri)
|
41
45
|
@response = @default_page.goto(parsed_uri.to_s, referer: referer, timeout: timeout, wait_until: wait_until)
|
42
|
-
|
46
|
+
@default_page
|
43
47
|
end
|
44
48
|
alias_method :visit, :goto
|
45
49
|
|
@@ -89,7 +93,7 @@ module Isomorfeus
|
|
89
93
|
|
90
94
|
def eval_ruby(ruby_source = '', &block)
|
91
95
|
ruby_source = Isomorfeus::Puppetmaster.block_source_code(&block) if block_given?
|
92
|
-
compiled_ruby = compile_ruby_source(ruby_source)
|
96
|
+
compiled_ruby = Isomorfeus::Puppetmaster.compile_ruby_source(ruby_source)
|
93
97
|
res = self.evaluate "function(){ try { return #{compiled_ruby} } catch (e) { return { error: e.name, message: e.message, stack: e.stack }; }}"
|
94
98
|
if res.is_a?(Hash) && res.key?('error') && res.key?('message') && res.key?('stack')
|
95
99
|
e = RuntimeError.new("#{res['error']}: #{res['message']}")
|
@@ -101,7 +105,7 @@ module Isomorfeus
|
|
101
105
|
|
102
106
|
def eval_with_opal(ruby_source = '', &block)
|
103
107
|
ruby_source = Isomorfeus::Puppetmaster.block_source_code(&block) if block_given?
|
104
|
-
compiled_ruby = compile_ruby_source(ruby_source)
|
108
|
+
compiled_ruby = Isomorfeus::Puppetmaster.compile_ruby_source(ruby_source)
|
105
109
|
res = self.evaluate <<~JAVASCRIPT
|
106
110
|
function(){
|
107
111
|
if (typeof Opal === "undefined") {
|