percy-capybara 3.1.2 → 3.2.0
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/.rubocop.yml +1 -1
- data/lib/percy/capybara/anywhere.rb +2 -2
- data/lib/percy/capybara/client.rb +1 -6
- data/lib/percy/capybara/client/builds.rb +1 -1
- data/lib/percy/capybara/version.rb +1 -1
- data/percy-capybara.gemspec +1 -1
- data/spec/lib/percy/capybara/client/builds_spec.rb +2 -4
- data/spec/lib/percy/capybara/client/rails_public_test_data/symlink_to_images +1 -1
- data/spec/lib/percy/capybara/client/snapshots_spec.rb +1 -2
- data/spec/lib/percy/capybara/client_spec.rb +3 -3
- data/spec/support/test_helpers.rb +0 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d765232c28dd6dd5daabd909841b5635422ee4c3
|
4
|
+
data.tar.gz: 3ed787238eab20a6fd720c10e30613186fc6c778
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c25024cd8bd7311b47022c8981a39869b33a0a1e3f2bd450c0e9a6f1476da79fdb8ade0eb8ee5f512cd7954a63d36ec46ecc12c60b520052b66de29072a36ebd
|
7
|
+
data.tar.gz: 7a0ce5d3166b547ef0bbe32ef9823f9333761fa156dd937331b46914a211c3000943896b058e63a5c39cf6a1373eae8e8552dd27187556502fbf194c578649e8
|
data/.rubocop.yml
CHANGED
@@ -14,8 +14,8 @@ module Percy
|
|
14
14
|
# end
|
15
15
|
module Anywhere
|
16
16
|
def self.run(server, assets_dir, assets_base_url = nil)
|
17
|
-
|
18
|
-
raise 'Whoops! You need to setup the
|
17
|
+
if ENV['PERCY_TOKEN'].nil?
|
18
|
+
raise 'Whoops! You need to setup the PERCY_TOKEN environment variable.'
|
19
19
|
end
|
20
20
|
|
21
21
|
::Capybara.run_server = false
|
@@ -42,12 +42,7 @@ module Percy
|
|
42
42
|
|
43
43
|
# Check that environment variables required for Percy::Client are set
|
44
44
|
def required_environment_variables_set?
|
45
|
-
|
46
|
-
raise '[percy] It looks like you were trying to enable Percy because PERCY_TOKEN ' \
|
47
|
-
'is set, but you are missing the PERCY_PROJECT environment variable!'
|
48
|
-
end
|
49
|
-
|
50
|
-
!(ENV['PERCY_PROJECT'].nil? || ENV['PERCY_TOKEN'].nil?)
|
45
|
+
!!ENV['PERCY_TOKEN']
|
51
46
|
end
|
52
47
|
|
53
48
|
def enabled?
|
@@ -16,7 +16,7 @@ module Percy
|
|
16
16
|
Percy.logger.debug { "All build resources loaded (#{Time.now - start}s)" }
|
17
17
|
|
18
18
|
rescue_connection_failures do
|
19
|
-
@current_build = client.create_build(
|
19
|
+
@current_build = client.create_build(options)
|
20
20
|
_upload_missing_build_resources(build_resources) unless build_resources.empty?
|
21
21
|
end
|
22
22
|
if failed?
|
data/percy-capybara.gemspec
CHANGED
@@ -18,7 +18,7 @@ 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', '~>
|
21
|
+
spec.add_dependency 'percy-client', '~> 2.0'
|
22
22
|
spec.add_dependency 'addressable', '~> 2'
|
23
23
|
|
24
24
|
spec.add_development_dependency 'bundler', '~> 1.7'
|
@@ -1,9 +1,7 @@
|
|
1
1
|
RSpec.describe Percy::Capybara::Client::Builds do
|
2
2
|
let(:enabled) { true }
|
3
3
|
let(:capybara_client) { Percy::Capybara::Client.new(enabled: enabled) }
|
4
|
-
let(:builds_api_url)
|
5
|
-
"https://percy.io/api/v1/repos/#{Percy::Client::Environment.repo}/builds/"
|
6
|
-
end
|
4
|
+
let(:builds_api_url) { "https://percy.io/api/v1/builds/" }
|
7
5
|
|
8
6
|
describe '#initialize_build', type: :feature, js: true do
|
9
7
|
before(:each) { setup_sprockets(capybara_client) }
|
@@ -104,7 +102,7 @@ RSpec.describe Percy::Capybara::Client::Builds do
|
|
104
102
|
it 'returns the current build' do
|
105
103
|
mock_double = double('build')
|
106
104
|
expect(capybara_client.client).to receive(:create_build)
|
107
|
-
.with(
|
105
|
+
.with({})
|
108
106
|
.and_return(mock_double)
|
109
107
|
.once
|
110
108
|
capybara_client.initialize_build
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../symlink_test_data
|
@@ -47,8 +47,7 @@ RSpec.describe Percy::Capybara::Client::Snapshots, type: :feature do
|
|
47
47
|
|
48
48
|
visit '/'
|
49
49
|
loader # Force evaluation now.
|
50
|
-
|
51
|
-
stub_request(:post, "https://percy.io/api/v1/repos/#{repo}/builds/")
|
50
|
+
stub_request(:post, "https://percy.io/api/v1/builds/")
|
52
51
|
.to_return(status: 201, body: mock_build_response.to_json)
|
53
52
|
stub_request(:post, 'https://percy.io/api/v1/builds/123/snapshots/')
|
54
53
|
.to_return(status: 201, body: mock_snapshot_response.to_json)
|
@@ -19,9 +19,9 @@ RSpec.describe Percy::Capybara::Client do
|
|
19
19
|
expect(Percy::Capybara::Client.new.enabled?).to eq(false)
|
20
20
|
end
|
21
21
|
|
22
|
-
it '
|
23
|
-
ENV.delete '
|
24
|
-
expect
|
22
|
+
it 'is false if PERCY_TOKEN is not set' do
|
23
|
+
ENV.delete 'PERCY_TOKEN'
|
24
|
+
expect(Percy::Capybara::Client.new.enabled?).to eq(false)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
@@ -50,13 +50,11 @@ module TestHelpers
|
|
50
50
|
# Set the environment variables required by Percy::Client
|
51
51
|
def set_required_env_variables
|
52
52
|
ENV['PERCY_TOKEN'] = 'aa'
|
53
|
-
ENV['PERCY_PROJECT'] = 'aa'
|
54
53
|
end
|
55
54
|
|
56
55
|
# Clear the environment variables required by Percy::Client
|
57
56
|
def clear_percy_env_variables
|
58
57
|
ENV.delete('PERCY_TOKEN')
|
59
|
-
ENV.delete('PERCY_PROJECT')
|
60
58
|
ENV.delete('PERCY_ENABLE')
|
61
59
|
end
|
62
60
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: percy-capybara
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Perceptual Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: percy-client
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
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: '
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: addressable
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -311,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
311
311
|
version: '0'
|
312
312
|
requirements: []
|
313
313
|
rubyforge_project:
|
314
|
-
rubygems_version: 2.
|
314
|
+
rubygems_version: 2.5.2
|
315
315
|
signing_key:
|
316
316
|
specification_version: 4
|
317
317
|
summary: Percy::Capybara
|