Sha256: 9b49ab7d16f6897afc4ece9401fd9796141169333bd6b4662e7c7ea216bb6c1f

Contents?: true

Size: 1.18 KB

Versions: 14

Compression:

Stored size: 1.18 KB

Contents

module RTurk
  require 'rturk/logger'

  SANDBOX = 'http://mechanicalturk.sandbox.amazonaws.com/'
  PRODUCTION = 'http://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

14 entries across 14 versions & 1 rubygems

Version Path
rturk-2.4.1 lib/rturk.rb
rturk-2.4.0 lib/rturk.rb
rturk-2.3.6 lib/rturk.rb
rturk-2.3.5 lib/rturk.rb
rturk-2.3.4 lib/rturk.rb
rturk-2.3.3 lib/rturk.rb
rturk-2.3.2 lib/rturk.rb
rturk-2.3.1 lib/rturk.rb
rturk-2.3.0 lib/rturk.rb
rturk-2.2.1 lib/rturk.rb
rturk-2.2.0 lib/rturk.rb
rturk-2.1.1 lib/rturk.rb
rturk-2.1.0 lib/rturk.rb
rturk-2.0.5 lib/rturk.rb