Module: Vizzly

Defined in:
lib/vizzly.rb

Overview

Vizzly visual regression testing client

Defined Under Namespace

Classes: Client, Error

Constant Summary collapse

DEFAULT_TDD_PORT =

Default port for local TDD server

47392

Class Method Summary collapse

Class Method Details

.clientClient

Get or create the shared client instance

Returns:



227
228
229
# File 'lib/vizzly.rb', line 227

def client
  @client ||= Client.new
end

.flushObject

Flush the shared client



241
242
243
# File 'lib/vizzly.rb', line 241

def flush
  client.flush
end

.ready?Boolean

Check if the shared client is ready

Returns:

  • (Boolean)

See Also:



248
249
250
# File 'lib/vizzly.rb', line 248

def ready?
  client.ready?
end

.reset!Object

Reset the shared client (useful for testing)



253
254
255
# File 'lib/vizzly.rb', line 253

def reset!
  @client = nil
end

.screenshot(name, image_data, options = {}) ⇒ Object

Take a screenshot using the shared client



234
235
236
# File 'lib/vizzly.rb', line 234

def screenshot(name, image_data, options = {})
  client.screenshot(name, image_data, options)
end