percy-capybara 0.4.7 → 0.4.8
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 090c6c2483abeef27b6441fde9b935fa85395351
|
4
|
+
data.tar.gz: 0ab49af771ae71d096a5006a6ff5250ac9b22a58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e38cb7d3edc15030c87140d163f994755f83437dcd9f67b5ab6313ad3e1a1345a6110da73dc5e0ed369adba6a4e62e967ec0a2c727b7405ea05f24f0f89d0ccd
|
7
|
+
data.tar.gz: e714d7f4a3e12208b50c90a69e7512070d516f9112a6f261d4c177bb632bb8fd32e1f87dbe564b2ed528ce68459b03751be35ba85a9df988f36ddfd3bdabea47
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'tempfile'
|
2
|
+
require 'shellwords'
|
2
3
|
|
3
4
|
module Percy
|
4
5
|
module Capybara
|
@@ -18,7 +19,7 @@ module Percy
|
|
18
19
|
# influenced by any HTTP middleware/restrictions. This helps us avoid causing lots of
|
19
20
|
# problems for people using gems like VCR/WebMock. We also disable certificate checking
|
20
21
|
# because, as odd as that is, it's the default state for Selenium Firefox and others.
|
21
|
-
output = `curl --insecure -v -o #{temppath} "#{url}" 2>&1`
|
22
|
+
output = `curl --insecure -v -o #{temppath} "#{url.shellescape}" 2>&1`
|
22
23
|
content_type = output.match(/< Content-Type:(.*)/i)
|
23
24
|
content_type = content_type[1].strip if content_type
|
24
25
|
|
@@ -10,6 +10,7 @@ RSpec.describe Percy::Capybara::HttpFetcher do
|
|
10
10
|
it 'returns nil if fetch failed' do
|
11
11
|
expect(Percy::Capybara::HttpFetcher.fetch('bad-url')).to be_nil
|
12
12
|
expect(Percy::Capybara::HttpFetcher.fetch('http://i.imgur.com/fake-image.png')).to be_nil
|
13
|
+
expect(Percy::Capybara::HttpFetcher.fetch('http://i.imgur.com/fake image.png')).to be_nil
|
13
14
|
end
|
14
15
|
end
|
15
16
|
|