Sha256: 0bc9854ce52bf061387c1018dd38fb5da03b2d638c76372f84a0be4c8b1dd80b

Contents?: true

Size: 867 Bytes

Versions: 1

Compression:

Stored size: 867 Bytes

Contents

require 'rubygems'
require 'fisheye-crucible'
require 'rest-client'

# This is the parent class for accessing Fisheye/Crucible.  This will change
#   quite a bit once work on the current Fisheye/Crucible gets started.  For
#   now, look at the docs for FisheyeCrucible::Client::Legacy to get started.
class FisheyeCrucible::Client

  # @return [Boolean] Turn debug on or off
  attr_accessor :do_debug

  ##
  # Sets up a Rest object to interact with the server(s).
  #
  # @param [String] server The base URL of the server to connect to.
  def initialize(server)
    @server = server
    @fisheye_rest = RestClient::Resource.new(@server)
    @token = nil
    @do_debug = false
  end

  ##
  # Print out string if debug is turned on.
  #
  # @param [String] string The debug string to print out.
  def debug(string)
    if @do_debug
      puts string
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fisheye-crucible-0.0.1 lib/fisheye-crucible/client.rb