shopify_api.rb 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # frozen_string_literal: true
  2. $:.unshift(File.dirname(__FILE__))
  3. require 'active_resource'
  4. require 'active_support/core_ext/class/attribute_accessors'
  5. require 'digest/md5'
  6. require 'base64'
  7. require 'active_resource/detailed_log_subscriber'
  8. require 'shopify_api/limits'
  9. require 'shopify_api/api_version'
  10. require 'shopify_api/meta'
  11. require 'active_resource/json_errors'
  12. require 'shopify_api/paginated_collection'
  13. require 'shopify_api/disable_prefix_check'
  14. module ShopifyAPI
  15. include Limits
  16. end
  17. require 'shopify_api/events'
  18. require 'shopify_api/metafields'
  19. require 'shopify_api/countable'
  20. require 'shopify_api/resources'
  21. require 'shopify_api/session'
  22. require 'shopify_api/api_access'
  23. require 'shopify_api/message_enricher'
  24. require 'shopify_api/connection'
  25. require 'shopify_api/pagination_link_headers'
  26. require 'shopify_api/graphql'
  27. require 'shopify_api/graphql/railtie' if defined?(Rails)
  28. if ShopifyAPI::Base.respond_to?(:connection_class)
  29. ShopifyAPI::Base.connection_class = ShopifyAPI::Connection
  30. else
  31. require 'active_resource/connection_ext'
  32. end
  33. if ENV["SHOPIFY_LOG_PATH"]
  34. ActiveResource::Base.logger = Logger.new(ENV["SHOPIFY_LOG_PATH"])
  35. ActiveResource::DetailedLogSubscriber.attach_to(:active_resource_detailed)
  36. end