lib/cubits/helpers.rb
def available?
      Cubits.connection.get('/api/v1/test', foo: 'bar')
      Cubits.connection.post('/api/v1/test', foo: 'bar')
      true
    rescue StandardError => e
      Cubits.logger.error "Test connection to Cubits failed: #{e}"
      false
    end
#
# Runs a few calls to Cubits API and returns true if the connection
# to the API is configured correctly.
#
Runs a few calls to Cubits API and returns true if the connection
to the API is configured correctly.
Runs a few calls to Cubits API and returns true if the connection to the API is configured correctly .
def available?
      Cubits.connection.get('/api/v1/test', foo: 'bar')
      Cubits.connection.post('/api/v1/test', foo: 'bar')
      true
    rescue StandardError => e
      Cubits.logger.error "Test connection to Cubits failed: #{e}"
      false
    end
def available? Cubits . connection . get ( '/api/v1/test' , foo : 'bar' ) Cubits . connection . post ( '/api/v1/test' , foo : 'bar' ) true rescue StandardError => e Cubits . logger . error "Test connection to Cubits failed: #{e}" false end
Runs a few calls to Cubits API and returns true if the connection
to the API is configured correctly.
Runs a few calls to Cubits API and returns true if the connection to the API is configured correctly .