shopify_api.rb 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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/hmac_params'
  23. require 'shopify_api/api_access'
  24. require 'shopify_api/message_enricher'
  25. require 'shopify_api/connection'
  26. require 'shopify_api/pagination_link_headers'
  27. require 'shopify_api/graphql'
  28. require 'shopify_api/graphql/railtie' if defined?(Rails)
  29. if ShopifyAPI::Base.respond_to?(:connection_class)
  30. ShopifyAPI::Base.connection_class = ShopifyAPI::Connection
  31. else
  32. require 'active_resource/connection_ext'
  33. end
  34. if ENV["SHOPIFY_LOG_PATH"]
  35. ActiveResource::Base.logger = Logger.new(ENV["SHOPIFY_LOG_PATH"])
  36. ActiveResource::DetailedLogSubscriber.attach_to(:active_resource_detailed)
  37. end