class Object

Public Instance Methods

make_request(path, debug = false) click to toggle source
# File lib/graphiti/deprecated_tasks.rb, line 12
def make_request(path, debug = false)
  if path.split("/").length == 2
    path = "#{ApplicationResource.endpoint_namespace}#{path}"
  end
  path << if path.include?("?")
    "&cache=bust"
  else
    "?cache=bust"
  end
  path = "#{path}&debug=true" if debug
  session.get(path.to_s)
  JSON.parse(session.response.body)
end
session() click to toggle source
# File lib/graphiti/deprecated_tasks.rb, line 2
def session
  @session ||= ActionDispatch::Integration::Session.new(Rails.application)
end
setup_rails!() click to toggle source
# File lib/graphiti/deprecated_tasks.rb, line 6
def setup_rails!
  Rails.application.eager_load!
  Rails.application.config.cache_classes = true
  Rails.application.config.action_controller.perform_caching = false
end