Sha256: d6bb186d58d2767b0846a1491b8cc9e67d481243b8b254d2057584608c730089

Contents?: true

Size: 1.18 KB

Versions: 4

Compression:

Stored size: 1.18 KB

Contents

module RTurk
  require 'rturk/logger'

  SANDBOX = 'https://mechanicalturk.sandbox.amazonaws.com/'
  PRODUCTION = 'https://mechanicalturk.amazonaws.com/'
  API_VERSION = '2008-08-02'
  OLD_API_VERSION = '2006-05-05'

  class << self
    attr_reader :access_key, :secret_key, :host

    def setup(access_key, secret_key, opts ={})
      @access_key = access_key
      @secret_key = secret_key
      @host = opts[:sandbox] ? SANDBOX : PRODUCTION
    end

    def sandbox?
      @host == SANDBOX
    end

    def logger
      RTurk::Logger.logger
    end
  end
end

require 'rturk/utilities'
require 'rturk/xml_utilities'
require 'rturk/requester'
require 'rturk/operation'
require 'rturk/parser'
Dir.glob(File.join(File.dirname(__FILE__), 'rturk', 'operations', '*.rb')).each {|f| require f }
Dir.glob(File.join(File.dirname(__FILE__), 'rturk', 'builders', '*.rb')).each {|f| require f }
Dir.glob(File.join(File.dirname(__FILE__), 'rturk', 'adapters', '*.rb')).each {|f| require f }
Dir.glob(File.join(File.dirname(__FILE__), 'rturk', 'parsers', '*.rb')).each {|f| require f }
Dir.glob(File.join(File.dirname(__FILE__), 'rturk', 'parsers', 'responses', '*.rb')).each {|f| require f }

require 'rturk/errors'

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rturk-2.7.0 lib/rturk.rb
rturk-2.6.0 lib/rturk.rb
rturk-2.5.2 lib/rturk.rb
rturk-2.5.0 lib/rturk.rb