Skip to content

Commit

Permalink
make rubocop happy
Browse files Browse the repository at this point in the history
  • Loading branch information
briri committed Aug 10, 2022
1 parent 0304e04 commit a80483d
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ AllCops:
# -----------
# - GEMSPEC -
# -----------
Gemspec/DateAssignment: # new in 1.10
Gemspec/DeprecatedAttributeAssignment:
Enabled: true

# ----------
Expand Down Expand Up @@ -128,7 +128,7 @@ Metrics/BlockLength:
- 'lib/tasks/utils/*.rake'
- 'spec/**/*'

IgnoredMethods: ['describe', 'context', 'task', 'namespace']
AllowedMethods: ['describe', 'context', 'task', 'namespace']

# ------------
# - SECURITY -
Expand Down
4 changes: 2 additions & 2 deletions app/helpers/feedbacks_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ def feedback_confirmation_default_subject
end

def feedback_confirmation_default_message
_('<p>Hello %{user_name}.</p>'\
_('<p>Hello %{user_name}.</p>' \
"<p>Your plan \"%{plan_name}\" has been submitted for feedback from an
administrator at your organisation. "\
administrator at your organisation. " \
"If you have questions pertaining to this action, please contact us
at %{organisation_email}.</p>")
end
Expand Down
8 changes: 4 additions & 4 deletions config/initializers/dragonfly.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
if ENV['DRAGONFLY_AWS'] == 'true'
require 'dragonfly/s3_data_store'
datastore(:s3, {
bucket_name: ENV['AWS_BUCKET_NAME'],
access_key_id: ENV['AWS_ACCESS_KEY_ID'],
secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'],
region: ENV['AWS_REGION'],
bucket_name: ENV.fetch('AWS_BUCKET_NAME', nil),
access_key_id: ENV.fetch('AWS_ACCESS_KEY_ID', nil),
secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY', nil),
region: ENV.fetch('AWS_REGION', nil),
root_path: Rails.env,
url_scheme: 'https'
})
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/rollbar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Without configuration, Rollbar is enabled in all environments.
# To disable in specific environments, set config.enabled=false.

config.access_token = ENV['ROLLBAR_ACCESS_TOKEN']
config.access_token = ENV.fetch('ROLLBAR_ACCESS_TOKEN', nil)

# Here we'll disable in 'test':
config.enabled = false if Rails.env.test?
Expand Down
4 changes: 2 additions & 2 deletions config/initializers/translation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# domain specified in order to generate both sets of translation keys.
if !ENV['DOMAIN'] || ENV['DOMAIN'] == 'app'
TranslationIO.configure do |config|
config.api_key = ENV['TRANSLATION_API_ROADMAP']
config.api_key = ENV.fetch('TRANSLATION_API_ROADMAP', nil)
config.source_locale = 'en'
config.target_locales = %w[de en-GB en-US es fr-FR fi sv-FI pt-BR en-CA fr-CA tr-TR]
config.text_domain = 'app'
Expand All @@ -21,7 +21,7 @@
end
elsif ENV['DOMAIN'] == 'client'
TranslationIO.configure do |config|
config.api_key = ENV['TRANSLATION_API_CLIENT']
config.api_key = ENV.fetch('TRANSLATION_API_CLIENT', nil)
config.source_locale = 'en'
config.target_locales = %w[fi sv-FI]
config.text_domain = 'client'
Expand Down
4 changes: 2 additions & 2 deletions lib/cleanup/deprecators/get_deprecator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ module Deprecators
class GetDeprecator
##
# Default message to display to developer when deprecated method called.
MESSAGE = '%{deprecated_method} is deprecated. '\
'Instead, you should use: %{new_method}. '\
MESSAGE = '%{deprecated_method} is deprecated. ' \
'Instead, you should use: %{new_method}. ' \
"Read #{__FILE__} for more information."

# Message printed to STDOUT when a deprecated method is called.
Expand Down
4 changes: 2 additions & 2 deletions lib/cleanup/deprecators/predicate_deprecator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ module Deprecators
class PredicateDeprecator
##
# Default message to display to developer when deprecated method called.
MESSAGE = '%{deprecated_method} is deprecated. '\
'Instead, you should use: %{new_method}. '\
MESSAGE = '%{deprecated_method} is deprecated. ' \
'Instead, you should use: %{new_method}. ' \
"Read #{__FILE__} for more information."

# Message printed to STDOUT when a deprecated method is called.
Expand Down
4 changes: 2 additions & 2 deletions lib/cleanup/deprecators/set_deprecator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ module Deprecators
class SetDeprecator
##
# Default message to display to developer when deprecated method called.
MESSAGE = '%{deprecated_method} is deprecated. '\
'Instead, you should use: %{new_method}. '\
MESSAGE = '%{deprecated_method} is deprecated. ' \
'Instead, you should use: %{new_method}. ' \
"Read #{__FILE__} for more information."

# Message printed to STDOUT when a deprecated method is called.
Expand Down
4 changes: 2 additions & 2 deletions spec/services/external_apis/base_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
expect(@headers[:Accept]).to eql('application/json')
end
it 'sets the User-Agent header for the default Application name and contact us url' do
expected = "#{described_class.send(:app_name)}" \
" (#{described_class.send(:app_email)})"
expected = "#{described_class.send(:app_name)} " \
"(#{described_class.send(:app_email)})"
expect(@headers[:'User-Agent']).to eql(expected)
end
end
Expand Down

0 comments on commit a80483d

Please sign in to comment.