percy-client 0.1.6 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/percy/client/resources.rb +5 -3
- data/lib/percy/client/snapshots.rb +4 -2
- data/lib/percy/client/version.rb +1 -1
- data/spec/cassettes/Percy_Client_Builds/_create_build/creates_a_build.yml +12 -13
- data/spec/cassettes/Percy_Client_Builds/_finalize_build/finalizes_a_build.yml +17 -18
- data/spec/cassettes/Percy_Client_Resources/_upload_resource/returns_true_with_success.yml +32 -33
- data/spec/cassettes/Percy_Client_Snapshots/_create_snapshot/creates_a_build.yml +20 -21
- data/spec/cassettes/Percy_Client_Snapshots/_create_snapshot/fails_if_no_resources_are_given.yml +22 -22
- data/spec/lib/percy/client/resources_spec.rb +10 -6
- data/spec/lib/percy/client/snapshots_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57de4095c492140de71e9e68e014233241b66b47
|
4
|
+
data.tar.gz: dda677d05edec53b0b6567cbc45ed60532fdd2dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15291bdb20c25c78b80acf5ded6ac30d1480ba873ace46e175d1e5baba212b4a58470f77acf0bc675f2b10fff155895b575bd82e8a5a5e14d9f61a24097aad84
|
7
|
+
data.tar.gz: 6be1ec1444b0e1e195133ef175e8cfbf103a863793a0040360ae19db01c67ac34d261fb0810f6650dd641a1414aa61f4eef8878d6aa6c76c687262cdf9dd7900
|
@@ -33,9 +33,11 @@ module Percy
|
|
33
33
|
{
|
34
34
|
'type' => 'resources',
|
35
35
|
'id' => sha,
|
36
|
-
'
|
37
|
-
|
38
|
-
|
36
|
+
'attributes' => {
|
37
|
+
'resource-url' => resource_url,
|
38
|
+
'mimetype' => mimetype,
|
39
|
+
'is-root' => is_root,
|
40
|
+
},
|
39
41
|
}
|
40
42
|
end
|
41
43
|
|
data/lib/percy/client/version.rb
CHANGED
@@ -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":"
|
9
|
-
|
10
|
-
|
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"}}}'
|
11
11
|
headers:
|
12
12
|
User-Agent:
|
13
13
|
- Faraday v0.9.1
|
14
14
|
Accept:
|
15
15
|
- "*/*"
|
16
16
|
Date:
|
17
|
-
-
|
17
|
+
- Wed, 03 Jun 2015 17:55:09 GMT
|
18
18
|
Content-Type:
|
19
19
|
- application/vnd.api+json
|
20
20
|
Authorization:
|
@@ -43,22 +43,21 @@ http_interactions:
|
|
43
43
|
Content-Type:
|
44
44
|
- application/json; charset=utf-8
|
45
45
|
X-Request-Id:
|
46
|
-
-
|
46
|
+
- e1f7a6ea-d16e-4669-9284-8e49374b96df
|
47
47
|
X-Runtime:
|
48
|
-
- '0.
|
48
|
+
- '0.426916'
|
49
49
|
Server:
|
50
50
|
- WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
|
51
51
|
Date:
|
52
|
-
-
|
52
|
+
- Wed, 03 Jun 2015 17:55:10 GMT
|
53
53
|
Content-Length:
|
54
|
-
- '
|
54
|
+
- '2679'
|
55
55
|
Connection:
|
56
56
|
- Keep-Alive
|
57
57
|
body:
|
58
58
|
encoding: UTF-8
|
59
|
-
string: '{"data":{"id":"
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
recorded_at: Sun, 17 May 2015 04:14:20 GMT
|
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"}}]}'
|
61
|
+
http_version:
|
62
|
+
recorded_at: Wed, 03 Jun 2015 17:55:10 GMT
|
64
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":"
|
9
|
-
|
10
|
-
|
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}}}'
|
11
11
|
headers:
|
12
12
|
User-Agent:
|
13
13
|
- Faraday v0.9.1
|
14
14
|
Accept:
|
15
15
|
- "*/*"
|
16
16
|
Date:
|
17
|
-
-
|
17
|
+
- Wed, 03 Jun 2015 17:55:09 GMT
|
18
18
|
Content-Type:
|
19
19
|
- application/vnd.api+json
|
20
20
|
Authorization:
|
@@ -43,27 +43,26 @@ http_interactions:
|
|
43
43
|
Content-Type:
|
44
44
|
- application/json; charset=utf-8
|
45
45
|
X-Request-Id:
|
46
|
-
-
|
46
|
+
- bad56fef-536f-49c7-8ea7-4c9774f95263
|
47
47
|
X-Runtime:
|
48
|
-
- '0.
|
48
|
+
- '0.019091'
|
49
49
|
Server:
|
50
50
|
- WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
|
51
51
|
Date:
|
52
|
-
-
|
52
|
+
- Wed, 03 Jun 2015 17:55:09 GMT
|
53
53
|
Content-Length:
|
54
|
-
- '
|
54
|
+
- '1532'
|
55
55
|
Connection:
|
56
56
|
- Keep-Alive
|
57
57
|
body:
|
58
58
|
encoding: UTF-8
|
59
|
-
string: '{"data":{"id":"
|
60
|
-
|
61
|
-
-0700","author-name":"<COMMIT_AUTHOR_NAME>","committer-name":"<COMMIT_AUTHOR_NAME>","created-at":"2015-05-17T04:02:54.000Z","updated-at":"2015-05-17T04:02:54.000Z"},"links":{"self":"/api/v1/commits/1"}},{"id":"8","type":"builds","attributes":{"state":"finished","is-pull-request":false,"pull-request-number":0,"pull-request-title":null,"approved-at":null,"created-at":"2015-05-17T04:12:48.000Z","updated-at":"2015-05-17T04:12:48.000Z"},"links":{"self":"/api/v1/builds/8","commit":{"self":"/api/v1/builds/8/links/commit","related":"/api/v1/builds/8/commit","linkage":{"type":"commits","id":"1"}},"repo":{"self":"/api/v1/builds/8/links/repo","related":"/api/v1/builds/8/repo"},"base-build":{"self":"/api/v1/builds/8/links/base-build","related":"/api/v1/builds/8/base-build"},"approved-by":{"self":"/api/v1/builds/8/links/approved-by","related":"/api/v1/builds/8/approved-by"},"snapshots":{"self":"/api/v1/builds/8/links/snapshots","related":"/api/v1/builds/8/snapshots"},"comparisons":{"self":"/api/v1/builds/8/links/comparisons","related":"/api/v1/builds/8/comparisons"}},"meta":{"finalize-link":"/api/v1/builds/8/finalize","approve-link":"/api/v1/builds/8/approve"}}]}'
|
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":{}}]}'
|
62
61
|
http_version:
|
63
|
-
recorded_at:
|
62
|
+
recorded_at: Wed, 03 Jun 2015 17:55:09 GMT
|
64
63
|
- request:
|
65
64
|
method: post
|
66
|
-
uri: http://localhost:3000/api/v1/builds/
|
65
|
+
uri: http://localhost:3000/api/v1/builds/31432/finalize
|
67
66
|
body:
|
68
67
|
encoding: UTF-8
|
69
68
|
string: "{}"
|
@@ -73,7 +72,7 @@ http_interactions:
|
|
73
72
|
Accept:
|
74
73
|
- "*/*"
|
75
74
|
Date:
|
76
|
-
-
|
75
|
+
- Wed, 03 Jun 2015 17:55:09 GMT
|
77
76
|
Content-Type:
|
78
77
|
- application/vnd.api+json
|
79
78
|
Authorization:
|
@@ -102,13 +101,13 @@ http_interactions:
|
|
102
101
|
Content-Type:
|
103
102
|
- application/json; charset=utf-8
|
104
103
|
X-Request-Id:
|
105
|
-
-
|
104
|
+
- 36d2b625-821f-4d62-8491-17c7572d7dfe
|
106
105
|
X-Runtime:
|
107
|
-
- '0.
|
106
|
+
- '0.013637'
|
108
107
|
Server:
|
109
108
|
- WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
|
110
109
|
Date:
|
111
|
-
-
|
110
|
+
- Wed, 03 Jun 2015 17:55:09 GMT
|
112
111
|
Content-Length:
|
113
112
|
- '16'
|
114
113
|
Connection:
|
@@ -117,5 +116,5 @@ http_interactions:
|
|
117
116
|
encoding: UTF-8
|
118
117
|
string: '{"success":true}'
|
119
118
|
http_version:
|
120
|
-
recorded_at:
|
119
|
+
recorded_at: Wed, 03 Jun 2015 17:55:09 GMT
|
121
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":"
|
9
|
-
|
10
|
-
|
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}}}'
|
11
11
|
headers:
|
12
12
|
User-Agent:
|
13
13
|
- Faraday v0.9.1
|
14
14
|
Accept:
|
15
15
|
- "*/*"
|
16
16
|
Date:
|
17
|
-
-
|
17
|
+
- Wed, 03 Jun 2015 17:55:09 GMT
|
18
18
|
Content-Type:
|
19
19
|
- application/vnd.api+json
|
20
20
|
Authorization:
|
@@ -43,37 +43,36 @@ http_interactions:
|
|
43
43
|
Content-Type:
|
44
44
|
- application/json; charset=utf-8
|
45
45
|
X-Request-Id:
|
46
|
-
-
|
46
|
+
- 9daaf4dc-dd4d-42a4-a38b-9fefae046293
|
47
47
|
X-Runtime:
|
48
|
-
- '0.
|
48
|
+
- '0.015386'
|
49
49
|
Server:
|
50
50
|
- WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
|
51
51
|
Date:
|
52
|
-
-
|
52
|
+
- Wed, 03 Jun 2015 17:55:09 GMT
|
53
53
|
Content-Length:
|
54
|
-
- '
|
54
|
+
- '1532'
|
55
55
|
Connection:
|
56
56
|
- Keep-Alive
|
57
57
|
body:
|
58
58
|
encoding: UTF-8
|
59
|
-
string: '{"data":{"id":"
|
60
|
-
|
61
|
-
-0700","author-name":"<COMMIT_AUTHOR_NAME>","committer-name":"<COMMIT_AUTHOR_NAME>","created-at":"2015-05-17T04:02:54.000Z","updated-at":"2015-05-17T04:02:54.000Z"},"links":{"self":"/api/v1/commits/1"}},{"id":"8","type":"builds","attributes":{"state":"finished","is-pull-request":false,"pull-request-number":0,"pull-request-title":null,"approved-at":null,"created-at":"2015-05-17T04:12:48.000Z","updated-at":"2015-05-17T04:12:48.000Z"},"links":{"self":"/api/v1/builds/8","commit":{"self":"/api/v1/builds/8/links/commit","related":"/api/v1/builds/8/commit","linkage":{"type":"commits","id":"1"}},"repo":{"self":"/api/v1/builds/8/links/repo","related":"/api/v1/builds/8/repo"},"base-build":{"self":"/api/v1/builds/8/links/base-build","related":"/api/v1/builds/8/base-build"},"approved-by":{"self":"/api/v1/builds/8/links/approved-by","related":"/api/v1/builds/8/approved-by"},"snapshots":{"self":"/api/v1/builds/8/links/snapshots","related":"/api/v1/builds/8/snapshots"},"comparisons":{"self":"/api/v1/builds/8/links/comparisons","related":"/api/v1/builds/8/comparisons"}},"meta":{"finalize-link":"/api/v1/builds/8/finalize","approve-link":"/api/v1/builds/8/approve"}}]}'
|
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":{}}]}'
|
62
61
|
http_version:
|
63
|
-
recorded_at:
|
62
|
+
recorded_at: Wed, 03 Jun 2015 17:55:09 GMT
|
64
63
|
- request:
|
65
64
|
method: post
|
66
|
-
uri: http://localhost:3000/api/v1/builds/
|
65
|
+
uri: http://localhost:3000/api/v1/builds/31431/snapshots/
|
67
66
|
body:
|
68
67
|
encoding: UTF-8
|
69
|
-
string: '{"data":{"type":"snapshots","attributes":{"name":"homepage"},"
|
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}}]}}}}'
|
70
69
|
headers:
|
71
70
|
User-Agent:
|
72
71
|
- Faraday v0.9.1
|
73
72
|
Accept:
|
74
73
|
- "*/*"
|
75
74
|
Date:
|
76
|
-
-
|
75
|
+
- Wed, 03 Jun 2015 17:55:09 GMT
|
77
76
|
Content-Type:
|
78
77
|
- application/vnd.api+json
|
79
78
|
Authorization:
|
@@ -102,25 +101,25 @@ http_interactions:
|
|
102
101
|
Content-Type:
|
103
102
|
- application/json; charset=utf-8
|
104
103
|
X-Request-Id:
|
105
|
-
-
|
104
|
+
- 0f0ade8f-0d47-4eb7-97e8-c1de8f117907
|
106
105
|
X-Runtime:
|
107
|
-
- '0.
|
106
|
+
- '0.028199'
|
108
107
|
Server:
|
109
108
|
- WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
|
110
109
|
Date:
|
111
|
-
-
|
110
|
+
- Wed, 03 Jun 2015 17:55:09 GMT
|
112
111
|
Content-Length:
|
113
|
-
- '
|
112
|
+
- '1574'
|
114
113
|
Connection:
|
115
114
|
- Keep-Alive
|
116
115
|
body:
|
117
116
|
encoding: UTF-8
|
118
|
-
string: '{"data":{"id":"
|
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"}}}}]}'
|
119
118
|
http_version:
|
120
|
-
recorded_at:
|
119
|
+
recorded_at: Wed, 03 Jun 2015 17:55:09 GMT
|
121
120
|
- request:
|
122
121
|
method: post
|
123
|
-
uri: http://localhost:3000/api/v1/builds/
|
122
|
+
uri: http://localhost:3000/api/v1/builds/31431/resources/
|
124
123
|
body:
|
125
124
|
encoding: UTF-8
|
126
125
|
string: '{"data":{"type":"resources","attributes":{"id":"7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9","base64-content":"aGVsbG8gd29ybGQh"}}}'
|
@@ -130,7 +129,7 @@ http_interactions:
|
|
130
129
|
Accept:
|
131
130
|
- "*/*"
|
132
131
|
Date:
|
133
|
-
-
|
132
|
+
- Wed, 03 Jun 2015 17:55:09 GMT
|
134
133
|
Content-Type:
|
135
134
|
- application/vnd.api+json
|
136
135
|
Authorization:
|
@@ -159,13 +158,13 @@ http_interactions:
|
|
159
158
|
Content-Type:
|
160
159
|
- application/json; charset=utf-8
|
161
160
|
X-Request-Id:
|
162
|
-
-
|
161
|
+
- fabf556e-c36a-4982-bae8-4d3e0eb6f279
|
163
162
|
X-Runtime:
|
164
|
-
- '0.
|
163
|
+
- '0.623360'
|
165
164
|
Server:
|
166
165
|
- WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
|
167
166
|
Date:
|
168
|
-
-
|
167
|
+
- Wed, 03 Jun 2015 17:55:09 GMT
|
169
168
|
Content-Length:
|
170
169
|
- '16'
|
171
170
|
Connection:
|
@@ -174,10 +173,10 @@ http_interactions:
|
|
174
173
|
encoding: UTF-8
|
175
174
|
string: '{"success":true}'
|
176
175
|
http_version:
|
177
|
-
recorded_at:
|
176
|
+
recorded_at: Wed, 03 Jun 2015 17:55:09 GMT
|
178
177
|
- request:
|
179
178
|
method: post
|
180
|
-
uri: http://localhost:3000/api/v1/builds/
|
179
|
+
uri: http://localhost:3000/api/v1/builds/31431/resources/
|
181
180
|
body:
|
182
181
|
encoding: UTF-8
|
183
182
|
string: '{"data":{"type":"resources","attributes":{"id":"7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9","base64-content":"aGVsbG8gd29ybGQh"}}}'
|
@@ -187,7 +186,7 @@ http_interactions:
|
|
187
186
|
Accept:
|
188
187
|
- "*/*"
|
189
188
|
Date:
|
190
|
-
-
|
189
|
+
- Wed, 03 Jun 2015 17:55:09 GMT
|
191
190
|
Content-Type:
|
192
191
|
- application/vnd.api+json
|
193
192
|
Authorization:
|
@@ -216,13 +215,13 @@ http_interactions:
|
|
216
215
|
Content-Type:
|
217
216
|
- application/json; charset=utf-8
|
218
217
|
X-Request-Id:
|
219
|
-
-
|
218
|
+
- 7a0a279e-f6bf-4e7a-9c23-a89c18676b6e
|
220
219
|
X-Runtime:
|
221
|
-
- '0.
|
220
|
+
- '0.007378'
|
222
221
|
Server:
|
223
222
|
- WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
|
224
223
|
Date:
|
225
|
-
-
|
224
|
+
- Wed, 03 Jun 2015 17:55:09 GMT
|
226
225
|
Content-Length:
|
227
226
|
- '165'
|
228
227
|
Connection:
|
@@ -233,5 +232,5 @@ http_interactions:
|
|
233
232
|
SHA-256 ''7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9''
|
234
233
|
already exists."}]}'
|
235
234
|
http_version:
|
236
|
-
recorded_at:
|
235
|
+
recorded_at: Wed, 03 Jun 2015 17:55:09 GMT
|
237
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":"
|
9
|
-
|
10
|
-
|
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}}}'
|
11
11
|
headers:
|
12
12
|
User-Agent:
|
13
13
|
- Faraday v0.9.1
|
14
14
|
Accept:
|
15
15
|
- "*/*"
|
16
16
|
Date:
|
17
|
-
-
|
17
|
+
- Wed, 03 Jun 2015 17:55:08 GMT
|
18
18
|
Content-Type:
|
19
19
|
- application/vnd.api+json
|
20
20
|
Authorization:
|
@@ -43,37 +43,36 @@ http_interactions:
|
|
43
43
|
Content-Type:
|
44
44
|
- application/json; charset=utf-8
|
45
45
|
X-Request-Id:
|
46
|
-
-
|
46
|
+
- 16a3e608-5d4d-47f0-9e39-e0a694f849df
|
47
47
|
X-Runtime:
|
48
|
-
- '0.
|
48
|
+
- '0.018962'
|
49
49
|
Server:
|
50
50
|
- WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
|
51
51
|
Date:
|
52
|
-
-
|
52
|
+
- Wed, 03 Jun 2015 17:55:08 GMT
|
53
53
|
Content-Length:
|
54
|
-
- '
|
54
|
+
- '1532'
|
55
55
|
Connection:
|
56
56
|
- Keep-Alive
|
57
57
|
body:
|
58
58
|
encoding: UTF-8
|
59
|
-
string: '{"data":{"id":"
|
60
|
-
|
61
|
-
-0700","author-name":"<COMMIT_AUTHOR_NAME>","committer-name":"<COMMIT_AUTHOR_NAME>","created-at":"2015-05-17T04:02:54.000Z","updated-at":"2015-05-17T04:02:54.000Z"},"links":{"self":"/api/v1/commits/1"}},{"id":"8","type":"builds","attributes":{"state":"finished","is-pull-request":false,"pull-request-number":0,"pull-request-title":null,"approved-at":null,"created-at":"2015-05-17T04:12:48.000Z","updated-at":"2015-05-17T04:12:48.000Z"},"links":{"self":"/api/v1/builds/8","commit":{"self":"/api/v1/builds/8/links/commit","related":"/api/v1/builds/8/commit","linkage":{"type":"commits","id":"1"}},"repo":{"self":"/api/v1/builds/8/links/repo","related":"/api/v1/builds/8/repo"},"base-build":{"self":"/api/v1/builds/8/links/base-build","related":"/api/v1/builds/8/base-build"},"approved-by":{"self":"/api/v1/builds/8/links/approved-by","related":"/api/v1/builds/8/approved-by"},"snapshots":{"self":"/api/v1/builds/8/links/snapshots","related":"/api/v1/builds/8/snapshots"},"comparisons":{"self":"/api/v1/builds/8/links/comparisons","related":"/api/v1/builds/8/comparisons"}},"meta":{"finalize-link":"/api/v1/builds/8/finalize","approve-link":"/api/v1/builds/8/approve"}}]}'
|
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":{}}]}'
|
62
61
|
http_version:
|
63
|
-
recorded_at:
|
62
|
+
recorded_at: Wed, 03 Jun 2015 17:55:08 GMT
|
64
63
|
- request:
|
65
64
|
method: post
|
66
|
-
uri: http://localhost:3000/api/v1/builds/
|
65
|
+
uri: http://localhost:3000/api/v1/builds/31430/snapshots/
|
67
66
|
body:
|
68
67
|
encoding: UTF-8
|
69
|
-
string: '{"data":{"type":"snapshots","attributes":{"name":"homepage"},"
|
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}}]}}}}'
|
70
69
|
headers:
|
71
70
|
User-Agent:
|
72
71
|
- Faraday v0.9.1
|
73
72
|
Accept:
|
74
73
|
- "*/*"
|
75
74
|
Date:
|
76
|
-
-
|
75
|
+
- Wed, 03 Jun 2015 17:55:08 GMT
|
77
76
|
Content-Type:
|
78
77
|
- application/vnd.api+json
|
79
78
|
Authorization:
|
@@ -102,20 +101,20 @@ http_interactions:
|
|
102
101
|
Content-Type:
|
103
102
|
- application/json; charset=utf-8
|
104
103
|
X-Request-Id:
|
105
|
-
-
|
104
|
+
- e5fb3918-6cf2-4912-9542-17f0a2bf78e6
|
106
105
|
X-Runtime:
|
107
|
-
- '0.
|
106
|
+
- '0.020061'
|
108
107
|
Server:
|
109
108
|
- WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
|
110
109
|
Date:
|
111
|
-
-
|
110
|
+
- Wed, 03 Jun 2015 17:55:08 GMT
|
112
111
|
Content-Length:
|
113
|
-
- '
|
112
|
+
- '1760'
|
114
113
|
Connection:
|
115
114
|
- Keep-Alive
|
116
115
|
body:
|
117
116
|
encoding: UTF-8
|
118
|
-
string: '{"data":{"id":"
|
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"}}}}]}'
|
119
118
|
http_version:
|
120
|
-
recorded_at:
|
119
|
+
recorded_at: Wed, 03 Jun 2015 17:55:08 GMT
|
121
120
|
recorded_with: VCR 2.9.3
|
data/spec/cassettes/Percy_Client_Snapshots/_create_snapshot/fails_if_no_resources_are_given.yml
CHANGED
@@ -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":"
|
9
|
-
|
10
|
-
|
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}}}'
|
11
11
|
headers:
|
12
12
|
User-Agent:
|
13
13
|
- Faraday v0.9.1
|
14
14
|
Accept:
|
15
15
|
- "*/*"
|
16
16
|
Date:
|
17
|
-
-
|
17
|
+
- Wed, 03 Jun 2015 17:55:08 GMT
|
18
18
|
Content-Type:
|
19
19
|
- application/vnd.api+json
|
20
20
|
Authorization:
|
@@ -43,37 +43,36 @@ http_interactions:
|
|
43
43
|
Content-Type:
|
44
44
|
- application/json; charset=utf-8
|
45
45
|
X-Request-Id:
|
46
|
-
-
|
46
|
+
- c5237c7e-edb1-4f76-88ea-bdfa965e817f
|
47
47
|
X-Runtime:
|
48
|
-
- '0.
|
48
|
+
- '0.015612'
|
49
49
|
Server:
|
50
50
|
- WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
|
51
51
|
Date:
|
52
|
-
-
|
52
|
+
- Wed, 03 Jun 2015 17:55:08 GMT
|
53
53
|
Content-Length:
|
54
|
-
- '
|
54
|
+
- '1532'
|
55
55
|
Connection:
|
56
56
|
- Keep-Alive
|
57
57
|
body:
|
58
58
|
encoding: UTF-8
|
59
|
-
string: '{"data":{"id":"
|
60
|
-
|
61
|
-
-0700","author-name":"<COMMIT_AUTHOR_NAME>","committer-name":"<COMMIT_AUTHOR_NAME>","created-at":"2015-05-17T04:02:54.000Z","updated-at":"2015-05-17T04:02:54.000Z"},"links":{"self":"/api/v1/commits/1"}},{"id":"8","type":"builds","attributes":{"state":"finished","is-pull-request":false,"pull-request-number":0,"pull-request-title":null,"approved-at":null,"created-at":"2015-05-17T04:12:48.000Z","updated-at":"2015-05-17T04:12:48.000Z"},"links":{"self":"/api/v1/builds/8","commit":{"self":"/api/v1/builds/8/links/commit","related":"/api/v1/builds/8/commit","linkage":{"type":"commits","id":"1"}},"repo":{"self":"/api/v1/builds/8/links/repo","related":"/api/v1/builds/8/repo"},"base-build":{"self":"/api/v1/builds/8/links/base-build","related":"/api/v1/builds/8/base-build"},"approved-by":{"self":"/api/v1/builds/8/links/approved-by","related":"/api/v1/builds/8/approved-by"},"snapshots":{"self":"/api/v1/builds/8/links/snapshots","related":"/api/v1/builds/8/snapshots"},"comparisons":{"self":"/api/v1/builds/8/links/comparisons","related":"/api/v1/builds/8/comparisons"}},"meta":{"finalize-link":"/api/v1/builds/8/finalize","approve-link":"/api/v1/builds/8/approve"}}]}'
|
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":{}}]}'
|
62
61
|
http_version:
|
63
|
-
recorded_at:
|
62
|
+
recorded_at: Wed, 03 Jun 2015 17:55:08 GMT
|
64
63
|
- request:
|
65
64
|
method: post
|
66
|
-
uri: http://localhost:3000/api/v1/builds/
|
65
|
+
uri: http://localhost:3000/api/v1/builds/31429/snapshots/
|
67
66
|
body:
|
68
67
|
encoding: UTF-8
|
69
|
-
string: '{"data":{"type":"snapshots","attributes":{"name":null},"
|
68
|
+
string: '{"data":{"type":"snapshots","attributes":{"name":null},"relationships":{"resources":{"data":[]}}}}'
|
70
69
|
headers:
|
71
70
|
User-Agent:
|
72
71
|
- Faraday v0.9.1
|
73
72
|
Accept:
|
74
73
|
- "*/*"
|
75
74
|
Date:
|
76
|
-
-
|
75
|
+
- Wed, 03 Jun 2015 17:55:08 GMT
|
77
76
|
Content-Type:
|
78
77
|
- application/vnd.api+json
|
79
78
|
Authorization:
|
@@ -102,21 +101,22 @@ http_interactions:
|
|
102
101
|
Content-Type:
|
103
102
|
- application/json; charset=utf-8
|
104
103
|
X-Request-Id:
|
105
|
-
-
|
104
|
+
- 37b9c76f-65bd-41b9-8090-4a1a83a838a8
|
106
105
|
X-Runtime:
|
107
|
-
- '0.
|
106
|
+
- '0.007433'
|
108
107
|
Server:
|
109
108
|
- WEBrick/1.3.1 (Ruby/2.1.5/2014-11-13)
|
110
109
|
Date:
|
111
|
-
-
|
110
|
+
- Wed, 03 Jun 2015 17:55:08 GMT
|
112
111
|
Content-Length:
|
113
|
-
- '
|
112
|
+
- '177'
|
114
113
|
Connection:
|
115
114
|
- Keep-Alive
|
116
115
|
body:
|
117
116
|
encoding: UTF-8
|
118
|
-
string: '{"errors":[{"status":"bad_request","detail":"
|
119
|
-
|
117
|
+
string: '{"errors":[{"status":"bad_request","detail":"Exactly one resource with
|
118
|
+
''is-root'': true must be present in the ''resources'' array. Found 0 root
|
119
|
+
resources in 0 total resources."}]}'
|
120
120
|
http_version:
|
121
|
-
recorded_at:
|
121
|
+
recorded_at: Wed, 03 Jun 2015 17:55:08 GMT
|
122
122
|
recorded_with: VCR 2.9.3
|
@@ -10,9 +10,11 @@ RSpec.describe Percy::Client::Resources, :vcr do
|
|
10
10
|
expect(resource.serialize).to eq({
|
11
11
|
'type' => 'resources',
|
12
12
|
'id' => sha,
|
13
|
-
'
|
14
|
-
|
15
|
-
|
13
|
+
'attributes' => {
|
14
|
+
'resource-url' => '/foo.html',
|
15
|
+
'mimetype' => nil,
|
16
|
+
'is-root' => nil,
|
17
|
+
},
|
16
18
|
})
|
17
19
|
end
|
18
20
|
it 'can be initialized with all data' do
|
@@ -26,9 +28,11 @@ RSpec.describe Percy::Client::Resources, :vcr do
|
|
26
28
|
expect(resource.serialize).to eq({
|
27
29
|
'type' => 'resources',
|
28
30
|
'id' => sha,
|
29
|
-
'
|
30
|
-
|
31
|
-
|
31
|
+
'attributes' => {
|
32
|
+
'resource-url' => '/foo.html',
|
33
|
+
'mimetype' => 'text/html',
|
34
|
+
'is-root' => true,
|
35
|
+
},
|
32
36
|
})
|
33
37
|
end
|
34
38
|
it 'errors if not given sha or content' do
|
@@ -14,7 +14,7 @@ RSpec.describe Percy::Client::Snapshots, :vcr do
|
|
14
14
|
expect(snapshot['data']['id']).to be
|
15
15
|
expect(snapshot['data']['type']).to eq('snapshots')
|
16
16
|
expect(snapshot['data']['attributes']['name']).to eq('homepage')
|
17
|
-
expect(snapshot['data']['
|
17
|
+
expect(snapshot['data']['relationships']['missing-resources']).to be
|
18
18
|
end
|
19
19
|
it 'fails if no resources are given' do
|
20
20
|
build = Percy.create_build('fotinakis/percy-examples')
|
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.
|
4
|
+
version: 0.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: 2015-06-
|
11
|
+
date: 2015-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|