Skip to content

Commit

Permalink
Update for the finalized v1 JSON:API spec.
Browse files Browse the repository at this point in the history
  • Loading branch information
fotinakis committed Jun 3, 2015
1 parent dcee285 commit fdc7cd1
Show file tree
Hide file tree
Showing 9 changed files with 123 additions and 119 deletions.
8 changes: 5 additions & 3 deletions lib/percy/client/resources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ def serialize
{
'type' => 'resources',
'id' => sha,
'resource-url' => resource_url,
'mimetype' => mimetype,
'is-root' => is_root,
'attributes' => {
'resource-url' => resource_url,
'mimetype' => mimetype,
'is-root' => is_root,
},
}
end

Expand Down
6 changes: 4 additions & 2 deletions lib/percy/client/snapshots.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ def create_snapshot(build_id, resources, options = {})
'attributes' => {
'name' => name,
},
'links' => {
'resources' => resources.map { |r| r.serialize },
'relationships' => {
'resources' => {
'data' => resources.map { |r| r.serialize },
},
},
},
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fdc7cd1

Please sign in to comment.