Sha256: 24ea2a666e4d9ce5fc44341083800c08912387b5dbf17bdb345261b99c8791f8

Contents?: true

Size: 1.37 KB

Versions: 7

Compression:

Stored size: 1.37 KB

Contents

require 'active_record'
require 'rails/engine'
require 'active_support/core_ext/module'
require 'hashie'
require 'rest-client'
require 'http_store/engine'
require 'http_store/job/http_log_store_job'

module HttpStore
  extend ActiveSupport::Autoload

  REQUEST_KEYS  = %w[http_method url data_type headers query_params data other_params force request_valid retry_times]
  RESPONSE_KEYS = %w[status_code response response_headers response_data response_valid response_code cache_response]
  META_KEYS     = %w[request_digest client_type parent_id requestable_id requestable_type]
  TMP_KEYS      = %w[requestable response_obj]

  DIGEST_KEYS = %w[http_method url data_type data other_params requestable_id requestable_type]
  ALL_KEYS    = REQUEST_KEYS + RESPONSE_KEYS + META_KEYS + TMP_KEYS
  STORE_KEYS  = REQUEST_KEYS + RESPONSE_KEYS + META_KEYS

  class RequestError < StandardError; end
  class EncodingError < StandardError; end

  module Helpers
    extend ActiveSupport::Autoload

    autoload :Requestable
    autoload :Responseable
    autoload :Storable
  end

  module Middleware
    extend ActiveSupport::Autoload

    autoload :RequestLog
  end

  autoload :Engine
  autoload :VERSION
  autoload :HttpLog
  autoload :Client
  autoload :Configuration

  class << self
    def config
      @config ||= Configuration.new
    end

    def configure(&block)
      yield(config)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
http_store-0.6.19 lib/http_store.rb
http_store-0.6.18 lib/http_store.rb
http_store-0.6.17 lib/http_store.rb
http_store-0.6.16 lib/http_store.rb
http_store-0.6.15 lib/http_store.rb
http_store-0.6.14 lib/http_store.rb
http_store-0.6.13 lib/http_store.rb