percy-capybara 3.0.1 → 3.0.2

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: 40bc91d41c82651dd6873aa89f1680b7fb85560b
4
- data.tar.gz: a324146ad3bafa211c29c412e36f91d41051ff2b
3
+ metadata.gz: ce89ff774e6942093366dca81216bf16f2d8beec
4
+ data.tar.gz: 77180c805651562a58afe775006329ad7bff891b
5
5
  SHA512:
6
- metadata.gz: 26dd09ccac1d8f7770ad95ea97699e9f876570701c67e1779ecfb7ebda990a6856df23f3443f2cad7cedade62853e97d189fe0304a9a55ee9b659e93e37d9a6d
7
- data.tar.gz: 7c6c5452139cc6c948447264740158eafd5b1f6a16b44931b4ea8402129d358c174c3f32b2faed1cb9994002bfdbeb679179ebba27769aa4d58d1bcb37adc5e5
6
+ metadata.gz: 852108bcc28aa11bb444a9803d3866ad79d00603c38ec740035bba0f96f5625e205b7cf2fc992fbf7c329d72415c41a5ba4b4bcd84259e9acf01500f6e445ba7
7
+ data.tar.gz: 40e0ad67a10734c24d1bbd3433056cc11e5e6647051d9d2802e8dc03d5c8305ffd627fd9724b88d36c942f2f805988bcb734ff427292e3f9b29b19c72f724300
@@ -49,6 +49,8 @@ module Percy
49
49
  Percy.logger.error { 'Percy build failed! Check log above for errors.' }
50
50
  return
51
51
  end
52
+ build_url = current_build['data']['attributes']['web-url']
53
+ puts "\n[percy] Visual diffs are now processing: #{build_url}"
52
54
  result
53
55
  end
54
56
 
@@ -144,17 +144,10 @@ module Percy
144
144
 
145
145
  # A simplified version of Find.find that only returns files and follows symlinks.
146
146
  def _find_files(*paths)
147
- paths.flatten!
148
- paths.map! { |p| Pathname.new(p) }
149
- files = []
150
- paths.each do |path|
151
- if path.file?
152
- files << path.to_s
153
- else
154
- files = files.concat(_find_files(path.children))
155
- end
156
- end
157
- files
147
+ paths.flatten.map do |path|
148
+ path = Pathname.new(path)
149
+ path.file? ? [path.to_s] : _find_files(path.children)
150
+ end.flatten
158
151
  end
159
152
 
160
153
  def _uri_join(*paths)
@@ -1,5 +1,5 @@
1
1
  module Percy
2
2
  module Capybara
3
- VERSION = '3.0.1'.freeze
3
+ VERSION = '3.0.2'.freeze
4
4
  end
5
5
  end
@@ -125,8 +125,11 @@ RSpec.describe Percy::Capybara::Client::Builds do
125
125
  end
126
126
  end
127
127
  describe '#finalize_current_build' do
128
+ let(:build_data) do
129
+ {'data' => {'id' => 123, 'attributes' => {'web-url' => 'http://localhost/'}}}
130
+ end
131
+
128
132
  it 'finalizes the current build' do
129
- build_data = {'data' => {'id' => 123}}
130
133
  expect(capybara_client.client).to receive(:create_build).and_return(build_data)
131
134
  capybara_client.initialize_build
132
135
 
@@ -139,7 +142,6 @@ RSpec.describe Percy::Capybara::Client::Builds do
139
142
  end.to raise_error(Percy::Capybara::Client::BuildNotInitializedError)
140
143
  end
141
144
  it 'safely handles connection errors' do
142
- build_data = {'data' => {'id' => 123}}
143
145
  expect(capybara_client.client).to receive(:create_build).and_return(build_data)
144
146
  capybara_client.initialize_build
145
147
 
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.0.1
4
+ version: 3.0.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: 2017-06-06 00:00:00.000000000 Z
11
+ date: 2017-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: percy-client