Sha256: 7530510ffbd0d56da877187926b8abe65c4bb6ab1d2fa40eff3af3e8f29b51d3
Contents?: true
Size: 787 Bytes
Versions: 8
Compression:
Stored size: 787 Bytes
Contents
module Percy module Capybara class Client module Builds def current_build return if !enabled? # Silently skip if the client is disabled. @current_build ||= client.create_build(client.config.repo) end alias_method :initialize_build, :current_build def build_initialized? !!@current_build end def finalize_current_build return if !enabled? # Silently skip if the client is disabled. if !build_initialized? raise Percy::Capybara::Client::BuildNotInitializedError.new( 'Failed to finalize build because no build has been initialized.') end client.finalize_build(current_build['data']['id']) end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems