percy-capybara 4.3.0 → 4.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/percy.rb +1 -13
  3. data/lib/version.rb +1 -1
  4. metadata +2 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a7ea5e445bc353fd0274ffd65a7070f8226c6eea82d03d690e76bc22430a819
4
- data.tar.gz: 52236f3b99515f4247ef490eddcdfed565b52d30af64eefe47b3c6f6ea1bdea9
3
+ metadata.gz: a4fb6fdec485db075cfc8cf93eedf339ce2a51bd46e078bc524ce085736e07b3
4
+ data.tar.gz: 8d1aaaf79805bdb3aa765aa7c9a6747a33e23f8c598a62c8e92a08c9690ca2c7
5
5
  SHA512:
6
- metadata.gz: b5eea321c1c11b700a74c225336cc82b69f28647b75c4336834bd2a6a6eaba3a1dafe1988a35789a8e57fa6c54862462824b98d26290f19cd5a7147feeb0c952
7
- data.tar.gz: 33d852c6cd03e03d5d0dffeae5b4090915ded9a581f03680146e79be51a8dbe2946f88f1b5c92415fb11894c7cf3f7553f3048bf0802a0b27cfed668cb893069
6
+ metadata.gz: 04f23d009a4b53172d875385ecc85fca8b9de74976f43254d9a065a89df092e3ed01ebfe6890d84d36856feef12f0ef689797e4dbdad34f2e7d47ebf6a54c376
7
+ data.tar.gz: 848fbd8b7f815673d4bd7ff3dcd581f5fa7e04bf5a7610be83b5c700a762b2ccf6af36ba989ac45a31712da7fdf5d8ebb14e0137ccee14b7469ce95102796021
@@ -77,15 +77,7 @@ module Percy
77
77
 
78
78
  begin
79
79
  page.execute_script(agent_js)
80
- dom_snapshot_js = "new window.PercyAgent({ handleAgentCommunication: false }).domSnapshot(document, #{options.to_json})"
81
-
82
- if self._is_capybara?
83
- dom_snapshot = page.evaluate_script(dom_snapshot_js)
84
- else
85
- dom_snapshot = page.execute_script(dom_snapshot_js)
86
- end
87
-
88
- return dom_snapshot
80
+ page.execute_script("return new window.PercyAgent({ handleAgentCommunication: false }).domSnapshot(document, #{options.to_json})")
89
81
  rescue => e
90
82
  self._logger.error { "DOM snapshotting failed. Error: #{e}" }
91
83
  return nil
@@ -136,8 +128,4 @@ module Percy
136
128
  def self._is_debug?
137
129
  ENV['LOG_LEVEL'] == 'debug'
138
130
  end
139
-
140
- def self._is_capybara?
141
- Percy.capybara_version.length > 0
142
- end
143
131
  end
@@ -1,3 +1,3 @@
1
1
  module Percy
2
- VERSION = '4.3.0'.freeze
2
+ VERSION = '4.3.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: percy-capybara
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.0
4
+ version: 4.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Perceptual Inc.
@@ -144,8 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  requirements: []
147
- rubyforge_project:
148
- rubygems_version: 2.7.10
147
+ rubygems_version: 3.1.4
149
148
  signing_key:
150
149
  specification_version: 4
151
150
  summary: Percy