percy-client 0.2.2 → 0.2.3

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: 084784ad1c58603710ba3c4ab756ae1e6b967a74
4
- data.tar.gz: d5bbad9f9802fea3f22384993ff0ad2fc4c43e9c
3
+ metadata.gz: 0887149e63b5fd87582fb37a82c6b3deda06b8ef
4
+ data.tar.gz: 7ad138203c7e719e754fd320162e7c442f87ea3e
5
5
  SHA512:
6
- metadata.gz: 276c2da441d8b1ed6500a836b1a4278caf86866daecf9e4eead798278bf783a890a95db5c81f55379450a6b25abc498a5e4f8c76855f41e6ead228a9179d185b
7
- data.tar.gz: 960178bb671d79ab41f01f20d7eff872c7a510279b5cd9a60ce1ff228c7fe7b6b6b115a400e61a4dc5e7d8846e1820c87adc1ad1641f75cfabe10241f1c391eb
6
+ metadata.gz: 12dea291d0fab49b98b4c6e0c1408b6c482d9f7384b99c215fabee64c1590662ff45e91bc60f04f614e0a936dc84351f6b63826b8f51dff03854bf8644d05d46
7
+ data.tar.gz: ace7abce75c6426c925956be37144ad81dd3f07782153e396aacd2c6e24a76b3f4bb729c66141f0aec407be0a1629267f3d304e736db1656aa7796414c3e838a
@@ -5,6 +5,8 @@ module Percy
5
5
  pull_request_number = options[:pull_request_number] ||
6
6
  Percy::Client::Environment.pull_request_number
7
7
  commit_data = options[:commit_data] || Percy::Client::Environment.commit
8
+ resources = options[:resources]
9
+
8
10
  data = {
9
11
  'data' => {
10
12
  'type' => 'builds',
@@ -21,6 +23,22 @@ module Percy
21
23
  },
22
24
  }
23
25
  }
26
+
27
+ if resources
28
+ if !resources.respond_to?(:each)
29
+ raise ArgumentError.new(
30
+ 'resources argument must be an iterable of Percy::Client::Resource objects')
31
+ end
32
+ relationships_data = {
33
+ 'relationships' => {
34
+ 'resources' => {
35
+ 'data' => resources.map { |r| r.serialize },
36
+ },
37
+ },
38
+ }
39
+ data['data'].merge!(relationships_data)
40
+ end
41
+
24
42
  post("#{config.api_url}/repos/#{repo}/builds/", data)
25
43
  end
26
44
 
@@ -2,7 +2,10 @@ module Percy
2
2
  class Client
3
3
  module Snapshots
4
4
  def create_snapshot(build_id, resources, options = {})
5
- raise ArgumentError.new('resources must be an iterable') if !resources.respond_to?(:each)
5
+ if !resources.respond_to?(:each)
6
+ raise ArgumentError.new(
7
+ 'resources argument must be an iterable of Percy::Client::Resource objects')
8
+ end
6
9
  name = options[:name]
7
10
  data = {
8
11
  'data' => {
@@ -1,5 +1,5 @@
1
1
  module Percy
2
2
  class Client
3
- VERSION = '0.2.2'
3
+ VERSION = '0.2.3'
4
4
  end
5
5
  end
@@ -0,0 +1,63 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://localhost:3000/api/v1/repos/fotinakis/percy-examples/builds/
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"data":{"type":"builds","attributes":{"commit-sha":"65478abc7f79b22365c261076cb44478714c4751","commit-branch":"master","commit-committed-at":"2015-06-08
9
+ 16:33:11 -0700","commit-author-name":"<COMMIT_AUTHOR_NAME>","commit-author-email":"<COMMIT_AUTHOR_EMAIL>","commit-committer-name":"<COMMIT_AUTHOR_NAME>","commit-committer-email":"<COMMIT_AUTHOR_EMAIL>","commit-message":"Bump
10
+ client version.","pull-request-number":"123"},"relationships":{"resources":{"data":[{"type":"resources","id":"ab9ff0a3cf38ce2c95215a9545f89d7a30c28612d0df9762cba33f72006388d9","attributes":{"resource-url":"/css/test.css","mimetype":null,"is-root":null}}]}}}}'
11
+ headers:
12
+ User-Agent:
13
+ - Faraday v0.9.1
14
+ Accept:
15
+ - "*/*"
16
+ Date:
17
+ - Wed, 10 Jun 2015 05:47:47 GMT
18
+ Content-Type:
19
+ - application/vnd.api+json
20
+ Authorization:
21
+ - Token token="<FILTERED_PERCY_TOKEN>"
22
+ response:
23
+ status:
24
+ code: 201
25
+ message: Created
26
+ headers:
27
+ Date:
28
+ - Wed, 10 Jun 2015 05:47:47 GMT
29
+ Status:
30
+ - 201 Created
31
+ Connection:
32
+ - close
33
+ X-Frame-Options:
34
+ - SAMEORIGIN
35
+ X-Xss-Protection:
36
+ - 1; mode=block
37
+ X-Content-Type-Options:
38
+ - nosniff
39
+ Access-Control-Allow-Origin:
40
+ - "*"
41
+ Access-Control-Allow-Methods:
42
+ - GET, POST, PUT, PATCH, DELETE, OPTIONS
43
+ Access-Control-Allow-Headers:
44
+ - Authorization, Content-Type
45
+ Cache-Control:
46
+ - no-cache, no-store, max-age=0, must-revalidate
47
+ Expires:
48
+ - Thu, 01 Jan 1970 00:00:00 GMT
49
+ Content-Type:
50
+ - application/json; charset=utf-8
51
+ X-Request-Id:
52
+ - bd7dd2cb-e92b-46c7-9b41-a41998b3a783
53
+ X-Runtime:
54
+ - '0.518396'
55
+ Transfer-Encoding:
56
+ - chunked
57
+ body:
58
+ encoding: UTF-8
59
+ string: '{"data":{"id":"31422","type":"builds","attributes":{"build-number":2,"state":"pending","is-pull-request":true,"pull-request-number":123,"pull-request-title":null,"approved-at":null,"created-at":"2015-06-10T05:47:47.124Z","updated-at":"2015-06-10T05:47:47.124Z"},"links":{"self":"/api/v1/builds/31422"},"relationships":{"commit":{"links":{"self":"/api/v1/builds/31422/relationships/commit","related":"/api/v1/builds/31422/commit"},"data":{"type":"commits","id":"2"}},"repo":{"links":{"self":"/api/v1/builds/31422/relationships/repo","related":"/api/v1/builds/31422/repo"}},"base-build":{"links":{"self":"/api/v1/builds/31422/relationships/base-build","related":"/api/v1/builds/31422/base-build"},"data":{"type":"builds","id":"31421"}},"approved-by":{"links":{"self":"/api/v1/builds/31422/relationships/approved-by","related":"/api/v1/builds/31422/approved-by"}},"snapshots":{"links":{"self":"/api/v1/builds/31422/relationships/snapshots","related":"/api/v1/builds/31422/snapshots"}},"comparisons":{"links":{"self":"/api/v1/builds/31422/relationships/comparisons","related":"/api/v1/builds/31422/comparisons"}},"missing-resources":{"links":{"self":"/api/v1/builds/31422/relationships/missing-resources","related":"/api/v1/builds/31422/missing-resources"},"data":[{"type":"resources","id":"ab9ff0a3cf38ce2c95215a9545f89d7a30c28612d0df9762cba33f72006388d9"}]}},"meta":{"finalize-link":"/api/v1/builds/31422/finalize","approve-link":"/api/v1/builds/31422/approve"}},"included":[{"id":"2","type":"commits","attributes":{"sha":"65478abc7f79b22365c261076cb44478714c4751","branch":"master","message":"Bump
60
+ client version.","committed-at":"2015-06-08 16:33:11 -0700","author-name":"<COMMIT_AUTHOR_NAME>","committer-name":"<COMMIT_AUTHOR_NAME>","created-at":"2015-06-10T05:47:46.000Z","updated-at":"2015-06-10T05:47:46.000Z"},"links":{"self":"/api/v1/commits/2"}},{"id":"31421","type":"builds","attributes":{"build-number":1,"state":"finished","is-pull-request":false,"pull-request-number":0,"pull-request-title":null,"approved-at":null,"created-at":"2015-06-10T05:47:46.000Z","updated-at":"2015-06-10T05:47:47.000Z"},"links":{"self":"/api/v1/builds/31421"},"relationships":{"commit":{"links":{"self":"/api/v1/builds/31421/relationships/commit","related":"/api/v1/builds/31421/commit"},"data":{"type":"commits","id":"2"}},"repo":{"links":{"self":"/api/v1/builds/31421/relationships/repo","related":"/api/v1/builds/31421/repo"}},"base-build":{"links":{"self":"/api/v1/builds/31421/relationships/base-build","related":"/api/v1/builds/31421/base-build"}},"approved-by":{"links":{"self":"/api/v1/builds/31421/relationships/approved-by","related":"/api/v1/builds/31421/approved-by"}},"snapshots":{"links":{"self":"/api/v1/builds/31421/relationships/snapshots","related":"/api/v1/builds/31421/snapshots"}},"comparisons":{"links":{"self":"/api/v1/builds/31421/relationships/comparisons","related":"/api/v1/builds/31421/comparisons"}},"missing-resources":{"links":{"self":"/api/v1/builds/31421/relationships/missing-resources","related":"/api/v1/builds/31421/missing-resources"}}},"meta":{"finalize-link":"/api/v1/builds/31421/finalize","approve-link":"/api/v1/builds/31421/approve"}},{"id":"ab9ff0a3cf38ce2c95215a9545f89d7a30c28612d0df9762cba33f72006388d9","type":"resources","attributes":{},"links":{"self":"/api/v1/resources/ab9ff0a3cf38ce2c95215a9545f89d7a30c28612d0df9762cba33f72006388d9"}}]}'
61
+ http_version:
62
+ recorded_at: Wed, 10 Jun 2015 05:47:47 GMT
63
+ recorded_with: VCR 2.9.3
@@ -5,16 +5,16 @@ http_interactions:
5
5
  uri: http://localhost:3000/api/v1/repos/fotinakis/percy-examples/builds/
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"data":{"type":"builds","attributes":{"commit-sha":"dcee2857b1e0eeb9e0edef4cd7e2146dc5cf78e2","commit-branch":"master","commit-committed-at":"2015-06-02
9
- 09:33:15 -0700","commit-author-name":"<COMMIT_AUTHOR_NAME>","commit-author-email":"<COMMIT_AUTHOR_EMAIL>","commit-committer-name":"<COMMIT_AUTHOR_NAME>","commit-committer-email":"<COMMIT_AUTHOR_EMAIL>","commit-message":"Bump
10
- version.","pull-request-number":"123"}}}'
8
+ string: '{"data":{"type":"builds","attributes":{"commit-sha":"65478abc7f79b22365c261076cb44478714c4751","commit-branch":"master","commit-committed-at":"2015-06-08
9
+ 16:33:11 -0700","commit-author-name":"<COMMIT_AUTHOR_NAME>","commit-author-email":"<COMMIT_AUTHOR_EMAIL>","commit-committer-name":"<COMMIT_AUTHOR_NAME>","commit-committer-email":"<COMMIT_AUTHOR_EMAIL>","commit-message":"Bump
10
+ client version.","pull-request-number":"123"}}}'
11
11
  headers:
12
12
  User-Agent:
13
13
  - Faraday v0.9.1
14
14
  Accept:
15
15
  - "*/*"
16
16
  Date:
17
- - Wed, 03 Jun 2015 17:55:09 GMT
17
+ - Wed, 10 Jun 2015 05:47:47 GMT
18
18
  Content-Type:
19
19
  - application/vnd.api+json
20
20
  Authorization:
@@ -22,8 +22,14 @@ http_interactions:
22
22
  response:
23
23
  status:
24
24
  code: 201
25
- message: 'Created '
25
+ message: Created
26
26
  headers:
27
+ Date:
28
+ - Wed, 10 Jun 2015 05:47:48 GMT
29
+ Status:
30
+ - 201 Created
31
+ Connection:
32
+ - close
27
33
  X-Frame-Options:
28
34
  - SAMEORIGIN
29
35
  X-Xss-Protection:
@@ -43,21 +49,15 @@ http_interactions:
43
49
  Content-Type:
44
50
  - application/json; charset=utf-8
45
51
  X-Request-Id:
46
- - e1f7a6ea-d16e-4669-9284-8e49374b96df
52
+ - 1aff50d1-46bc-4c99-bd95-fbc9af6697fa
47
53
  X-Runtime:
48
- - '0.426916'
49
- Server:
50
- - WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
51
- Date:
52
- - Wed, 03 Jun 2015 17:55:10 GMT
53
- Content-Length:
54
- - '2679'
55
- Connection:
56
- - Keep-Alive
54
+ - '0.437441'
55
+ Transfer-Encoding:
56
+ - chunked
57
57
  body:
58
58
  encoding: UTF-8
59
- string: '{"data":{"id":"31433","type":"builds","attributes":{"build-number":5,"state":"pending","is-pull-request":true,"pull-request-number":123,"pull-request-title":null,"approved-at":null,"created-at":"2015-06-03T17:55:10.000Z","updated-at":"2015-06-03T17:55:10.000Z"},"links":{"self":"/api/v1/builds/31433"},"relationships":{"commit":{"links":{"self":"/api/v1/builds/31433/links/commit","related":"/api/v1/builds/31433/commit"},"data":{"type":"commits","id":"3"}},"repo":{"links":{"self":"/api/v1/builds/31433/links/repo","related":"/api/v1/builds/31433/repo"}},"base-build":{"links":{"self":"/api/v1/builds/31433/links/base-build","related":"/api/v1/builds/31433/base-build"},"data":{"type":"builds","id":"31432"}},"approved-by":{"links":{"self":"/api/v1/builds/31433/links/approved-by","related":"/api/v1/builds/31433/approved-by"}},"snapshots":{"links":{"self":"/api/v1/builds/31433/links/snapshots","related":"/api/v1/builds/31433/snapshots"}},"comparisons":{"links":{"self":"/api/v1/builds/31433/links/comparisons","related":"/api/v1/builds/31433/comparisons"}}},"meta":{"finalize-link":"/api/v1/builds/31433/finalize","approve-link":"/api/v1/builds/31433/approve"}},"included":[{"id":"3","type":"commits","attributes":{"sha":"dcee2857b1e0eeb9e0edef4cd7e2146dc5cf78e2","branch":"master","message":"Bump
60
- version.","committed-at":"2015-06-02 09:33:15 -0700","author-name":"<COMMIT_AUTHOR_NAME>","committer-name":"<COMMIT_AUTHOR_NAME>","created-at":"2015-06-03T17:55:08.000Z","updated-at":"2015-06-03T17:55:08.000Z"},"links":{"self":"/api/v1/commits/3"},"relationships":{}},{"id":"31432","type":"builds","attributes":{"build-number":4,"state":"finished","is-pull-request":false,"pull-request-number":0,"pull-request-title":null,"approved-at":null,"created-at":"2015-06-03T17:55:09.000Z","updated-at":"2015-06-03T17:55:09.000Z"},"links":{"self":"/api/v1/builds/31432"},"relationships":{"commit":{"links":{"self":"/api/v1/builds/31432/links/commit","related":"/api/v1/builds/31432/commit"},"data":{"type":"commits","id":"3"}},"repo":{"links":{"self":"/api/v1/builds/31432/links/repo","related":"/api/v1/builds/31432/repo"}},"base-build":{"links":{"self":"/api/v1/builds/31432/links/base-build","related":"/api/v1/builds/31432/base-build"}},"approved-by":{"links":{"self":"/api/v1/builds/31432/links/approved-by","related":"/api/v1/builds/31432/approved-by"}},"snapshots":{"links":{"self":"/api/v1/builds/31432/links/snapshots","related":"/api/v1/builds/31432/snapshots"}},"comparisons":{"links":{"self":"/api/v1/builds/31432/links/comparisons","related":"/api/v1/builds/31432/comparisons"}}},"meta":{"finalize-link":"/api/v1/builds/31432/finalize","approve-link":"/api/v1/builds/31432/approve"}}]}'
59
+ string: '{"data":{"id":"31423","type":"builds","attributes":{"build-number":3,"state":"pending","is-pull-request":true,"pull-request-number":123,"pull-request-title":null,"approved-at":null,"created-at":"2015-06-10T05:47:47.682Z","updated-at":"2015-06-10T05:47:47.682Z"},"links":{"self":"/api/v1/builds/31423"},"relationships":{"commit":{"links":{"self":"/api/v1/builds/31423/relationships/commit","related":"/api/v1/builds/31423/commit"},"data":{"type":"commits","id":"2"}},"repo":{"links":{"self":"/api/v1/builds/31423/relationships/repo","related":"/api/v1/builds/31423/repo"}},"base-build":{"links":{"self":"/api/v1/builds/31423/relationships/base-build","related":"/api/v1/builds/31423/base-build"},"data":{"type":"builds","id":"31421"}},"approved-by":{"links":{"self":"/api/v1/builds/31423/relationships/approved-by","related":"/api/v1/builds/31423/approved-by"}},"snapshots":{"links":{"self":"/api/v1/builds/31423/relationships/snapshots","related":"/api/v1/builds/31423/snapshots"}},"comparisons":{"links":{"self":"/api/v1/builds/31423/relationships/comparisons","related":"/api/v1/builds/31423/comparisons"}},"missing-resources":{"links":{"self":"/api/v1/builds/31423/relationships/missing-resources","related":"/api/v1/builds/31423/missing-resources"}}},"meta":{"finalize-link":"/api/v1/builds/31423/finalize","approve-link":"/api/v1/builds/31423/approve"}},"included":[{"id":"2","type":"commits","attributes":{"sha":"65478abc7f79b22365c261076cb44478714c4751","branch":"master","message":"Bump
60
+ client version.","committed-at":"2015-06-08 16:33:11 -0700","author-name":"<COMMIT_AUTHOR_NAME>","committer-name":"<COMMIT_AUTHOR_NAME>","created-at":"2015-06-10T05:47:46.000Z","updated-at":"2015-06-10T05:47:46.000Z"},"links":{"self":"/api/v1/commits/2"}},{"id":"31421","type":"builds","attributes":{"build-number":1,"state":"finished","is-pull-request":false,"pull-request-number":0,"pull-request-title":null,"approved-at":null,"created-at":"2015-06-10T05:47:46.000Z","updated-at":"2015-06-10T05:47:47.000Z"},"links":{"self":"/api/v1/builds/31421"},"relationships":{"commit":{"links":{"self":"/api/v1/builds/31421/relationships/commit","related":"/api/v1/builds/31421/commit"},"data":{"type":"commits","id":"2"}},"repo":{"links":{"self":"/api/v1/builds/31421/relationships/repo","related":"/api/v1/builds/31421/repo"}},"base-build":{"links":{"self":"/api/v1/builds/31421/relationships/base-build","related":"/api/v1/builds/31421/base-build"}},"approved-by":{"links":{"self":"/api/v1/builds/31421/relationships/approved-by","related":"/api/v1/builds/31421/approved-by"}},"snapshots":{"links":{"self":"/api/v1/builds/31421/relationships/snapshots","related":"/api/v1/builds/31421/snapshots"}},"comparisons":{"links":{"self":"/api/v1/builds/31421/relationships/comparisons","related":"/api/v1/builds/31421/comparisons"}},"missing-resources":{"links":{"self":"/api/v1/builds/31421/relationships/missing-resources","related":"/api/v1/builds/31421/missing-resources"}}},"meta":{"finalize-link":"/api/v1/builds/31421/finalize","approve-link":"/api/v1/builds/31421/approve"}}]}'
61
61
  http_version:
62
- recorded_at: Wed, 03 Jun 2015 17:55:10 GMT
62
+ recorded_at: Wed, 10 Jun 2015 05:47:48 GMT
63
63
  recorded_with: VCR 2.9.3
@@ -5,16 +5,16 @@ http_interactions:
5
5
  uri: http://localhost:3000/api/v1/repos/fotinakis/percy-examples/builds/
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"data":{"type":"builds","attributes":{"commit-sha":"dcee2857b1e0eeb9e0edef4cd7e2146dc5cf78e2","commit-branch":"master","commit-committed-at":"2015-06-02
9
- 09:33:15 -0700","commit-author-name":"<COMMIT_AUTHOR_NAME>","commit-author-email":"<COMMIT_AUTHOR_EMAIL>","commit-committer-name":"<COMMIT_AUTHOR_NAME>","commit-committer-email":"<COMMIT_AUTHOR_EMAIL>","commit-message":"Bump
10
- version.","pull-request-number":null}}}'
8
+ string: '{"data":{"type":"builds","attributes":{"commit-sha":"65478abc7f79b22365c261076cb44478714c4751","commit-branch":"master","commit-committed-at":"2015-06-08
9
+ 16:33:11 -0700","commit-author-name":"<COMMIT_AUTHOR_NAME>","commit-author-email":"<COMMIT_AUTHOR_EMAIL>","commit-committer-name":"<COMMIT_AUTHOR_NAME>","commit-committer-email":"<COMMIT_AUTHOR_EMAIL>","commit-message":"Bump
10
+ client version.","pull-request-number":null}}}'
11
11
  headers:
12
12
  User-Agent:
13
13
  - Faraday v0.9.1
14
14
  Accept:
15
15
  - "*/*"
16
16
  Date:
17
- - Wed, 03 Jun 2015 17:55:09 GMT
17
+ - Wed, 10 Jun 2015 05:47:46 GMT
18
18
  Content-Type:
19
19
  - application/vnd.api+json
20
20
  Authorization:
@@ -22,8 +22,14 @@ http_interactions:
22
22
  response:
23
23
  status:
24
24
  code: 201
25
- message: 'Created '
25
+ message: Created
26
26
  headers:
27
+ Date:
28
+ - Wed, 10 Jun 2015 05:47:46 GMT
29
+ Status:
30
+ - 201 Created
31
+ Connection:
32
+ - close
27
33
  X-Frame-Options:
28
34
  - SAMEORIGIN
29
35
  X-Xss-Protection:
@@ -43,26 +49,20 @@ http_interactions:
43
49
  Content-Type:
44
50
  - application/json; charset=utf-8
45
51
  X-Request-Id:
46
- - bad56fef-536f-49c7-8ea7-4c9774f95263
52
+ - 3041884c-5f5f-48cd-9760-76da566aeeed
47
53
  X-Runtime:
48
- - '0.019091'
49
- Server:
50
- - WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
51
- Date:
52
- - Wed, 03 Jun 2015 17:55:09 GMT
53
- Content-Length:
54
- - '1532'
55
- Connection:
56
- - Keep-Alive
54
+ - '0.105519'
55
+ Transfer-Encoding:
56
+ - chunked
57
57
  body:
58
58
  encoding: UTF-8
59
- string: '{"data":{"id":"31432","type":"builds","attributes":{"build-number":4,"state":"pending","is-pull-request":false,"pull-request-number":0,"pull-request-title":null,"approved-at":null,"created-at":"2015-06-03T17:55:09.898Z","updated-at":"2015-06-03T17:55:09.898Z"},"links":{"self":"/api/v1/builds/31432"},"relationships":{"commit":{"links":{"self":"/api/v1/builds/31432/links/commit","related":"/api/v1/builds/31432/commit"},"data":{"type":"commits","id":"3"}},"repo":{"links":{"self":"/api/v1/builds/31432/links/repo","related":"/api/v1/builds/31432/repo"}},"base-build":{"links":{"self":"/api/v1/builds/31432/links/base-build","related":"/api/v1/builds/31432/base-build"},"data":null},"approved-by":{"links":{"self":"/api/v1/builds/31432/links/approved-by","related":"/api/v1/builds/31432/approved-by"}},"snapshots":{"links":{"self":"/api/v1/builds/31432/links/snapshots","related":"/api/v1/builds/31432/snapshots"}},"comparisons":{"links":{"self":"/api/v1/builds/31432/links/comparisons","related":"/api/v1/builds/31432/comparisons"}}},"meta":{"finalize-link":"/api/v1/builds/31432/finalize","approve-link":"/api/v1/builds/31432/approve"}},"included":[{"id":"3","type":"commits","attributes":{"sha":"dcee2857b1e0eeb9e0edef4cd7e2146dc5cf78e2","branch":"master","message":"Bump
60
- version.","committed-at":"2015-06-02 09:33:15 -0700","author-name":"<COMMIT_AUTHOR_NAME>","committer-name":"<COMMIT_AUTHOR_NAME>","created-at":"2015-06-03T17:55:08.000Z","updated-at":"2015-06-03T17:55:08.000Z"},"links":{"self":"/api/v1/commits/3"},"relationships":{}}]}'
59
+ string: '{"data":{"id":"31421","type":"builds","attributes":{"build-number":1,"state":"pending","is-pull-request":false,"pull-request-number":0,"pull-request-title":null,"approved-at":null,"created-at":"2015-06-10T05:47:46.952Z","updated-at":"2015-06-10T05:47:46.952Z"},"links":{"self":"/api/v1/builds/31421"},"relationships":{"commit":{"links":{"self":"/api/v1/builds/31421/relationships/commit","related":"/api/v1/builds/31421/commit"},"data":{"type":"commits","id":"2"}},"repo":{"links":{"self":"/api/v1/builds/31421/relationships/repo","related":"/api/v1/builds/31421/repo"}},"base-build":{"links":{"self":"/api/v1/builds/31421/relationships/base-build","related":"/api/v1/builds/31421/base-build"},"data":null},"approved-by":{"links":{"self":"/api/v1/builds/31421/relationships/approved-by","related":"/api/v1/builds/31421/approved-by"}},"snapshots":{"links":{"self":"/api/v1/builds/31421/relationships/snapshots","related":"/api/v1/builds/31421/snapshots"}},"comparisons":{"links":{"self":"/api/v1/builds/31421/relationships/comparisons","related":"/api/v1/builds/31421/comparisons"}},"missing-resources":{"links":{"self":"/api/v1/builds/31421/relationships/missing-resources","related":"/api/v1/builds/31421/missing-resources"}}},"meta":{"finalize-link":"/api/v1/builds/31421/finalize","approve-link":"/api/v1/builds/31421/approve"}},"included":[{"id":"2","type":"commits","attributes":{"sha":"65478abc7f79b22365c261076cb44478714c4751","branch":"master","message":"Bump
60
+ client version.","committed-at":"2015-06-08 16:33:11 -0700","author-name":"<COMMIT_AUTHOR_NAME>","committer-name":"<COMMIT_AUTHOR_NAME>","created-at":"2015-06-10T05:47:46.944Z","updated-at":"2015-06-10T05:47:46.944Z"},"links":{"self":"/api/v1/commits/2"}}]}'
61
61
  http_version:
62
- recorded_at: Wed, 03 Jun 2015 17:55:09 GMT
62
+ recorded_at: Wed, 10 Jun 2015 05:47:46 GMT
63
63
  - request:
64
64
  method: post
65
- uri: http://localhost:3000/api/v1/builds/31432/finalize
65
+ uri: http://localhost:3000/api/v1/builds/31421/finalize
66
66
  body:
67
67
  encoding: UTF-8
68
68
  string: "{}"
@@ -72,7 +72,7 @@ http_interactions:
72
72
  Accept:
73
73
  - "*/*"
74
74
  Date:
75
- - Wed, 03 Jun 2015 17:55:09 GMT
75
+ - Wed, 10 Jun 2015 05:47:46 GMT
76
76
  Content-Type:
77
77
  - application/vnd.api+json
78
78
  Authorization:
@@ -80,8 +80,14 @@ http_interactions:
80
80
  response:
81
81
  status:
82
82
  code: 200
83
- message: 'OK '
83
+ message: OK
84
84
  headers:
85
+ Date:
86
+ - Wed, 10 Jun 2015 05:47:47 GMT
87
+ Status:
88
+ - 200 OK
89
+ Connection:
90
+ - close
85
91
  X-Frame-Options:
86
92
  - SAMEORIGIN
87
93
  X-Xss-Protection:
@@ -101,20 +107,14 @@ http_interactions:
101
107
  Content-Type:
102
108
  - application/json; charset=utf-8
103
109
  X-Request-Id:
104
- - 36d2b625-821f-4d62-8491-17c7572d7dfe
110
+ - e7683121-641a-4b3e-8131-c6f2a4b296b7
105
111
  X-Runtime:
106
- - '0.013637'
107
- Server:
108
- - WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
109
- Date:
110
- - Wed, 03 Jun 2015 17:55:09 GMT
111
- Content-Length:
112
- - '16'
113
- Connection:
114
- - Keep-Alive
112
+ - '0.059485'
113
+ Transfer-Encoding:
114
+ - chunked
115
115
  body:
116
116
  encoding: UTF-8
117
117
  string: '{"success":true}'
118
118
  http_version:
119
- recorded_at: Wed, 03 Jun 2015 17:55:09 GMT
119
+ recorded_at: Wed, 10 Jun 2015 05:47:47 GMT
120
120
  recorded_with: VCR 2.9.3
@@ -5,16 +5,16 @@ http_interactions:
5
5
  uri: http://localhost:3000/api/v1/repos/fotinakis/percy-examples/builds/
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"data":{"type":"builds","attributes":{"commit-sha":"dcee2857b1e0eeb9e0edef4cd7e2146dc5cf78e2","commit-branch":"master","commit-committed-at":"2015-06-02
9
- 09:33:15 -0700","commit-author-name":"<COMMIT_AUTHOR_NAME>","commit-author-email":"<COMMIT_AUTHOR_EMAIL>","commit-committer-name":"<COMMIT_AUTHOR_NAME>","commit-committer-email":"<COMMIT_AUTHOR_EMAIL>","commit-message":"Bump
10
- version.","pull-request-number":null}}}'
8
+ string: '{"data":{"type":"builds","attributes":{"commit-sha":"65478abc7f79b22365c261076cb44478714c4751","commit-branch":"master","commit-committed-at":"2015-06-08
9
+ 16:33:11 -0700","commit-author-name":"<COMMIT_AUTHOR_NAME>","commit-author-email":"<COMMIT_AUTHOR_EMAIL>","commit-committer-name":"<COMMIT_AUTHOR_NAME>","commit-committer-email":"<COMMIT_AUTHOR_EMAIL>","commit-message":"Bump
10
+ client version.","pull-request-number":null}}}'
11
11
  headers:
12
12
  User-Agent:
13
13
  - Faraday v0.9.1
14
14
  Accept:
15
15
  - "*/*"
16
16
  Date:
17
- - Wed, 03 Jun 2015 17:55:09 GMT
17
+ - Wed, 10 Jun 2015 05:47:48 GMT
18
18
  Content-Type:
19
19
  - application/vnd.api+json
20
20
  Authorization:
@@ -22,8 +22,14 @@ http_interactions:
22
22
  response:
23
23
  status:
24
24
  code: 201
25
- message: 'Created '
25
+ message: Created
26
26
  headers:
27
+ Date:
28
+ - Wed, 10 Jun 2015 05:47:48 GMT
29
+ Status:
30
+ - 201 Created
31
+ Connection:
32
+ - close
27
33
  X-Frame-Options:
28
34
  - SAMEORIGIN
29
35
  X-Xss-Protection:
@@ -43,36 +49,30 @@ http_interactions:
43
49
  Content-Type:
44
50
  - application/json; charset=utf-8
45
51
  X-Request-Id:
46
- - 9daaf4dc-dd4d-42a4-a38b-9fefae046293
52
+ - 7366b3ff-cf23-4afc-8a03-57c7145faa15
47
53
  X-Runtime:
48
- - '0.015386'
49
- Server:
50
- - WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
51
- Date:
52
- - Wed, 03 Jun 2015 17:55:09 GMT
53
- Content-Length:
54
- - '1532'
55
- Connection:
56
- - Keep-Alive
54
+ - '0.067419'
55
+ Transfer-Encoding:
56
+ - chunked
57
57
  body:
58
58
  encoding: UTF-8
59
- string: '{"data":{"id":"31431","type":"builds","attributes":{"build-number":3,"state":"pending","is-pull-request":false,"pull-request-number":0,"pull-request-title":null,"approved-at":null,"created-at":"2015-06-03T17:55:09.065Z","updated-at":"2015-06-03T17:55:09.065Z"},"links":{"self":"/api/v1/builds/31431"},"relationships":{"commit":{"links":{"self":"/api/v1/builds/31431/links/commit","related":"/api/v1/builds/31431/commit"},"data":{"type":"commits","id":"3"}},"repo":{"links":{"self":"/api/v1/builds/31431/links/repo","related":"/api/v1/builds/31431/repo"}},"base-build":{"links":{"self":"/api/v1/builds/31431/links/base-build","related":"/api/v1/builds/31431/base-build"},"data":null},"approved-by":{"links":{"self":"/api/v1/builds/31431/links/approved-by","related":"/api/v1/builds/31431/approved-by"}},"snapshots":{"links":{"self":"/api/v1/builds/31431/links/snapshots","related":"/api/v1/builds/31431/snapshots"}},"comparisons":{"links":{"self":"/api/v1/builds/31431/links/comparisons","related":"/api/v1/builds/31431/comparisons"}}},"meta":{"finalize-link":"/api/v1/builds/31431/finalize","approve-link":"/api/v1/builds/31431/approve"}},"included":[{"id":"3","type":"commits","attributes":{"sha":"dcee2857b1e0eeb9e0edef4cd7e2146dc5cf78e2","branch":"master","message":"Bump
60
- version.","committed-at":"2015-06-02 09:33:15 -0700","author-name":"<COMMIT_AUTHOR_NAME>","committer-name":"<COMMIT_AUTHOR_NAME>","created-at":"2015-06-03T17:55:08.000Z","updated-at":"2015-06-03T17:55:08.000Z"},"links":{"self":"/api/v1/commits/3"},"relationships":{}}]}'
59
+ string: '{"data":{"id":"31424","type":"builds","attributes":{"build-number":4,"state":"pending","is-pull-request":false,"pull-request-number":0,"pull-request-title":null,"approved-at":null,"created-at":"2015-06-10T05:47:48.210Z","updated-at":"2015-06-10T05:47:48.210Z"},"links":{"self":"/api/v1/builds/31424"},"relationships":{"commit":{"links":{"self":"/api/v1/builds/31424/relationships/commit","related":"/api/v1/builds/31424/commit"},"data":{"type":"commits","id":"2"}},"repo":{"links":{"self":"/api/v1/builds/31424/relationships/repo","related":"/api/v1/builds/31424/repo"}},"base-build":{"links":{"self":"/api/v1/builds/31424/relationships/base-build","related":"/api/v1/builds/31424/base-build"},"data":{"type":"builds","id":"31421"}},"approved-by":{"links":{"self":"/api/v1/builds/31424/relationships/approved-by","related":"/api/v1/builds/31424/approved-by"}},"snapshots":{"links":{"self":"/api/v1/builds/31424/relationships/snapshots","related":"/api/v1/builds/31424/snapshots"}},"comparisons":{"links":{"self":"/api/v1/builds/31424/relationships/comparisons","related":"/api/v1/builds/31424/comparisons"}},"missing-resources":{"links":{"self":"/api/v1/builds/31424/relationships/missing-resources","related":"/api/v1/builds/31424/missing-resources"}}},"meta":{"finalize-link":"/api/v1/builds/31424/finalize","approve-link":"/api/v1/builds/31424/approve"}},"included":[{"id":"2","type":"commits","attributes":{"sha":"65478abc7f79b22365c261076cb44478714c4751","branch":"master","message":"Bump
60
+ client version.","committed-at":"2015-06-08 16:33:11 -0700","author-name":"<COMMIT_AUTHOR_NAME>","committer-name":"<COMMIT_AUTHOR_NAME>","created-at":"2015-06-10T05:47:46.000Z","updated-at":"2015-06-10T05:47:46.000Z"},"links":{"self":"/api/v1/commits/2"}},{"id":"31421","type":"builds","attributes":{"build-number":1,"state":"finished","is-pull-request":false,"pull-request-number":0,"pull-request-title":null,"approved-at":null,"created-at":"2015-06-10T05:47:46.000Z","updated-at":"2015-06-10T05:47:47.000Z"},"links":{"self":"/api/v1/builds/31421"},"relationships":{"commit":{"links":{"self":"/api/v1/builds/31421/relationships/commit","related":"/api/v1/builds/31421/commit"},"data":{"type":"commits","id":"2"}},"repo":{"links":{"self":"/api/v1/builds/31421/relationships/repo","related":"/api/v1/builds/31421/repo"}},"base-build":{"links":{"self":"/api/v1/builds/31421/relationships/base-build","related":"/api/v1/builds/31421/base-build"}},"approved-by":{"links":{"self":"/api/v1/builds/31421/relationships/approved-by","related":"/api/v1/builds/31421/approved-by"}},"snapshots":{"links":{"self":"/api/v1/builds/31421/relationships/snapshots","related":"/api/v1/builds/31421/snapshots"}},"comparisons":{"links":{"self":"/api/v1/builds/31421/relationships/comparisons","related":"/api/v1/builds/31421/comparisons"}},"missing-resources":{"links":{"self":"/api/v1/builds/31421/relationships/missing-resources","related":"/api/v1/builds/31421/missing-resources"}}},"meta":{"finalize-link":"/api/v1/builds/31421/finalize","approve-link":"/api/v1/builds/31421/approve"}}]}'
61
61
  http_version:
62
- recorded_at: Wed, 03 Jun 2015 17:55:09 GMT
62
+ recorded_at: Wed, 10 Jun 2015 05:47:48 GMT
63
63
  - request:
64
64
  method: post
65
- uri: http://localhost:3000/api/v1/builds/31431/snapshots/
65
+ uri: http://localhost:3000/api/v1/builds/31424/snapshots/
66
66
  body:
67
67
  encoding: UTF-8
68
- string: '{"data":{"type":"snapshots","attributes":{"name":"homepage"},"relationships":{"resources":{"data":[{"type":"resources","id":"7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9","attributes":{"resource-url":"/foo/test.html","mimetype":null,"is-root":true}}]}}}}'
68
+ string: '{"data":{"type":"snapshots","attributes":{"name":"homepage"},"relationships":{"resources":{"data":[{"type":"resources","id":"b53960b166ed18f5ef9c65e387ce43f31b3e233b2732dd9e8e143058a7271369","attributes":{"resource-url":"/foo/test.html","mimetype":null,"is-root":true}}]}}}}'
69
69
  headers:
70
70
  User-Agent:
71
71
  - Faraday v0.9.1
72
72
  Accept:
73
73
  - "*/*"
74
74
  Date:
75
- - Wed, 03 Jun 2015 17:55:09 GMT
75
+ - Wed, 10 Jun 2015 05:47:48 GMT
76
76
  Content-Type:
77
77
  - application/vnd.api+json
78
78
  Authorization:
@@ -80,8 +80,14 @@ http_interactions:
80
80
  response:
81
81
  status:
82
82
  code: 201
83
- message: 'Created '
83
+ message: Created
84
84
  headers:
85
+ Date:
86
+ - Wed, 10 Jun 2015 05:47:48 GMT
87
+ Status:
88
+ - 201 Created
89
+ Connection:
90
+ - close
85
91
  X-Frame-Options:
86
92
  - SAMEORIGIN
87
93
  X-Xss-Protection:
@@ -101,35 +107,29 @@ http_interactions:
101
107
  Content-Type:
102
108
  - application/json; charset=utf-8
103
109
  X-Request-Id:
104
- - 0f0ade8f-0d47-4eb7-97e8-c1de8f117907
110
+ - 07ca2efe-71bc-4770-a2e7-b422be5e9e3b
105
111
  X-Runtime:
106
- - '0.028199'
107
- Server:
108
- - WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
109
- Date:
110
- - Wed, 03 Jun 2015 17:55:09 GMT
111
- Content-Length:
112
- - '1574'
113
- Connection:
114
- - Keep-Alive
112
+ - '0.024594'
113
+ Transfer-Encoding:
114
+ - chunked
115
115
  body:
116
116
  encoding: UTF-8
117
- string: '{"data":{"id":"29","type":"snapshots","attributes":{"name":"homepage","created-at":"2015-06-03T17:55:09.085Z","updated-at":"2015-06-03T17:55:09.085Z","finished-processing-at":null},"links":{"self":"/api/v1/snapshots/29"},"relationships":{"build":{"links":{"self":"/api/v1/snapshots/29/links/build","related":"/api/v1/snapshots/29/build"}},"screenshots":{"links":{"self":"/api/v1/snapshots/29/links/screenshots","related":"/api/v1/snapshots/29/screenshots"}},"resources":{"links":{"self":"/api/v1/snapshots/29/links/resources","related":"/api/v1/snapshots/29/resources"},"data":[{"type":"resources","id":"7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9"}]},"missing-resources":{"links":{"self":"/api/v1/snapshots/29/links/missing-resources","related":"/api/v1/snapshots/29/missing-resources"},"data":[{"type":"resources","id":"7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9"}]}}},"included":[{"id":"7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9","type":"resources","attributes":{"is-root":true,"resource-url":"http://localhost/foo/test.html","mimetype":"text/html","uploaded-at":null,"created-at":"2015-06-03T17:55:09.000Z","updated-at":"2015-06-03T17:55:09.000Z"},"links":{"self":"/api/v1/resources/7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9"},"relationships":{"snapshot":{"links":{"self":"/api/v1/resources/7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9/links/snapshot","related":"/api/v1/resources/7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9/snapshot"}}}}]}'
117
+ string: '{"data":{"id":"3","type":"snapshots","attributes":{"name":"homepage","created-at":"2015-06-10T05:47:48.251Z","updated-at":"2015-06-10T05:47:48.251Z","finished-processing-at":null},"links":{"self":"/api/v1/snapshots/3"},"relationships":{"build":{"links":{"self":"/api/v1/snapshots/3/relationships/build","related":"/api/v1/snapshots/3/build"}},"screenshots":{"links":{"self":"/api/v1/snapshots/3/relationships/screenshots","related":"/api/v1/snapshots/3/screenshots"}},"missing-resources":{"links":{"self":"/api/v1/snapshots/3/relationships/missing-resources","related":"/api/v1/snapshots/3/missing-resources"},"data":[{"type":"resources","id":"b53960b166ed18f5ef9c65e387ce43f31b3e233b2732dd9e8e143058a7271369"}]}}},"included":[{"id":"b53960b166ed18f5ef9c65e387ce43f31b3e233b2732dd9e8e143058a7271369","type":"resources","attributes":{},"links":{"self":"/api/v1/resources/b53960b166ed18f5ef9c65e387ce43f31b3e233b2732dd9e8e143058a7271369"}}]}'
118
118
  http_version:
119
- recorded_at: Wed, 03 Jun 2015 17:55:09 GMT
119
+ recorded_at: Wed, 10 Jun 2015 05:47:48 GMT
120
120
  - request:
121
121
  method: post
122
- uri: http://localhost:3000/api/v1/builds/31431/resources/
122
+ uri: http://localhost:3000/api/v1/builds/31424/resources/
123
123
  body:
124
124
  encoding: UTF-8
125
- string: '{"data":{"type":"resources","attributes":{"id":"7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9","base64-content":"aGVsbG8gd29ybGQh"}}}'
125
+ string: '{"data":{"type":"resources","attributes":{"id":"b53960b166ed18f5ef9c65e387ce43f31b3e233b2732dd9e8e143058a7271369","base64-content":"aGVsbG8gd29ybGQhIC9Vc2Vycy9mb3RpbmFraXMvc3JjL3BlcmN5LWNsaWVudC9zcGVjL2xpYi9wZXJjeS9jbGllbnQvcmVzb3VyY2VzX3NwZWMucmI="}}}'
126
126
  headers:
127
127
  User-Agent:
128
128
  - Faraday v0.9.1
129
129
  Accept:
130
130
  - "*/*"
131
131
  Date:
132
- - Wed, 03 Jun 2015 17:55:09 GMT
132
+ - Wed, 10 Jun 2015 05:47:48 GMT
133
133
  Content-Type:
134
134
  - application/vnd.api+json
135
135
  Authorization:
@@ -137,8 +137,14 @@ http_interactions:
137
137
  response:
138
138
  status:
139
139
  code: 201
140
- message: 'Created '
140
+ message: Created
141
141
  headers:
142
+ Date:
143
+ - Wed, 10 Jun 2015 05:47:49 GMT
144
+ Status:
145
+ - 201 Created
146
+ Connection:
147
+ - close
142
148
  X-Frame-Options:
143
149
  - SAMEORIGIN
144
150
  X-Xss-Protection:
@@ -158,35 +164,29 @@ http_interactions:
158
164
  Content-Type:
159
165
  - application/json; charset=utf-8
160
166
  X-Request-Id:
161
- - fabf556e-c36a-4982-bae8-4d3e0eb6f279
167
+ - 40daddeb-0add-4f2a-8d14-758b43be8589
162
168
  X-Runtime:
163
- - '0.623360'
164
- Server:
165
- - WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
166
- Date:
167
- - Wed, 03 Jun 2015 17:55:09 GMT
168
- Content-Length:
169
- - '16'
170
- Connection:
171
- - Keep-Alive
169
+ - '1.314255'
170
+ Transfer-Encoding:
171
+ - chunked
172
172
  body:
173
173
  encoding: UTF-8
174
174
  string: '{"success":true}'
175
175
  http_version:
176
- recorded_at: Wed, 03 Jun 2015 17:55:09 GMT
176
+ recorded_at: Wed, 10 Jun 2015 05:47:49 GMT
177
177
  - request:
178
178
  method: post
179
- uri: http://localhost:3000/api/v1/builds/31431/resources/
179
+ uri: http://localhost:3000/api/v1/builds/31424/resources/
180
180
  body:
181
181
  encoding: UTF-8
182
- string: '{"data":{"type":"resources","attributes":{"id":"7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9","base64-content":"aGVsbG8gd29ybGQh"}}}'
182
+ string: '{"data":{"type":"resources","attributes":{"id":"b53960b166ed18f5ef9c65e387ce43f31b3e233b2732dd9e8e143058a7271369","base64-content":"aGVsbG8gd29ybGQhIC9Vc2Vycy9mb3RpbmFraXMvc3JjL3BlcmN5LWNsaWVudC9zcGVjL2xpYi9wZXJjeS9jbGllbnQvcmVzb3VyY2VzX3NwZWMucmI="}}}'
183
183
  headers:
184
184
  User-Agent:
185
185
  - Faraday v0.9.1
186
186
  Accept:
187
187
  - "*/*"
188
188
  Date:
189
- - Wed, 03 Jun 2015 17:55:09 GMT
189
+ - Wed, 10 Jun 2015 05:47:49 GMT
190
190
  Content-Type:
191
191
  - application/vnd.api+json
192
192
  Authorization:
@@ -194,8 +194,14 @@ http_interactions:
194
194
  response:
195
195
  status:
196
196
  code: 409
197
- message: 'Conflict '
197
+ message: Conflict
198
198
  headers:
199
+ Date:
200
+ - Wed, 10 Jun 2015 05:47:49 GMT
201
+ Status:
202
+ - 409 Conflict
203
+ Connection:
204
+ - close
199
205
  X-Frame-Options:
200
206
  - SAMEORIGIN
201
207
  X-Xss-Protection:
@@ -215,22 +221,16 @@ http_interactions:
215
221
  Content-Type:
216
222
  - application/json; charset=utf-8
217
223
  X-Request-Id:
218
- - 7a0a279e-f6bf-4e7a-9c23-a89c18676b6e
224
+ - 30a89483-bcda-4254-9fec-a8ad52c0cace
219
225
  X-Runtime:
220
- - '0.007378'
221
- Server:
222
- - WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
223
- Date:
224
- - Wed, 03 Jun 2015 17:55:09 GMT
225
- Content-Length:
226
- - '165'
227
- Connection:
228
- - Keep-Alive
226
+ - '0.028442'
227
+ Transfer-Encoding:
228
+ - chunked
229
229
  body:
230
230
  encoding: UTF-8
231
231
  string: '{"errors":[{"status":"conflict","detail":"Upload failed, resource with
232
- SHA-256 ''7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9''
232
+ SHA-256 ''b53960b166ed18f5ef9c65e387ce43f31b3e233b2732dd9e8e143058a7271369''
233
233
  already exists."}]}'
234
234
  http_version:
235
- recorded_at: Wed, 03 Jun 2015 17:55:09 GMT
235
+ recorded_at: Wed, 10 Jun 2015 05:47:49 GMT
236
236
  recorded_with: VCR 2.9.3
@@ -5,16 +5,16 @@ http_interactions:
5
5
  uri: http://localhost:3000/api/v1/repos/fotinakis/percy-examples/builds/
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"data":{"type":"builds","attributes":{"commit-sha":"dcee2857b1e0eeb9e0edef4cd7e2146dc5cf78e2","commit-branch":"master","commit-committed-at":"2015-06-02
9
- 09:33:15 -0700","commit-author-name":"<COMMIT_AUTHOR_NAME>","commit-author-email":"<COMMIT_AUTHOR_EMAIL>","commit-committer-name":"<COMMIT_AUTHOR_NAME>","commit-committer-email":"<COMMIT_AUTHOR_EMAIL>","commit-message":"Bump
10
- version.","pull-request-number":null}}}'
8
+ string: '{"data":{"type":"builds","attributes":{"commit-sha":"65478abc7f79b22365c261076cb44478714c4751","commit-branch":"master","commit-committed-at":"2015-06-08
9
+ 16:33:11 -0700","commit-author-name":"<COMMIT_AUTHOR_NAME>","commit-author-email":"<COMMIT_AUTHOR_EMAIL>","commit-committer-name":"<COMMIT_AUTHOR_NAME>","commit-committer-email":"<COMMIT_AUTHOR_EMAIL>","commit-message":"Bump
10
+ client version.","pull-request-number":null}}}'
11
11
  headers:
12
12
  User-Agent:
13
13
  - Faraday v0.9.1
14
14
  Accept:
15
15
  - "*/*"
16
16
  Date:
17
- - Wed, 03 Jun 2015 17:55:08 GMT
17
+ - Wed, 10 Jun 2015 05:47:49 GMT
18
18
  Content-Type:
19
19
  - application/vnd.api+json
20
20
  Authorization:
@@ -22,8 +22,14 @@ http_interactions:
22
22
  response:
23
23
  status:
24
24
  code: 201
25
- message: 'Created '
25
+ message: Created
26
26
  headers:
27
+ Date:
28
+ - Wed, 10 Jun 2015 05:47:49 GMT
29
+ Status:
30
+ - 201 Created
31
+ Connection:
32
+ - close
27
33
  X-Frame-Options:
28
34
  - SAMEORIGIN
29
35
  X-Xss-Protection:
@@ -43,36 +49,30 @@ http_interactions:
43
49
  Content-Type:
44
50
  - application/json; charset=utf-8
45
51
  X-Request-Id:
46
- - 16a3e608-5d4d-47f0-9e39-e0a694f849df
52
+ - 7a83a40c-d415-4f48-94b2-b80739fe28cc
47
53
  X-Runtime:
48
- - '0.018962'
49
- Server:
50
- - WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
51
- Date:
52
- - Wed, 03 Jun 2015 17:55:08 GMT
53
- Content-Length:
54
- - '1532'
55
- Connection:
56
- - Keep-Alive
54
+ - '0.026521'
55
+ Transfer-Encoding:
56
+ - chunked
57
57
  body:
58
58
  encoding: UTF-8
59
- string: '{"data":{"id":"31430","type":"builds","attributes":{"build-number":2,"state":"pending","is-pull-request":false,"pull-request-number":0,"pull-request-title":null,"approved-at":null,"created-at":"2015-06-03T17:55:08.944Z","updated-at":"2015-06-03T17:55:08.944Z"},"links":{"self":"/api/v1/builds/31430"},"relationships":{"commit":{"links":{"self":"/api/v1/builds/31430/links/commit","related":"/api/v1/builds/31430/commit"},"data":{"type":"commits","id":"3"}},"repo":{"links":{"self":"/api/v1/builds/31430/links/repo","related":"/api/v1/builds/31430/repo"}},"base-build":{"links":{"self":"/api/v1/builds/31430/links/base-build","related":"/api/v1/builds/31430/base-build"},"data":null},"approved-by":{"links":{"self":"/api/v1/builds/31430/links/approved-by","related":"/api/v1/builds/31430/approved-by"}},"snapshots":{"links":{"self":"/api/v1/builds/31430/links/snapshots","related":"/api/v1/builds/31430/snapshots"}},"comparisons":{"links":{"self":"/api/v1/builds/31430/links/comparisons","related":"/api/v1/builds/31430/comparisons"}}},"meta":{"finalize-link":"/api/v1/builds/31430/finalize","approve-link":"/api/v1/builds/31430/approve"}},"included":[{"id":"3","type":"commits","attributes":{"sha":"dcee2857b1e0eeb9e0edef4cd7e2146dc5cf78e2","branch":"master","message":"Bump
60
- version.","committed-at":"2015-06-02 09:33:15 -0700","author-name":"<COMMIT_AUTHOR_NAME>","committer-name":"<COMMIT_AUTHOR_NAME>","created-at":"2015-06-03T17:55:08.000Z","updated-at":"2015-06-03T17:55:08.000Z"},"links":{"self":"/api/v1/commits/3"},"relationships":{}}]}'
59
+ string: '{"data":{"id":"31426","type":"builds","attributes":{"build-number":6,"state":"pending","is-pull-request":false,"pull-request-number":0,"pull-request-title":null,"approved-at":null,"created-at":"2015-06-10T05:47:49.890Z","updated-at":"2015-06-10T05:47:49.890Z"},"links":{"self":"/api/v1/builds/31426"},"relationships":{"commit":{"links":{"self":"/api/v1/builds/31426/relationships/commit","related":"/api/v1/builds/31426/commit"},"data":{"type":"commits","id":"2"}},"repo":{"links":{"self":"/api/v1/builds/31426/relationships/repo","related":"/api/v1/builds/31426/repo"}},"base-build":{"links":{"self":"/api/v1/builds/31426/relationships/base-build","related":"/api/v1/builds/31426/base-build"},"data":{"type":"builds","id":"31421"}},"approved-by":{"links":{"self":"/api/v1/builds/31426/relationships/approved-by","related":"/api/v1/builds/31426/approved-by"}},"snapshots":{"links":{"self":"/api/v1/builds/31426/relationships/snapshots","related":"/api/v1/builds/31426/snapshots"}},"comparisons":{"links":{"self":"/api/v1/builds/31426/relationships/comparisons","related":"/api/v1/builds/31426/comparisons"}},"missing-resources":{"links":{"self":"/api/v1/builds/31426/relationships/missing-resources","related":"/api/v1/builds/31426/missing-resources"}}},"meta":{"finalize-link":"/api/v1/builds/31426/finalize","approve-link":"/api/v1/builds/31426/approve"}},"included":[{"id":"2","type":"commits","attributes":{"sha":"65478abc7f79b22365c261076cb44478714c4751","branch":"master","message":"Bump
60
+ client version.","committed-at":"2015-06-08 16:33:11 -0700","author-name":"<COMMIT_AUTHOR_NAME>","committer-name":"<COMMIT_AUTHOR_NAME>","created-at":"2015-06-10T05:47:46.000Z","updated-at":"2015-06-10T05:47:46.000Z"},"links":{"self":"/api/v1/commits/2"}},{"id":"31421","type":"builds","attributes":{"build-number":1,"state":"finished","is-pull-request":false,"pull-request-number":0,"pull-request-title":null,"approved-at":null,"created-at":"2015-06-10T05:47:46.000Z","updated-at":"2015-06-10T05:47:47.000Z"},"links":{"self":"/api/v1/builds/31421"},"relationships":{"commit":{"links":{"self":"/api/v1/builds/31421/relationships/commit","related":"/api/v1/builds/31421/commit"},"data":{"type":"commits","id":"2"}},"repo":{"links":{"self":"/api/v1/builds/31421/relationships/repo","related":"/api/v1/builds/31421/repo"}},"base-build":{"links":{"self":"/api/v1/builds/31421/relationships/base-build","related":"/api/v1/builds/31421/base-build"}},"approved-by":{"links":{"self":"/api/v1/builds/31421/relationships/approved-by","related":"/api/v1/builds/31421/approved-by"}},"snapshots":{"links":{"self":"/api/v1/builds/31421/relationships/snapshots","related":"/api/v1/builds/31421/snapshots"}},"comparisons":{"links":{"self":"/api/v1/builds/31421/relationships/comparisons","related":"/api/v1/builds/31421/comparisons"}},"missing-resources":{"links":{"self":"/api/v1/builds/31421/relationships/missing-resources","related":"/api/v1/builds/31421/missing-resources"}}},"meta":{"finalize-link":"/api/v1/builds/31421/finalize","approve-link":"/api/v1/builds/31421/approve"}}]}'
61
61
  http_version:
62
- recorded_at: Wed, 03 Jun 2015 17:55:08 GMT
62
+ recorded_at: Wed, 10 Jun 2015 05:47:49 GMT
63
63
  - request:
64
64
  method: post
65
- uri: http://localhost:3000/api/v1/builds/31430/snapshots/
65
+ uri: http://localhost:3000/api/v1/builds/31426/snapshots/
66
66
  body:
67
67
  encoding: UTF-8
68
- string: '{"data":{"type":"snapshots","attributes":{"name":"homepage"},"relationships":{"resources":{"data":[{"type":"resources","id":"7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9","attributes":{"resource-url":"/foo/test.html","mimetype":null,"is-root":true}},{"type":"resources","id":"7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9","attributes":{"resource-url":"/css/test.css","mimetype":null,"is-root":null}}]}}}}'
68
+ string: '{"data":{"type":"snapshots","attributes":{"name":"homepage"},"relationships":{"resources":{"data":[{"type":"resources","id":"e922f734dac13edaf56118975da188eb5d5fbd6ddb8b5ec4541df371976110b5","attributes":{"resource-url":"/foo/test.html","mimetype":null,"is-root":true}},{"type":"resources","id":"e922f734dac13edaf56118975da188eb5d5fbd6ddb8b5ec4541df371976110b5","attributes":{"resource-url":"/css/test.css","mimetype":null,"is-root":null}}]}}}}'
69
69
  headers:
70
70
  User-Agent:
71
71
  - Faraday v0.9.1
72
72
  Accept:
73
73
  - "*/*"
74
74
  Date:
75
- - Wed, 03 Jun 2015 17:55:08 GMT
75
+ - Wed, 10 Jun 2015 05:47:49 GMT
76
76
  Content-Type:
77
77
  - application/vnd.api+json
78
78
  Authorization:
@@ -80,8 +80,14 @@ http_interactions:
80
80
  response:
81
81
  status:
82
82
  code: 201
83
- message: 'Created '
83
+ message: Created
84
84
  headers:
85
+ Date:
86
+ - Wed, 10 Jun 2015 05:47:49 GMT
87
+ Status:
88
+ - 201 Created
89
+ Connection:
90
+ - close
85
91
  X-Frame-Options:
86
92
  - SAMEORIGIN
87
93
  X-Xss-Protection:
@@ -101,20 +107,14 @@ http_interactions:
101
107
  Content-Type:
102
108
  - application/json; charset=utf-8
103
109
  X-Request-Id:
104
- - e5fb3918-6cf2-4912-9542-17f0a2bf78e6
110
+ - 27556a42-dc02-4de7-a939-e77ffe14153c
105
111
  X-Runtime:
106
- - '0.020061'
107
- Server:
108
- - WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
109
- Date:
110
- - Wed, 03 Jun 2015 17:55:08 GMT
111
- Content-Length:
112
- - '1760'
113
- Connection:
114
- - Keep-Alive
112
+ - '0.041105'
113
+ Transfer-Encoding:
114
+ - chunked
115
115
  body:
116
116
  encoding: UTF-8
117
- string: '{"data":{"id":"28","type":"snapshots","attributes":{"name":"homepage","created-at":"2015-06-03T17:55:08.969Z","updated-at":"2015-06-03T17:55:08.969Z","finished-processing-at":null},"links":{"self":"/api/v1/snapshots/28"},"relationships":{"build":{"links":{"self":"/api/v1/snapshots/28/links/build","related":"/api/v1/snapshots/28/build"}},"screenshots":{"links":{"self":"/api/v1/snapshots/28/links/screenshots","related":"/api/v1/snapshots/28/screenshots"}},"resources":{"links":{"self":"/api/v1/snapshots/28/links/resources","related":"/api/v1/snapshots/28/resources"},"data":[{"type":"resources","id":"7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9"},{"type":"resources","id":"7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9"}]},"missing-resources":{"links":{"self":"/api/v1/snapshots/28/links/missing-resources","related":"/api/v1/snapshots/28/missing-resources"},"data":[{"type":"resources","id":"7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9"},{"type":"resources","id":"7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9"}]}}},"included":[{"id":"7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9","type":"resources","attributes":{"is-root":true,"resource-url":"http://localhost/foo/test.html","mimetype":"text/html","uploaded-at":null,"created-at":"2015-06-03T17:55:08.000Z","updated-at":"2015-06-03T17:55:08.000Z"},"links":{"self":"/api/v1/resources/7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9"},"relationships":{"snapshot":{"links":{"self":"/api/v1/resources/7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9/links/snapshot","related":"/api/v1/resources/7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9/snapshot"}}}}]}'
117
+ string: '{"data":{"id":"4","type":"snapshots","attributes":{"name":"homepage","created-at":"2015-06-10T05:47:49.926Z","updated-at":"2015-06-10T05:47:49.926Z","finished-processing-at":null},"links":{"self":"/api/v1/snapshots/4"},"relationships":{"build":{"links":{"self":"/api/v1/snapshots/4/relationships/build","related":"/api/v1/snapshots/4/build"}},"screenshots":{"links":{"self":"/api/v1/snapshots/4/relationships/screenshots","related":"/api/v1/snapshots/4/screenshots"}},"missing-resources":{"links":{"self":"/api/v1/snapshots/4/relationships/missing-resources","related":"/api/v1/snapshots/4/missing-resources"},"data":[{"type":"resources","id":"e922f734dac13edaf56118975da188eb5d5fbd6ddb8b5ec4541df371976110b5"}]}}},"included":[{"id":"e922f734dac13edaf56118975da188eb5d5fbd6ddb8b5ec4541df371976110b5","type":"resources","attributes":{},"links":{"self":"/api/v1/resources/e922f734dac13edaf56118975da188eb5d5fbd6ddb8b5ec4541df371976110b5"}}]}'
118
118
  http_version:
119
- recorded_at: Wed, 03 Jun 2015 17:55:08 GMT
119
+ recorded_at: Wed, 10 Jun 2015 05:47:49 GMT
120
120
  recorded_with: VCR 2.9.3
@@ -5,16 +5,16 @@ http_interactions:
5
5
  uri: http://localhost:3000/api/v1/repos/fotinakis/percy-examples/builds/
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"data":{"type":"builds","attributes":{"commit-sha":"dcee2857b1e0eeb9e0edef4cd7e2146dc5cf78e2","commit-branch":"master","commit-committed-at":"2015-06-02
9
- 09:33:15 -0700","commit-author-name":"<COMMIT_AUTHOR_NAME>","commit-author-email":"<COMMIT_AUTHOR_EMAIL>","commit-committer-name":"<COMMIT_AUTHOR_NAME>","commit-committer-email":"<COMMIT_AUTHOR_EMAIL>","commit-message":"Bump
10
- version.","pull-request-number":null}}}'
8
+ string: '{"data":{"type":"builds","attributes":{"commit-sha":"65478abc7f79b22365c261076cb44478714c4751","commit-branch":"master","commit-committed-at":"2015-06-08
9
+ 16:33:11 -0700","commit-author-name":"<COMMIT_AUTHOR_NAME>","commit-author-email":"<COMMIT_AUTHOR_EMAIL>","commit-committer-name":"<COMMIT_AUTHOR_NAME>","commit-committer-email":"<COMMIT_AUTHOR_EMAIL>","commit-message":"Bump
10
+ client version.","pull-request-number":null}}}'
11
11
  headers:
12
12
  User-Agent:
13
13
  - Faraday v0.9.1
14
14
  Accept:
15
15
  - "*/*"
16
16
  Date:
17
- - Wed, 03 Jun 2015 17:55:08 GMT
17
+ - Wed, 10 Jun 2015 05:47:49 GMT
18
18
  Content-Type:
19
19
  - application/vnd.api+json
20
20
  Authorization:
@@ -22,8 +22,14 @@ http_interactions:
22
22
  response:
23
23
  status:
24
24
  code: 201
25
- message: 'Created '
25
+ message: Created
26
26
  headers:
27
+ Date:
28
+ - Wed, 10 Jun 2015 05:47:49 GMT
29
+ Status:
30
+ - 201 Created
31
+ Connection:
32
+ - close
27
33
  X-Frame-Options:
28
34
  - SAMEORIGIN
29
35
  X-Xss-Protection:
@@ -43,26 +49,20 @@ http_interactions:
43
49
  Content-Type:
44
50
  - application/json; charset=utf-8
45
51
  X-Request-Id:
46
- - c5237c7e-edb1-4f76-88ea-bdfa965e817f
52
+ - 561536a7-61d8-40ab-8c76-a6c7ba827f5b
47
53
  X-Runtime:
48
- - '0.015612'
49
- Server:
50
- - WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
51
- Date:
52
- - Wed, 03 Jun 2015 17:55:08 GMT
53
- Content-Length:
54
- - '1532'
55
- Connection:
56
- - Keep-Alive
54
+ - '0.049243'
55
+ Transfer-Encoding:
56
+ - chunked
57
57
  body:
58
58
  encoding: UTF-8
59
- string: '{"data":{"id":"31429","type":"builds","attributes":{"build-number":1,"state":"pending","is-pull-request":false,"pull-request-number":0,"pull-request-title":null,"approved-at":null,"created-at":"2015-06-03T17:55:08.854Z","updated-at":"2015-06-03T17:55:08.854Z"},"links":{"self":"/api/v1/builds/31429"},"relationships":{"commit":{"links":{"self":"/api/v1/builds/31429/links/commit","related":"/api/v1/builds/31429/commit"},"data":{"type":"commits","id":"3"}},"repo":{"links":{"self":"/api/v1/builds/31429/links/repo","related":"/api/v1/builds/31429/repo"}},"base-build":{"links":{"self":"/api/v1/builds/31429/links/base-build","related":"/api/v1/builds/31429/base-build"},"data":null},"approved-by":{"links":{"self":"/api/v1/builds/31429/links/approved-by","related":"/api/v1/builds/31429/approved-by"}},"snapshots":{"links":{"self":"/api/v1/builds/31429/links/snapshots","related":"/api/v1/builds/31429/snapshots"}},"comparisons":{"links":{"self":"/api/v1/builds/31429/links/comparisons","related":"/api/v1/builds/31429/comparisons"}}},"meta":{"finalize-link":"/api/v1/builds/31429/finalize","approve-link":"/api/v1/builds/31429/approve"}},"included":[{"id":"3","type":"commits","attributes":{"sha":"dcee2857b1e0eeb9e0edef4cd7e2146dc5cf78e2","branch":"master","message":"Bump
60
- version.","committed-at":"2015-06-02 09:33:15 -0700","author-name":"<COMMIT_AUTHOR_NAME>","committer-name":"<COMMIT_AUTHOR_NAME>","created-at":"2015-06-03T17:55:08.852Z","updated-at":"2015-06-03T17:55:08.852Z"},"links":{"self":"/api/v1/commits/3"},"relationships":{}}]}'
59
+ string: '{"data":{"id":"31425","type":"builds","attributes":{"build-number":5,"state":"pending","is-pull-request":false,"pull-request-number":0,"pull-request-title":null,"approved-at":null,"created-at":"2015-06-10T05:47:49.763Z","updated-at":"2015-06-10T05:47:49.763Z"},"links":{"self":"/api/v1/builds/31425"},"relationships":{"commit":{"links":{"self":"/api/v1/builds/31425/relationships/commit","related":"/api/v1/builds/31425/commit"},"data":{"type":"commits","id":"2"}},"repo":{"links":{"self":"/api/v1/builds/31425/relationships/repo","related":"/api/v1/builds/31425/repo"}},"base-build":{"links":{"self":"/api/v1/builds/31425/relationships/base-build","related":"/api/v1/builds/31425/base-build"},"data":{"type":"builds","id":"31421"}},"approved-by":{"links":{"self":"/api/v1/builds/31425/relationships/approved-by","related":"/api/v1/builds/31425/approved-by"}},"snapshots":{"links":{"self":"/api/v1/builds/31425/relationships/snapshots","related":"/api/v1/builds/31425/snapshots"}},"comparisons":{"links":{"self":"/api/v1/builds/31425/relationships/comparisons","related":"/api/v1/builds/31425/comparisons"}},"missing-resources":{"links":{"self":"/api/v1/builds/31425/relationships/missing-resources","related":"/api/v1/builds/31425/missing-resources"}}},"meta":{"finalize-link":"/api/v1/builds/31425/finalize","approve-link":"/api/v1/builds/31425/approve"}},"included":[{"id":"2","type":"commits","attributes":{"sha":"65478abc7f79b22365c261076cb44478714c4751","branch":"master","message":"Bump
60
+ client version.","committed-at":"2015-06-08 16:33:11 -0700","author-name":"<COMMIT_AUTHOR_NAME>","committer-name":"<COMMIT_AUTHOR_NAME>","created-at":"2015-06-10T05:47:46.000Z","updated-at":"2015-06-10T05:47:46.000Z"},"links":{"self":"/api/v1/commits/2"}},{"id":"31421","type":"builds","attributes":{"build-number":1,"state":"finished","is-pull-request":false,"pull-request-number":0,"pull-request-title":null,"approved-at":null,"created-at":"2015-06-10T05:47:46.000Z","updated-at":"2015-06-10T05:47:47.000Z"},"links":{"self":"/api/v1/builds/31421"},"relationships":{"commit":{"links":{"self":"/api/v1/builds/31421/relationships/commit","related":"/api/v1/builds/31421/commit"},"data":{"type":"commits","id":"2"}},"repo":{"links":{"self":"/api/v1/builds/31421/relationships/repo","related":"/api/v1/builds/31421/repo"}},"base-build":{"links":{"self":"/api/v1/builds/31421/relationships/base-build","related":"/api/v1/builds/31421/base-build"}},"approved-by":{"links":{"self":"/api/v1/builds/31421/relationships/approved-by","related":"/api/v1/builds/31421/approved-by"}},"snapshots":{"links":{"self":"/api/v1/builds/31421/relationships/snapshots","related":"/api/v1/builds/31421/snapshots"}},"comparisons":{"links":{"self":"/api/v1/builds/31421/relationships/comparisons","related":"/api/v1/builds/31421/comparisons"}},"missing-resources":{"links":{"self":"/api/v1/builds/31421/relationships/missing-resources","related":"/api/v1/builds/31421/missing-resources"}}},"meta":{"finalize-link":"/api/v1/builds/31421/finalize","approve-link":"/api/v1/builds/31421/approve"}}]}'
61
61
  http_version:
62
- recorded_at: Wed, 03 Jun 2015 17:55:08 GMT
62
+ recorded_at: Wed, 10 Jun 2015 05:47:49 GMT
63
63
  - request:
64
64
  method: post
65
- uri: http://localhost:3000/api/v1/builds/31429/snapshots/
65
+ uri: http://localhost:3000/api/v1/builds/31425/snapshots/
66
66
  body:
67
67
  encoding: UTF-8
68
68
  string: '{"data":{"type":"snapshots","attributes":{"name":null},"relationships":{"resources":{"data":[]}}}}'
@@ -72,7 +72,7 @@ http_interactions:
72
72
  Accept:
73
73
  - "*/*"
74
74
  Date:
75
- - Wed, 03 Jun 2015 17:55:08 GMT
75
+ - Wed, 10 Jun 2015 05:47:49 GMT
76
76
  Content-Type:
77
77
  - application/vnd.api+json
78
78
  Authorization:
@@ -80,8 +80,14 @@ http_interactions:
80
80
  response:
81
81
  status:
82
82
  code: 400
83
- message: 'Bad Request '
83
+ message: Bad Request
84
84
  headers:
85
+ Date:
86
+ - Wed, 10 Jun 2015 05:47:49 GMT
87
+ Status:
88
+ - 400 Bad Request
89
+ Connection:
90
+ - close
85
91
  X-Frame-Options:
86
92
  - SAMEORIGIN
87
93
  X-Xss-Protection:
@@ -101,22 +107,16 @@ http_interactions:
101
107
  Content-Type:
102
108
  - application/json; charset=utf-8
103
109
  X-Request-Id:
104
- - 37b9c76f-65bd-41b9-8090-4a1a83a838a8
110
+ - 944a3cee-8161-47fc-b4f9-a0531a571334
105
111
  X-Runtime:
106
- - '0.007433'
107
- Server:
108
- - WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
109
- Date:
110
- - Wed, 03 Jun 2015 17:55:08 GMT
111
- Content-Length:
112
- - '177'
113
- Connection:
114
- - Keep-Alive
112
+ - '0.018033'
113
+ Transfer-Encoding:
114
+ - chunked
115
115
  body:
116
116
  encoding: UTF-8
117
117
  string: '{"errors":[{"status":"bad_request","detail":"Exactly one resource with
118
118
  ''is-root'': true must be present in the ''resources'' array. Found 0 root
119
119
  resources in 0 total resources."}]}'
120
120
  http_version:
121
- recorded_at: Wed, 03 Jun 2015 17:55:08 GMT
121
+ recorded_at: Wed, 10 Jun 2015 05:47:49 GMT
122
122
  recorded_with: VCR 2.9.3
@@ -1,4 +1,7 @@
1
1
  RSpec.describe Percy::Client::Builds, :vcr do
2
+ let(:content) { "hello world! #{__FILE__}" }
3
+ let(:sha) { Digest::SHA256.hexdigest(content) }
4
+
2
5
  describe '#create_build' do
3
6
  before(:each) { ENV['PERCY_PULL_REQUEST'] = '123' }
4
7
  after(:each) { ENV['PERCY_PULL_REQUEST'] = nil }
@@ -11,6 +14,24 @@ RSpec.describe Percy::Client::Builds, :vcr do
11
14
  expect(build['data']['attributes']['state']).to eq('pending')
12
15
  expect(build['data']['attributes']['is-pull-request']).to be_truthy
13
16
  expect(build['data']['attributes']['pull-request-number']).to eq(123)
17
+ expect(build['data']['relationships']['missing-resources']).to be
18
+ expect(build['data']['relationships']['missing-resources']['data']).to_not be
19
+ end
20
+ it 'accepts optional resources' do
21
+ resources = []
22
+ resources << Percy::Client::Resource.new('/css/test.css', sha: sha)
23
+
24
+ build = Percy.create_build('fotinakis/percy-examples', resources: resources)
25
+ expect(build).to be
26
+ expect(build['data']).to be
27
+ expect(build['data']['id']).to be
28
+ expect(build['data']['type']).to eq('builds')
29
+ expect(build['data']['attributes']['state']).to eq('pending')
30
+ expect(build['data']['attributes']['is-pull-request']).to be_truthy
31
+ expect(build['data']['attributes']['pull-request-number']).to eq(123)
32
+ expect(build['data']['relationships']['missing-resources']).to be
33
+ expect(build['data']['relationships']['missing-resources']['data']).to be
34
+ expect(build['data']['relationships']['missing-resources']['data'][0]['id']).to eq(sha)
14
35
  end
15
36
  end
16
37
  describe '#finalize_build' do
@@ -1,7 +1,7 @@
1
1
  require 'digest'
2
2
 
3
3
  RSpec.describe Percy::Client::Resources, :vcr do
4
- let(:content) { 'hello world!' }
4
+ let(:content) { "hello world! #{__FILE__}" }
5
5
  let(:sha) { Digest::SHA256.hexdigest(content) }
6
6
 
7
7
  describe 'Percy::Client::Resource' do
@@ -1,5 +1,5 @@
1
1
  RSpec.describe Percy::Client::Snapshots, :vcr do
2
- let(:content) { 'hello world!' }
2
+ let(:content) { "hello world! #{__FILE__}" }
3
3
  let(:sha) { Digest::SHA256.hexdigest(content) }
4
4
 
5
5
  describe '#create_snapshot' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: percy-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
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-08 00:00:00.000000000 Z
11
+ date: 2015-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -133,6 +133,7 @@ files:
133
133
  - lib/percy/client/version.rb
134
134
  - lib/percy/config.rb
135
135
  - percy-client.gemspec
136
+ - spec/cassettes/Percy_Client_Builds/_create_build/accepts_optional_resources.yml
136
137
  - spec/cassettes/Percy_Client_Builds/_create_build/creates_a_build.yml
137
138
  - spec/cassettes/Percy_Client_Builds/_finalize_build/finalizes_a_build.yml
138
139
  - spec/cassettes/Percy_Client_Resources/_upload_resource/returns_true_with_success.yml
@@ -172,6 +173,7 @@ signing_key:
172
173
  specification_version: 4
173
174
  summary: Percy::Client
174
175
  test_files:
176
+ - spec/cassettes/Percy_Client_Builds/_create_build/accepts_optional_resources.yml
175
177
  - spec/cassettes/Percy_Client_Builds/_create_build/creates_a_build.yml
176
178
  - spec/cassettes/Percy_Client_Builds/_finalize_build/finalizes_a_build.yml
177
179
  - spec/cassettes/Percy_Client_Resources/_upload_resource/returns_true_with_success.yml