shopify_api.rb 1.2 KB

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