Class: DuodealerApp::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



43
44
45
46
47
48
49
50
# File 'lib/duodealer_app/configuration.rb', line 43

def initialize
  @root_url = "/"
  @duodealer_domain = "duodealer.com"
  @scripttags_manager_queue_name = Rails.application.config.active_job.queue_name
  @webhooks_manager_queue_name = Rails.application.config.active_job.queue_name
  @per_user_tokens = false
  @disable_webpacker = ENV["DUODEALER_APP_DISABLE_WEBPACKER"].present?
end

Instance Attribute Details

#after_authenticate_jobObject

Returns the value of attribute after_authenticate_job.



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

def after_authenticate_job
  @after_authenticate_job
end

#api_keyObject

Returns the value of attribute api_key.



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

def api_key
  @api_key
end

#api_versionObject

Returns the value of attribute api_version.



21
22
23
# File 'lib/duodealer_app/configuration.rb', line 21

def api_version
  @api_version
end

#application_nameObject

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



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

def application_name
  @application_name
end

#disable_webpackerObject

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



35
36
37
# File 'lib/duodealer_app/configuration.rb', line 35

def disable_webpacker
  @disable_webpacker
end

#duodealer_domainObject

configure duodealer domain for local duodealer development



32
33
34
# File 'lib/duodealer_app/configuration.rb', line 32

def duodealer_domain
  @duodealer_domain
end

#embedded_appObject Also known as: embedded_app?

Returns the value of attribute embedded_app.



13
14
15
# File 'lib/duodealer_app/configuration.rb', line 13

def embedded_app
  @embedded_app
end

#enable_same_site_noneObject

allow enabling of same site none on cookies



41
42
43
# File 'lib/duodealer_app/configuration.rb', line 41

def enable_same_site_none
  @enable_same_site_none
end

#login_urlObject

Returns the value of attribute login_url.



25
26
27
# File 'lib/duodealer_app/configuration.rb', line 25

def 
  @login_url
end

#old_secretObject

Returns the value of attribute old_secret.



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

def old_secret
  @old_secret
end

#per_user_tokensObject Also known as: per_user_tokens?

Returns the value of attribute per_user_tokens.



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

def per_user_tokens
  @per_user_tokens
end

#root_urlObject

customise urls



24
25
26
# File 'lib/duodealer_app/configuration.rb', line 24

def root_url
  @root_url
end

#scopeObject

Returns the value of attribute scope.



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

def scope
  @scope
end

#scripttagsObject

Returns the value of attribute scripttags.



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

def scripttags
  @scripttags
end

#scripttags_manager_queue_nameObject

customise ActiveJob queue names



28
29
30
# File 'lib/duodealer_app/configuration.rb', line 28

def scripttags_manager_queue_name
  @scripttags_manager_queue_name
end

#secretObject

Returns the value of attribute secret.



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

def secret
  @secret
end

#session_repositoryObject

Returns the value of attribute session_repository.



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

def session_repository
  @session_repository
end

#webhook_jobs_namespaceObject

allow namespacing webhook jobs



38
39
40
# File 'lib/duodealer_app/configuration.rb', line 38

def webhook_jobs_namespace
  @webhook_jobs_namespace
end

#webhooksObject

Returns the value of attribute webhooks.



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

def webhooks
  @webhooks
end

#webhooks_manager_queue_nameObject

Returns the value of attribute webhooks_manager_queue_name.



29
30
31
# File 'lib/duodealer_app/configuration.rb', line 29

def webhooks_manager_queue_name
  @webhooks_manager_queue_name
end

Instance Method Details

#has_scripttags?Boolean

Returns:

  • (Boolean)


65
66
67
# File 'lib/duodealer_app/configuration.rb', line 65

def has_scripttags?
  scripttags.present?
end

#has_webhooks?Boolean

Returns:

  • (Boolean)


61
62
63
# File 'lib/duodealer_app/configuration.rb', line 61

def has_webhooks?
  webhooks.present?
end