Module: ShopifyApp

Defined in:
lib/shopify_app.rb,
lib/shopify_app/utils.rb,
lib/shopify_app/engine.rb,
lib/shopify_app/errors.rb,
lib/shopify_app/logger.rb,
lib/shopify_app/version.rb,
lib/shopify_app/session/jwt.rb,
lib/shopify_app/configuration.rb,
lib/shopify_app/controller_concerns/itp.rb,
lib/shopify_app/session/session_storage.rb,
lib/shopify_app/jobs/webhooks_manager_job.rb,
lib/shopify_app/managers/webhooks_manager.rb,
lib/shopify_app/middleware/jwt_middleware.rb,
lib/shopify_app/session/session_repository.rb,
lib/shopify_app/access_scopes/noop_strategy.rb,
lib/shopify_app/access_scopes/shop_strategy.rb,
lib/shopify_app/access_scopes/user_strategy.rb,
lib/shopify_app/jobs/scripttags_manager_job.rb,
lib/shopify_app/managers/scripttags_manager.rb,
lib/shopify_app/session/shop_session_storage.rb,
lib/shopify_app/session/user_session_storage.rb,
app/controllers/shopify_app/callback_controller.rb,
app/controllers/shopify_app/sessions_controller.rb,
app/controllers/shopify_app/webhooks_controller.rb,
lib/shopify_app/session/in_memory_session_store.rb,
lib/shopify_app/session/null_user_session_store.rb,
lib/generators/shopify_app/shopify_app_generator.rb,
lib/generators/shopify_app/views/views_generator.rb,
lib/shopify_app/controller_concerns/embedded_app.rb,
lib/shopify_app/controller_concerns/localization.rb,
app/controllers/concerns/shopify_app/authenticated.rb,
lib/generators/shopify_app/routes/routes_generator.rb,
lib/shopify_app/controller_concerns/ensure_billing.rb,
lib/shopify_app/controller_concerns/csrf_protection.rb,
lib/shopify_app/controller_concerns/frame_ancestors.rb,
lib/shopify_app/test_helpers/shopify_session_helper.rb,
app/controllers/shopify_app/authenticated_controller.rb,
lib/generators/shopify_app/install/install_generator.rb,
lib/shopify_app/controller_concerns/login_protection.rb,
lib/shopify_app/controller_concerns/sanitized_params.rb,
lib/shopify_app/session/in_memory_shop_session_store.rb,
lib/shopify_app/session/in_memory_user_session_store.rb,
app/controllers/concerns/shopify_app/ensure_installed.rb,
app/controllers/concerns/shopify_app/ensure_has_session.rb,
app/controllers/concerns/shopify_app/require_known_shop.rb,
lib/shopify_app/controller_concerns/payload_verification.rb,
lib/shopify_app/controller_concerns/webhook_verification.rb,
lib/shopify_app/session/shop_session_storage_with_scopes.rb,
lib/shopify_app/session/user_session_storage_with_scopes.rb,
lib/shopify_app/test_helpers/webhook_verification_helper.rb,
lib/shopify_app/controller_concerns/redirect_for_embedded.rb,
lib/generators/shopify_app/shop_model/shop_model_generator.rb,
lib/generators/shopify_app/user_model/user_model_generator.rb,
lib/shopify_app/controller_concerns/app_proxy_verification.rb,
lib/generators/shopify_app/add_webhook/add_webhook_generator.rb,
lib/generators/shopify_app/controllers/controllers_generator.rb,
app/controllers/shopify_app/extension_verification_controller.rb,
app/controllers/concerns/shopify_app/ensure_authenticated_links.rb,
app/controllers/concerns/shopify_app/shop_access_scopes_verification.rb,
lib/generators/shopify_app/home_controller/home_controller_generator.rb,
lib/generators/shopify_app/add_privacy_jobs/add_privacy_jobs_generator.rb,
lib/generators/shopify_app/products_controller/products_controller_generator.rb,
lib/generators/shopify_app/app_proxy_controller/app_proxy_controller_generator.rb,
lib/generators/shopify_app/add_app_uninstalled_job/add_app_uninstalled_job_generator.rb,
lib/generators/shopify_app/authenticated_controller/authenticated_controller_generator.rb,
lib/generators/shopify_app/rotate_shopify_token_job/rotate_shopify_token_job_generator.rb,
lib/generators/shopify_app/add_after_authenticate_job/add_after_authenticate_job_generator.rb,
lib/generators/shopify_app/add_marketing_activity_extension/add_marketing_activity_extension_generator.rb

Defined Under Namespace

Modules: AccessScopes, AppProxyVerification, Authenticated, CsrfProtection, EmbeddedApp, EnsureAuthenticatedLinks, EnsureBilling, EnsureHasSession, EnsureInstalled, FrameAncestors, Generators, Itp, Localization, LoginProtection, PayloadVerification, RedactJobParams, RedirectForEmbedded, RequireKnownShop, SanitizedParams, SessionStorage, ShopAccessScopesVerification, ShopSessionStorage, ShopSessionStorageWithScopes, TestHelpers, UserSessionStorage, UserSessionStorageWithScopes, Utils, WebhookVerification Classes: AuthenticatedController, BillingConfiguration, BillingError, CallbackController, Configuration, ConfigurationError, CreationFailed, Engine, EnvironmentError, ExtensionVerificationController, InMemorySessionStore, InMemoryShopSessionStore, InMemoryUserSessionStore, InvalidAudienceError, InvalidDestinationError, InvalidInput, JWT, JWTMiddleware, Logger, MismatchedHostsError, MissingWebhookJobError, NullUserSessionStore, ScripttagsManager, ScripttagsManagerJob, SessionRepository, SessionsController, ShopifyDomainNotFound, ShopifyHostNotFound, WebhooksController, WebhooksManager, WebhooksManagerJob

Constant Summary collapse

VERSION =
"21.8.1"

Class Method Summary collapse

Class Method Details

.configurationObject



145
146
147
# File 'lib/shopify_app/configuration.rb', line 145

def self.configuration
  @configuration ||= Configuration.new
end

.configuration=(config) ⇒ Object



149
150
151
# File 'lib/shopify_app/configuration.rb', line 149

def self.configuration=(config)
  @configuration = config
end

.configure {|configuration| ... } ⇒ Object

Yields:



153
154
155
# File 'lib/shopify_app/configuration.rb', line 153

def self.configure
  yield configuration
end

.rails6?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/shopify_app.rb', line 11

def self.rails6?
  Rails::VERSION::MAJOR >= 6
end

.rails7?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/shopify_app.rb', line 15

def self.rails7?
  Rails::VERSION::MAJOR >= 7
end

.use_importmap?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/shopify_app.rb', line 19

def self.use_importmap?
  rails7? && File.exist?("config/importmap.rb")
end

.use_webpacker?Boolean

Returns:

  • (Boolean)


23
24
25
26
27
# File 'lib/shopify_app.rb', line 23

def self.use_webpacker?
  rails6? &&
    defined?(Webpacker) == "constant" &&
    !configuration.disable_webpacker
end