Skip to content

Commit df49f66

Browse files
committed
Fix Rubocop offenses
1 parent 19cbbaf commit df49f66

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/enmeshed/connector.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ module Enmeshed
44
class ConnectorError < StandardError; end
55

66
class Connector
7-
API_KEY = Settings.omniauth&.nbp&.enmeshed&.connector_api_key
8-
CONNECTOR_URL = Settings.omniauth&.nbp&.enmeshed&.connector_url
7+
API_KEY = Settings.dig(:omniauth, :nbp, :enmeshed, :connector_api_key)
8+
CONNECTOR_URL = Settings.dig(:omniauth, :nbp, :enmeshed, :connector_url)
99
API_SCHEMA = JSONSchemer.openapi(YAML.safe_load_file(Rails.root.join('lib/enmeshed/api_schema.yml'), permitted_classes: [Time, Date]))
1010

1111
# @return [String] The address of the enmeshed account.

lib/enmeshed/relationship_template.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class RelationshipTemplate < Object
88
# To minimize the risk of a template expiring before submission, we set the validity to 12 hours.
99
VALIDITY_PERIOD = 12.hours
1010
# The display name of the service as shown in the enmeshed app.
11-
DISPLAY_NAME = Settings.omniauth&.nbp&.enmeshed&.display_name
11+
DISPLAY_NAME = Settings.dig(:omniauth, :nbp, :enmeshed, :display_name)
1212
# These attributes are mandatory in the app and must be provided.
1313
# See https://enmeshed.eu/integrate/attribute-values for more attributes.
1414
REQUIRED_ATTRIBUTES = %w[GivenName Surname EMailAddress AffiliationRole].freeze
@@ -117,7 +117,7 @@ def shared_attributes
117117
end
118118

119119
def relationship_attributes
120-
if Settings.omniauth&.nbp&.enmeshed&.allow_certificate_request
120+
if Settings.dig(:omniauth, :nbp, :enmeshed, :allow_certificate_request)
121121
[
122122
{
123123
'@type': 'CreateAttributeRequestItem',

0 commit comments

Comments
 (0)