percy-capybara 0.2.1 → 0.2.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
  SHA1:
3
- metadata.gz: bbe6b89eccbc093d666d217a60e5d1038391136b
4
- data.tar.gz: 396cebe13531cd9264e4283779fcba1f64434bfb
3
+ metadata.gz: c9a5536678df8c690450a2c68f50f6309d9f53d1
4
+ data.tar.gz: 1e08e85c3dd7588a6d9ac61570ec2103ff7eaf12
5
5
  SHA512:
6
- metadata.gz: 46ccb397ac1891cb313f58c38f6f6b5cb71fe5072f9fd8f1523977845ae7813892d480ce0a14403f75db1090a8553a9626e71070a5284e61c43acac8035e5dc2
7
- data.tar.gz: 9a836c9355928e2d6d06b59dd181714608fc84dea666b4f5e48f660e59289f3a3451c7ad40cedc6457b2de0124d6034a0daad8946c767bff92c48a2887475cb9
6
+ metadata.gz: 0e573a01a4a41f7ae0b0b0ec9f0c121d09765b0a4d9cb6771505c9af1475e32db75419ad8488bb7ae0f05058f8a1ca686566deb884385c11caa0162a9c053914
7
+ data.tar.gz: c3d7216266554a553581029fa41df45cd275351a39092b47b3cff8dbb5afe68900342b93c6e5d02000a7e59edd920e2ee1f7150ae0951d619e2653b7dcdba4a0
@@ -26,6 +26,11 @@ module Percy
26
26
  sha = missing_resource['id']
27
27
  client.upload_resource(current_build_id, resource_map[sha].content)
28
28
  end
29
+
30
+ # Finalize the snapshot.
31
+ client.finalize_snapshot(snapshot['data']['id'])
32
+
33
+ true
29
34
  end
30
35
 
31
36
  # @private
@@ -1,5 +1,5 @@
1
1
  module Percy
2
2
  module Capybara
3
- VERSION = '0.2.1'
3
+ VERSION = '0.2.2'
4
4
  end
5
5
  end
@@ -18,8 +18,8 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ['lib']
20
20
 
21
- spec.add_dependency 'percy-client', '~> 0.2'
22
- spec.add_dependency 'faraday'
21
+ spec.add_dependency 'percy-client', '>= 0.2.4'
22
+ spec.add_dependency 'faraday', '>= 0.8'
23
23
 
24
24
  spec.add_development_dependency 'bundler', '~> 1.7'
25
25
  spec.add_development_dependency 'rake', '~> 10.0'
@@ -235,7 +235,11 @@ RSpec.describe Percy::Capybara::Client::Snapshots, type: :feature do
235
235
  .with(page).once.and_call_original
236
236
  expect(capybara_client).to receive(:_get_image_resources)
237
237
  .with(page).once.and_call_original
238
- resource_map = capybara_client.snapshot(page)
238
+
239
+ stub_request(:post, "https://percy.io/api/v1/snapshots/256/finalize")
240
+ .to_return(status: 200, body: '{"success":true}')
241
+
242
+ expect(capybara_client.snapshot(page)).to eq(true)
239
243
  end
240
244
  end
241
245
  end
data/spec/spec_helper.rb CHANGED
@@ -38,5 +38,7 @@ RSpec.configure do |config|
38
38
  config.before(:each) do
39
39
  WebMock.disable_net_connect!(allow_localhost: true)
40
40
  end
41
- config.before(:each, type: :feature) { WebMock.allow_net_connect! }
41
+ config.before(:each, type: :feature) do
42
+ WebMock.disable_net_connect!(allow_localhost: true, allow: [/i.imgur.com/])
43
+ end
42
44
  end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: percy-capybara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Perceptual Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-03 00:00:00.000000000 Z
11
+ date: 2015-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: percy-client
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.2'
19
+ version: 0.2.4
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '0.2'
26
+ version: 0.2.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: faraday
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '0.8'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '0.8'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement