Sha256: f0fa70296d041a19982140b9752794b26b4cb7450a734cee32edb6f12efde14b
Contents?: true
Size: 607 Bytes
Versions: 2
Compression:
Stored size: 607 Bytes
Contents
module Percy class Client module Snapshots def create_snapshot(build_id, resources, options = {}) raise ArgumentError.new('resources must be an iterable') if !resources.respond_to?(:each) name = options[:name] data = { 'data' => { 'type' => 'snapshots', 'attributes' => { 'name' => name, }, 'links' => { 'resources' => resources.map { |r| r.serialize }, }, }, } post("#{full_base}/builds/#{build_id}/snapshots/", data) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
percy-client-0.1.1 | lib/percy/client/snapshots.rb |
percy-client-0.1.0 | lib/percy/client/snapshots.rb |