From 3cbfa31f472590c63bfbe23fef4506e3b505778e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Tue, 25 Nov 2014 15:21:55 +0100 Subject: [PATCH] rubocop: enable and fix "Style/MultilineOperationIndentation" --- .rubocop.yml | 4 --- src/clients/inst_scc.rb | 2 +- src/lib/registration/connect_helpers.rb | 2 +- src/lib/registration/registration.rb | 6 ++-- .../registration/ssl_certificate_details.rb | 14 ++++---- .../ui/import_certificate_dialog.rb | 34 +++++++++---------- 6 files changed, 29 insertions(+), 33 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 58afb3926..b009e1948 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -51,10 +51,6 @@ Style/CaseIndentation: Style/Documentation: Enabled: false -# no extra indentation for multiline operations -Style/MultilineOperationIndentation: - Enabled: false - # disabled, unless should be used only in trailing form Style/NegatedIf: Enabled: false diff --git a/src/clients/inst_scc.rb b/src/clients/inst_scc.rb index e4e75fe82..6dcce31e2 100644 --- a/src/clients/inst_scc.rb +++ b/src/clients/inst_scc.rb @@ -122,7 +122,7 @@ def register_base_system # do not re-register during installation if !Mode.normal && ::Registration::Registration.is_registered? && - options.base_registered + options.base_registered return :next end diff --git a/src/lib/registration/connect_helpers.rb b/src/lib/registration/connect_helpers.rb index ac56b6fa8..9341277d1 100644 --- a/src/lib/registration/connect_helpers.rb +++ b/src/lib/registration/connect_helpers.rb @@ -100,7 +100,7 @@ def self.catch_registration_errors(message_prefix: "", show_update_hint: false, "%s to speed up the synchronization process.\n" \ "Just wait several minutes after logging in and then retry \n" \ "the upgrade again.") % \ - SUSE::Connect::Client::DEFAULT_URL + SUSE::Connect::Client::DEFAULT_URL end # add the hint to the error details diff --git a/src/lib/registration/registration.rb b/src/lib/registration/registration.rb index 27907d85e..6a5fe2f59 100644 --- a/src/lib/registration/registration.rb +++ b/src/lib/registration/registration.rb @@ -133,9 +133,9 @@ def self.is_registered? def set_registered(remote_product) addon = Addon.find_all(self).find do |a| a.arch == remote_product.arch && - a.identifier == remote_product.identifier && - a.version == remote_product.version && - a.release_type == remote_product.release_type + a.identifier == remote_product.identifier && + a.version == remote_product.version && + a.release_type == remote_product.release_type end return unless addon diff --git a/src/lib/registration/ssl_certificate_details.rb b/src/lib/registration/ssl_certificate_details.rb index 488ab0f4e..5afa2c053 100644 --- a/src/lib/registration/ssl_certificate_details.rb +++ b/src/lib/registration/ssl_certificate_details.rb @@ -32,9 +32,9 @@ def issuer def summary(small_space: false) summary = _("Certificate:") + "\n" + _("Issued To") + "\n" + subject + - "\n" + _("Issued By") + "\n" + issuer + "\n" + _("SHA1 Fingerprint: ") + - "\n" + INDENT + certificate.fingerprint(Fingerprint::SHA1).value + "\n" + - _("SHA256 Fingerprint: ") + "\n" + "\n" + _("Issued By") + "\n" + issuer + "\n" + _("SHA1 Fingerprint: ") + + "\n" + INDENT + certificate.fingerprint(Fingerprint::SHA1).value + "\n" + + _("SHA256 Fingerprint: ") + "\n" sha256 = certificate.fingerprint(Fingerprint::SHA256).value if small_space @@ -58,10 +58,10 @@ def richtext_summary def identity_details(cn, o, ou) # label followed by the SSL certificate identification _("Common Name (CN): ") + (cn || "") + "\n" + - # label followed by the SSL certificate identification - _("Organization (O): ") + (o || "") + "\n" + - # label followed by the SSL certificate identification - _("Organization Unit (OU): ") + (ou || "") + "\n" + # label followed by the SSL certificate identification + _("Organization (O): ") + (o || "") + "\n" + + # label followed by the SSL certificate identification + _("Organization Unit (OU): ") + (ou || "") + "\n" end end end diff --git a/src/lib/registration/ui/import_certificate_dialog.rb b/src/lib/registration/ui/import_certificate_dialog.rb index 38c5f52df..132553aa6 100644 --- a/src/lib/registration/ui/import_certificate_dialog.rb +++ b/src/lib/registration/ui/import_certificate_dialog.rb @@ -116,23 +116,23 @@ def warning_text _("

Secure connection (HTTPS) uses SSL certificates for verifying the " \ "authenticity of the server and for encrypting the transferred data.

") + - # help text (RichText) for importing a SSL certificate (2/5) - _("

You can choose to import the certificate it into the list of known " \ - "certificate autohorities (CA), meaning that you trust the subject " \ - "and the issuer of the unknown certificate.

") + - - # help text (RichText) for importing a SSL certificate (3/5) - _("

Importing a certificate will allow to use for example a " \ - "self-signed certificate.

") + - - # help text (RichText) for importing a SSL certificate (4/5) - _("

Important: You should verify the fingerprint of the " \ - "certificate to be sure you import the genuine certificate from " \ - "the requested server.

") + - - # help text (RichText) for importing a SSL certificate (5/5) - _("

Importing an unknown certificate without " \ - "verification is a big security risk.

") + # help text (RichText) for importing a SSL certificate (2/5) + _("

You can choose to import the certificate it into the list of known " \ + "certificate autohorities (CA), meaning that you trust the subject " \ + "and the issuer of the unknown certificate.

") + + + # help text (RichText) for importing a SSL certificate (3/5) + _("

Importing a certificate will allow to use for example a " \ + "self-signed certificate.

") + + + # help text (RichText) for importing a SSL certificate (4/5) + _("

Important: You should verify the fingerprint of the " \ + "certificate to be sure you import the genuine certificate from " \ + "the requested server.

") + + + # help text (RichText) for importing a SSL certificate (5/5) + _("

Importing an unknown certificate without " \ + "verification is a big security risk.

") end end end