Module: ShopifyApp

Defined in:
lib/ruby_shopify_app.rb,
lib/ruby_shopify_app/utils.rb,
lib/ruby_shopify_app/engine.rb,
lib/ruby_shopify_app/version.rb,
lib/ruby_shopify_app/session/jwt.rb,
lib/ruby_shopify_app/configuration.rb,
lib/ruby_shopify_app/controller_concerns/itp.rb,
lib/ruby_shopify_app/session/session_storage.rb,
lib/ruby_shopify_app/jobs/webhooks_manager_job.rb,
lib/ruby_shopify_app/managers/webhooks_manager.rb,
lib/ruby_shopify_app/middleware/jwt_middleware.rb,
app/controllers/shopify_app/callback_controller.rb,
app/controllers/shopify_app/sessions_controller.rb,
app/controllers/shopify_app/webhooks_controller.rb,
lib/ruby_shopify_app/session/session_repository.rb,
lib/generators/shopify_app/shopify_app_generator.rb,
lib/generators/shopify_app/views/views_generator.rb,
lib/ruby_shopify_app/access_scopes/noop_strategy.rb,
lib/ruby_shopify_app/access_scopes/shop_strategy.rb,
lib/ruby_shopify_app/access_scopes/user_strategy.rb,
lib/ruby_shopify_app/jobs/scripttags_manager_job.rb,
lib/ruby_shopify_app/managers/scripttags_manager.rb,
lib/ruby_shopify_app/session/shop_session_storage.rb,
lib/ruby_shopify_app/session/user_session_storage.rb,
app/controllers/concerns/shopify_app/authenticated.rb,
lib/generators/shopify_app/routes/routes_generator.rb,
app/controllers/shopify_app/authenticated_controller.rb,
lib/generators/shopify_app/install/install_generator.rb,
lib/ruby_shopify_app/omniauth/omniauth_configuration.rb,
lib/ruby_shopify_app/session/in_memory_session_store.rb,
lib/ruby_shopify_app/session/null_user_session_store.rb,
lib/ruby_shopify_app/controller_concerns/embedded_app.rb,
lib/ruby_shopify_app/controller_concerns/localization.rb,
app/controllers/concerns/shopify_app/require_known_shop.rb,
lib/ruby_shopify_app/controller_concerns/csrf_protection.rb,
lib/ruby_shopify_app/controller_concerns/login_protection.rb,
lib/ruby_shopify_app/session/in_memory_shop_session_store.rb,
lib/ruby_shopify_app/session/in_memory_user_session_store.rb,
lib/generators/shopify_app/shop_model/shop_model_generator.rb,
lib/generators/shopify_app/user_model/user_model_generator.rb,
lib/ruby_shopify_app/middleware/same_site_cookie_middleware.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,
lib/ruby_shopify_app/controller_concerns/payload_verification.rb,
lib/ruby_shopify_app/controller_concerns/webhook_verification.rb,
lib/ruby_shopify_app/session/shop_session_storage_with_scopes.rb,
lib/ruby_shopify_app/session/user_session_storage_with_scopes.rb,
lib/ruby_shopify_app/test_helpers/webhook_verification_helper.rb,
app/controllers/concerns/shopify_app/ensure_authenticated_links.rb,
lib/ruby_shopify_app/controller_concerns/app_proxy_verification.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/products_controller/products_controller_generator.rb,
lib/generators/shopify_app/app_proxy_controller/app_proxy_controller_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, Generators, Itp, Localization, LoginProtection, PayloadVerification, RedactJobParams, RequireKnownShop, SessionStorage, ShopAccessScopesVerification, ShopSessionStorage, ShopSessionStorageWithScopes, TestHelpers, UserSessionStorage, UserSessionStorageWithScopes, Utils, WebhookVerification Classes: AuthenticatedController, CallbackController, Configuration, Engine, ExtensionVerificationController, InMemorySessionStore, InMemoryShopSessionStore, InMemoryUserSessionStore, JWT, JWTMiddleware, MissingWebhookJobError, NullUserSessionStore, OmniAuthConfiguration, SameSiteCookieMiddleware, ScripttagsManager, ScripttagsManagerJob, SessionRepository, SessionsController, WebhooksController, WebhooksManager, WebhooksManagerJob

Constant Summary collapse

VERSION =
"1.3.3"

Class Method Summary collapse

Class Method Details

.configurationObject



108
109
110
# File 'lib/ruby_shopify_app/configuration.rb', line 108

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

.configuration=(config) ⇒ Object



112
113
114
# File 'lib/ruby_shopify_app/configuration.rb', line 112

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

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

Yields:



116
117
118
# File 'lib/ruby_shopify_app/configuration.rb', line 116

def self.configure
  yield configuration
end

.rails6?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/ruby_shopify_app.rb', line 12

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

.rails7?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/ruby_shopify_app.rb', line 16

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

.use_importmap?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/ruby_shopify_app.rb', line 20

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

.use_webpacker?Boolean

Returns:

  • (Boolean)


24
25
26
27
28
# File 'lib/ruby_shopify_app.rb', line 24

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