-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New rubocop (0.41.2 → 1.24.1) #603
Merged
Merged
Changes from 11 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
d03c2f6
update rubocop and run rubocop -a
jreidinger 8bc0636
new rubocop: -A fixes
jreidinger 704f241
disable more cops where change will be ugly or potentionally dangerous
jreidinger 1dda628
new rubocop: Fix HeredocDelimiterNaming
jreidinger 35a1fa0
new rubocop: fix too long lines
jreidinger 2b392b0
new rubocop: fix duplicate methods
jreidinger fe3174f
new rubocop: fix Lint/AmbiguousBlockAssociation
jreidinger 895bcd0
new rubocop: fix Lint/DuplicateBranch and Naming/MemoizedInstanceVari…
jreidinger 782b1fc
new rubocop: fix Lint/MissingSuper
jreidinger c7c1ea9
new rubocop: revert Style/SlicingWithRange as it does not work with r…
jreidinger d07dbd1
fix typo
jreidinger 3335846
Update src/lib/registration/registration.rb
jreidinger f8f5d4b
new rubocop: fix target version to reflect SLE15
jreidinger 0859b18
new rubocop: make multiline strings indented
jreidinger de13a34
remove no longer needed code
jreidinger d37285c
fix requirements in tests
jreidinger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,44 @@ | ||
|
||
require "yast/suse_connect" | ||
|
||
require "registration/helpers" | ||
require "registration/url_helpers" | ||
require "registration/ui/regservice_selection_dialog" | ||
|
||
module Yast | ||
class DiscoverRegistrationServicesClient < Client | ||
include Yast::Logger | ||
|
||
# @return [Array<SlpServiceClass::Service>] list of candidate services | ||
attr_reader :services | ||
unless defined?(DiscoverRegistrationServicesClient) | ||
class DiscoverRegistrationServicesClient < Client | ||
include Yast::Logger | ||
|
||
def initialize | ||
@services = [] | ||
end | ||
# @return [Array<SlpServiceClass::Service>] list of candidate services | ||
attr_reader :services | ||
|
||
def main | ||
textdomain "registration" | ||
@services = ::Registration::UrlHelpers.slp_discovery_feedback | ||
services.empty? ? nil : select_registration_service | ||
end | ||
def initialize | ||
super | ||
@services = [] | ||
end | ||
|
||
private | ||
def main | ||
textdomain "registration" | ||
@services = ::Registration::UrlHelpers.slp_discovery_feedback | ||
services.empty? ? nil : select_registration_service | ||
end | ||
|
||
def select_registration_service | ||
service = ::Registration::UI::RegserviceSelectionDialog.run(services: services) | ||
case service | ||
when :scc | ||
nil | ||
when :cancel | ||
:cancel | ||
else | ||
url = ::Registration::UrlHelpers.service_url(service.slp_url) | ||
log.info "Selected service URL: #{url}" | ||
url | ||
private | ||
|
||
def select_registration_service | ||
service = ::Registration::UI::RegserviceSelectionDialog.run(services: services) | ||
case service | ||
when :scc | ||
nil | ||
when :cancel | ||
:cancel | ||
else | ||
url = ::Registration::UrlHelpers.service_url(service.slp_url) | ||
log.info "Selected service URL: #{url}" | ||
url | ||
end | ||
end | ||
end | ||
end unless defined?(DiscoverRegistrationServicesClient) | ||
end | ||
DiscoverRegistrationServicesClient.new.main | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting question.
The current source for the cop thinks endless ranges should work even since Ruby 2.6:
https://github.com/rubocop/rubocop/blob/751898494b694f0520d1739b877e1add94c71366/lib/rubocop/cop/style/slicing_with_range.rb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, it is my fault. ruby in SLE15 is 2.5 and not 2.7.