Skip to content

Commit

Permalink
Merge 338e5cf into e8dfefe
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Dec 11, 2014
2 parents e8dfefe + 338e5cf commit 4412ff5
Show file tree
Hide file tree
Showing 57 changed files with 825 additions and 726 deletions.
49 changes: 49 additions & 0 deletions .rubocop.yml
@@ -0,0 +1,49 @@
inherit_from:
.rubocop_yast_style.yml

# TODO: this need some non-trivial refactoring...
Metrics/AbcSize:
Max: 111

# TODO: this need some non-trivial refactoring...
Metrics/BlockNesting:
Max: 5

# TODO: this need some non-trivial refactoring...
Metrics/ClassLength:
Max: 450

# TODO: this need some non-trivial refactoring...
Metrics/CyclomaticComplexity:
Max: 25

Metrics/LineLength:
Max: 100

# TODO: this need some non-trivial refactoring...
Metrics/MethodLength:
Max: 96

# TODO: this need some non-trivial refactoring...
Metrics/PerceivedComplexity:
Max: 25

# Offense count: 5
Style/AccessorMethodName:
Enabled: false

# Offense count: 29
Style/Documentation:
Enabled: false

# Offense count: 1
# Configuration parameters: NamePrefix, NamePrefixBlacklist.
Style/PredicateName:
Enabled: false

# def foo?
# @foo
# end
Style/TrivialAccessors:
AllowPredicates: true

37 changes: 37 additions & 0 deletions .rubocop_yast_style.yml
@@ -0,0 +1,37 @@
# Rubocop style configuration
#
# Following
# https://github.com/SUSE/style-guides/blob/master/Ruby.md

# https://github.com/SUSE/style-guides/blob/master/Ruby.md#strings
Style/StringLiterals:
EnforcedStyle: double_quotes

Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes

# https://github.com/SUSE/style-guides/blob/master/Ruby.md#arrays
Style/WordArray:
Enabled: false

# align arrows:
# "foo" => true
# "foo_bar" => false
Style/AlignHash:
EnforcedHashRocketStyle: table

# no extra indentation for multiline function calls
Style/AlignParameters:
EnforcedStyle: with_fixed_indentation

# no extra indentation for case
Style/CaseIndentation:
IndentWhenRelativeTo: end

# "unless" has a different connotation than "if not"
Style/NegatedIf:
Enabled: false

# use "raise" instead of "fail"
Style/SignalException:
EnforcedStyle: only_raise
4 changes: 3 additions & 1 deletion .travis.yml
Expand Up @@ -3,8 +3,10 @@ before_install:
# disable rvm, use system Ruby
- rvm reset
- wget https://raw.githubusercontent.com/yast/yast-devtools/SLE-12-GA/travis-tools/travis_setup.sh
- sh ./travis_setup.sh -p "yast2 yast2-slp yast2-add-on" -g bundler
- sh ./travis_setup.sh -p "yast2-devtools yast2 yast2-slp yast2-add-on" -g bundler
script:
- rake check:pot
- rubocop
- yardoc
- COVERAGE=1 bundle exec rake test:unit
- sudo rake install
Expand Down
10 changes: 6 additions & 4 deletions Gemfile
@@ -1,13 +1,15 @@
source "https://rubygems.org"

# TODO FIXME: use a correct branch here...
gem "suse-connect", :github => "SUSE/connect", :branch => "v0.2.14"
# FIXME: use a correct branch here...
gem "suse-connect", github: "SUSE/connect", branch: "v0.2.14"

group :test do
gem "rake"
gem "yard"
gem "yast-rake", ">= 0.1.9"
gem "rspec", "~> 2.14.0"
gem "simplecov", :require => false
gem "coveralls", :require => false if ENV["TRAVIS"]
gem "gettext", require: false
gem "rubocop", "~> 0.27.0", require: false
gem "simplecov", require: false
gem "coveralls", require: false if ENV["TRAVIS"]
end
1 change: 0 additions & 1 deletion Rakefile
Expand Up @@ -8,4 +8,3 @@ Yast::Tasks.configuration do |conf|
# lets ignore license check for now
conf.skip_license_check << /.*/
end

19 changes: 9 additions & 10 deletions src/clients/discover_registration_services.rb
Expand Up @@ -3,9 +3,9 @@
require "registration/url_helpers"

module Yast
import 'UI'
import 'Label'
import 'Report'
import "UI"
import "Label"
import "Report"

class DiscoverRegistrationServicesClient < Client
include Yast::Logger
Expand Down Expand Up @@ -37,9 +37,9 @@ def dialog_content
MarginBox(2, 0.5,
VBox(
# popup heading (in bold)
Heading(_('Local Registration Servers')),
Heading(_("Local Registration Servers")),
VSpacing(0.5),
Label(_("Select a detected registration server from the list\n" +
Label(_("Select a detected registration server from the list\n" \
"or the default SUSE registration server.")),
VSpacing(0.5),
RadioButtonGroup(
Expand Down Expand Up @@ -83,7 +83,7 @@ def service_url(selected)
url = ::Registration::UrlHelpers.service_url(selected_service.slp_url)
log.info "Selected service URL: #{url}"

return url
url
end

def select_registration_service
Expand All @@ -108,11 +108,10 @@ def services_radio_buttons
end

widgets.unshift(Left(RadioButton(Id("scc"),
# %s is the default SCC URL
_("SUSE Customer Center (%s)") % SUSE::Connect::Client::DEFAULT_URL,
true)))
# %s is the default SCC URL
_("SUSE Customer Center (%s)") % SUSE::Connect::Client::DEFAULT_URL,
true)))
end

end unless defined?(DiscoverRegistrationServicesClient)
DiscoverRegistrationServicesClient.new.main
end

0 comments on commit 4412ff5

Please sign in to comment.