Sha256: 1a6a152fc70d7b70252b0a610ae43f55e61e0b277ac4ebd8205689d0b08fad75

Contents?: true

Size: 793 Bytes

Versions: 7

Compression:

Stored size: 793 Bytes

Contents

require 'uri'
require 'socket'
require 'net/http'
require 'fileutils'

[
  'version',
  'engine',
  'error',
  'response',
  'api'
].each{ |f| require "woopra_rails/#{f}" }

module WoopraRails
  @endpoint     = 'http://www.woopra.com/track/ce/'
  @dryrun       = false
  @config       = {}
  @env          = "development"
  @base_params  = ""

  class << self
    def config=(config)
      @config = config
    end

    def init
      begin
        @env = ::Rails.env if defined? Rails
        def dryrun
          return @config["dryrun"] == true
        end
        @base_params = "#{@endpoint}?host=#{account}&response=json&timeout=300000"
      rescue Exception => e
        puts("Error on init: #{e.message}")
      end
    end

    def account
      @config["account"]
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
woopra_rails-1.1.9 lib/woopra_rails.rb
woopra_rails-1.1.8 lib/woopra_rails.rb
woopra_rails-1.1.7 lib/woopra_rails.rb
woopra_rails-1.1.6 lib/woopra_rails.rb
woopra_rails-1.1.5 lib/woopra_rails.rb
woopra_rails-1.1.3 lib/woopra_rails.rb
woopra_rails-1.1.2 lib/woopra_rails.rb