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:



353
354
355
# File 'lib/vizzly.rb', line 353

def client
  @client ||= Client.new
end

.flushObject

Flush the shared client



367
368
369
# File 'lib/vizzly.rb', line 367

def flush
  client.flush
end

.ready?Boolean

Check if the shared client is ready

Returns:

  • (Boolean)

See Also:



374
375
376
# File 'lib/vizzly.rb', line 374

def ready?
  client.ready?
end

.reset!Object

Reset the shared client (useful for testing)



379
380
381
# File 'lib/vizzly.rb', line 379

def reset!
  @client = nil
end

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

Take a screenshot using the shared client



360
361
362
# File 'lib/vizzly.rb', line 360

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