Class: ShopifyApp::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/shopify_app/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



41
42
43
44
45
46
47
# File 'lib/shopify_app/configuration.rb', line 41

def initialize
  @root_url = '/'
  @myshopify_domain = 'myshopify.com'
  @scripttags_manager_queue_name = Rails.application.config.active_job.queue_name
  @webhooks_manager_queue_name = Rails.application.config.active_job.queue_name
  @disable_webpacker = ENV['SHOPIFY_APP_DISABLE_WEBPACKER'].present?
end

Instance Attribute Details

#after_authenticate_jobObject

Returns the value of attribute after_authenticate_job.



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

def after_authenticate_job
  @after_authenticate_job
end

#api_keyObject

Returns the value of attribute api_key.



8
9
10
# File 'lib/shopify_app/configuration.rb', line 8

def api_key
  @api_key
end

#api_versionObject

Returns the value of attribute api_version.



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

def api_version
  @api_version
end

#application_nameObject

Shopify App settings. These values should match the configuration for the app in your Shopify Partners page. Change your settings in ‘config/initializers/shopify_app.rb`



7
8
9
# File 'lib/shopify_app/configuration.rb', line 7

def application_name
  @application_name
end

#disable_webpackerObject

ability to have webpacker installed but not used in this gem and the generators



33
34
35
# File 'lib/shopify_app/configuration.rb', line 33

def disable_webpacker
  @disable_webpacker
end

#embedded_appObject Also known as: embedded_app?

Returns the value of attribute embedded_app.



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

def embedded_app
  @embedded_app
end

#enable_same_site_noneObject

allow enabling of same site none on cookies



39
40
41
# File 'lib/shopify_app/configuration.rb', line 39

def enable_same_site_none
  @enable_same_site_none
end

#login_urlObject

Returns the value of attribute login_url.



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

def 
  @login_url
end

#myshopify_domainObject

configure myshopify domain for local shopify development



30
31
32
# File 'lib/shopify_app/configuration.rb', line 30

def myshopify_domain
  @myshopify_domain
end

#old_secretObject

Returns the value of attribute old_secret.



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

def old_secret
  @old_secret
end

#root_urlObject

customise urls



22
23
24
# File 'lib/shopify_app/configuration.rb', line 22

def root_url
  @root_url
end

#scopeObject

Returns the value of attribute scope.



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

def scope
  @scope
end

#scripttagsObject

Returns the value of attribute scripttags.



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

def scripttags
  @scripttags
end

#scripttags_manager_queue_nameObject

customise ActiveJob queue names



26
27
28
# File 'lib/shopify_app/configuration.rb', line 26

def scripttags_manager_queue_name
  @scripttags_manager_queue_name
end

#secretObject

Returns the value of attribute secret.



9
10
11
# File 'lib/shopify_app/configuration.rb', line 9

def secret
  @secret
end

#shop_session_repositoryObject

Returns the value of attribute shop_session_repository.



17
18
19
# File 'lib/shopify_app/configuration.rb', line 17

def shop_session_repository
  @shop_session_repository
end

#user_session_repositoryObject

Returns the value of attribute user_session_repository.



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

def user_session_repository
  @user_session_repository
end

#webhook_jobs_namespaceObject

allow namespacing webhook jobs



36
37
38
# File 'lib/shopify_app/configuration.rb', line 36

def webhook_jobs_namespace
  @webhook_jobs_namespace
end

#webhooksObject

Returns the value of attribute webhooks.



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

def webhooks
  @webhooks
end

#webhooks_manager_queue_nameObject

Returns the value of attribute webhooks_manager_queue_name.



27
28
29
# File 'lib/shopify_app/configuration.rb', line 27

def webhooks_manager_queue_name
  @webhooks_manager_queue_name
end

Instance Method Details

#has_scripttags?Boolean

Returns:

  • (Boolean)


67
68
69
# File 'lib/shopify_app/configuration.rb', line 67

def has_scripttags?
  scripttags.present?
end

#has_webhooks?Boolean

Returns:

  • (Boolean)


63
64
65
# File 'lib/shopify_app/configuration.rb', line 63

def has_webhooks?
  webhooks.present?
end