Module: OldApiResource
- Extended by:
- ActiveSupport::Autoload
- Defined in:
- lib/old_api_resource.rb,
lib/old_api_resource/base.rb,
lib/old_api_resource/mocks.rb,
lib/old_api_resource/formats.rb,
lib/old_api_resource/railtie.rb,
lib/old_api_resource/callbacks.rb,
lib/old_api_resource/attributes.rb,
lib/old_api_resource/connection.rb,
lib/old_api_resource/exceptions.rb,
lib/old_api_resource/associations.rb,
lib/old_api_resource/model_errors.rb,
lib/old_api_resource/custom_methods.rb,
lib/old_api_resource/log_subscriber.rb,
lib/old_api_resource/associations/scope.rb,
lib/old_api_resource/formats/xml_format.rb,
lib/old_api_resource/formats/json_format.rb,
lib/old_api_resource/associations/relation_scope.rb,
lib/old_api_resource/associations/resource_scope.rb,
lib/old_api_resource/associations/association_proxy.rb,
lib/old_api_resource/associations/multi_object_proxy.rb,
lib/old_api_resource/associations/related_object_hash.rb,
lib/old_api_resource/associations/single_object_proxy.rb
Defined Under Namespace
Modules: Associations, Attributes, Callbacks, CustomMethods, Formats, Mocks, ModelErrors
Classes: BadRequest, Base, ClientError, Connection, ConnectionError, Errors, ForbiddenAccess, LogSubscriber, MethodNotAllowed, NotAcceptable, Railtie, Redirection, RequestTimeout, ResourceConflict, ResourceGone, ResourceNotFound, SSLError, ServerError, UnauthorizedAccess, UnprocessableEntity
Class Method Summary
collapse
Class Method Details
52
53
54
|
# File 'lib/old_api_resource.rb', line 52
def self.format=(new_format)
OldApiResource::Base.format = new_format
end
|
.load_mocks_and_factories ⇒ Object
39
40
41
42
43
44
45
46
|
# File 'lib/old_api_resource.rb', line 39
def self.load_mocks_and_factories
require 'hash_dealer'
Mocks.clear_endpoints
Mocks.init
Dir["#{File.dirname(__FILE__)}/../spec/support/requests/*.rb"].each {|f| require f}
Dir["#{File.dirname(__FILE__)}/../spec/support/**/*.rb"].each {|f| require f}
end
|
.logger ⇒ Object
56
57
58
59
60
61
62
|
# File 'lib/old_api_resource.rb', line 56
def self.logger
return @logger if @logger
@logger = Log4r::Logger.new("old_api_resource")
@logger.outputters = [Log4r::StdoutOutputter.new('console')]
@logger.level = Log4r::INFO
@logger
end
|
.site=(new_site) ⇒ Object
48
49
50
|
# File 'lib/old_api_resource.rb', line 48
def self.site=(new_site)
OldApiResource::Base.site = new_site
end
|