Sha256: 8d4afe9463e2c93931e25abf9a5c560b50f0893a4684143370da4d7055e82088

Contents?: true

Size: 689 Bytes

Versions: 1

Compression:

Stored size: 689 Bytes

Contents

require 'influxer/version'
require 'active_model'

# Rails client for InfluxDB
module Influxer
  def self.active_model3?
    ActiveModel::VERSION::MAJOR == 3
  end

  require 'influxer/config'
  require 'influxer/client'
  require 'influxer/metrics/metrics'

  module Model # :nodoc:
    require 'influxer/model'
  end

  require 'influxer/rails/client' if defined?(Rails)
  require 'influxer/engine' if defined?(Rails)

  def self.config
    @config ||= Config.new
  end

  def self.configure
    yield(config) if block_given?
  end

  def self.client
    @client ||= Client.new
  end

  def self.reset!
    @client.stop! unless @client.nil?
    @config = nil
    @client = nil
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
influxer-1.0.1 lib/influxer.rb