Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
Conflicts:
	package/yast2.changes
  • Loading branch information
jsrain committed Jan 22, 2015
2 parents 777d845 + 0319056 commit 974114c
Show file tree
Hide file tree
Showing 13 changed files with 118 additions and 950 deletions.
16 changes: 2 additions & 14 deletions .rubocop.yml
Expand Up @@ -2,41 +2,29 @@
inherit_from:
/usr/share/YaST2/data/devtools/data/rubocop_yast_style.yml

# Offense count: 493
Metrics/AbcSize:
Max: 446

# Offense count: 51
Metrics/BlockNesting:
Max: 6
Max: 5

# Offense count: 84
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 2880

# Offense count: 184
Metrics/CyclomaticComplexity:
Max: 63

# Offense count: 1820
# Configuration parameters: AllowURI, URISchemes.
Metrics/LineLength:
Max: 274

# Offense count: 824
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 931

# Offense count: 20
# Configuration parameters: CountKeywordArgs.
Metrics/ParameterLists:
Max: 11

# Offense count: 179
Metrics/PerceivedComplexity:
Max: 76
Max: 70

# Configuration parameters: EnforcedStyle, SupportedStyles.
# JR: I personally think that having this variable on class level is much more readable
Expand Down
17 changes: 0 additions & 17 deletions library/control/src/modules/ProductControl.rb
Expand Up @@ -1104,22 +1104,6 @@ def getProposals(stage, mode, proptype)
deep_copy(final_proposals)
end

# Get Proposal list that can not be changed by the user.
# @return [Array<String>] list of locked proposals
def getLockedProposals(stage, mode, proptype)
props = getMatchingProposal(stage, mode, proptype)
locked_proposals = Builtins.maplist(
Ops.get_list(props, [0, "locked_modules"], [])
) do |p|
if !Builtins.issubstring(p, "_proposal")
next Ops.add(p, "_proposal")
else
next p
end
end
deep_copy(locked_proposals)
end

# Return text domain
def getProposalTextDomain
current_proposal_textdomain = Ops.get_string(
Expand Down Expand Up @@ -1660,7 +1644,6 @@ def ResetAdditionalWorkflowParams
publish function: :UpdateWizardSteps, type: "void (list <map>)"
publish function: :RetranslateWizardSteps, type: "void ()"
publish function: :getProposals, type: "list <list> (string, string, string)"
publish function: :getLockedProposals, type: "list <string> (string, string, string)"
publish function: :getProposalTextDomain, type: "string ()"
publish function: :getProposalProperties, type: "map (string, string, string)"
publish function: :GetTranslatedText, type: "string (string)"
Expand Down
2 changes: 0 additions & 2 deletions library/general/src/Makefile.am
Expand Up @@ -2,7 +2,6 @@

module_DATA = \
modules/Linuxrc.rb \
modules/ConfigHistory.rb \
modules/Message.rb \
modules/Misc.rb \
modules/Icon.rb \
Expand All @@ -19,7 +18,6 @@ module_DATA = \
modules/Distro.rb \
modules/XVersion.rb \
modules/Summary.rb \
modules/Syslog.rb \
modules/UIHelper.rb \
modules/DontShowAgain.rb \
modules/Report.rb \
Expand Down
35 changes: 3 additions & 32 deletions library/general/src/modules/Arch.rb
Expand Up @@ -62,7 +62,7 @@ def main
# ************************************************************
# system architecture

# Returns full architecture type (one of i386, sparc, sparc64, mips, mips64, ppc, ppc64, alpha, s390_32, s390_64, ia64, x86_64, aarch64)
# Returns full architecture type (one of i386, sparc, sparc64, ppc, ppc64, alpha, s390_32, s390_64, ia64, x86_64, aarch64)
#
# @return [String] architecture
def architecture
Expand Down Expand Up @@ -100,27 +100,6 @@ def sparc
sparc32 || sparc64
end

# true for all 32bit mips architectures
# @see #mips
# @see #mips64
def mips32
architecture == "mips"
end

# true for all 64bit mips architectures
# @see #mips
# @see #mips32
def mips64
architecture == "mips64"
end

# true for all mips architectures (32 or 64 bit)
# @see #mips32
# @see #mips64
def mips
mips32 || mips64
end

# true for all 32bit ppc architectures
# @see #ppc
# @see #ppc64
Expand Down Expand Up @@ -183,14 +162,12 @@ def aarch64
architecture == "aarch64"
end

# Returns general architecture type (one of sparc, mips, ppc, s390, i386, alpha, ia64, x86_64, aarch64)
# Returns general architecture type (one of sparc, ppc, s390, i386, alpha, ia64, x86_64, aarch64)
#
# @return [String] arch_short
def arch_short
if sparc
return "sparc"
elsif mips
return "mips"
elsif ppc
return "ppc"
elsif s390
Expand Down Expand Up @@ -505,7 +482,7 @@ def has_smp
# @see #Installation::x11_setup_needed
def x11_setup_needed
# disable X11 setup after initial boot
return false if board_iseries || s390 || mips
return false if board_iseries || s390
true
end

Expand All @@ -514,21 +491,16 @@ def x11_setup_needed
publish function: :sparc32, type: "boolean ()"
publish function: :sparc64, type: "boolean ()"
publish function: :sparc, type: "boolean ()"
publish function: :mips32, type: "boolean ()"
publish function: :mips64, type: "boolean ()"
publish function: :mips, type: "boolean ()"
publish function: :ppc32, type: "boolean ()"
publish function: :ppc64, type: "boolean ()"
publish function: :ppc, type: "boolean ()"
publish function: :alpha, type: "boolean ()"
publish function: :s390_32, type: "boolean ()"
publish function: :s390_64, type: "boolean ()"
publish function: :s390, type: "boolean ()"
publish function: :ia64, type: "boolean ()"
publish function: :x86_64, type: "boolean ()"
publish function: :aarch64, type: "boolean ()"
publish function: :arch_short, type: "string ()"
publish function: :board_compatible, type: "string ()"
publish function: :board_mac, type: "boolean ()"
publish function: :board_mac_new, type: "boolean ()"
publish function: :board_mac_old, type: "boolean ()"
Expand All @@ -544,7 +516,6 @@ def x11_setup_needed
publish function: :is_xen0, type: "boolean ()"
publish function: :is_xenU, type: "boolean ()"
publish function: :is_kvm, type: "boolean ()"
publish function: :setSMP, type: "void (boolean)"
publish function: :has_smp, type: "boolean ()"
publish function: :x11_setup_needed, type: "boolean ()"
end
Expand Down
21 changes: 0 additions & 21 deletions library/general/src/modules/AsciiFile.rb
Expand Up @@ -225,26 +225,6 @@ def FindLineField(file, field, content)
deep_copy(ret)
end

# Returns map of wanted lines
#
# @param [ArgRef<Hash>] file content
# @param [Array<Integer>] lines rows (counted from 1 to n)
# @return [Hash<Fixnum, Hash>] hash with wanted lines
def GetLines(file, lines)
lines = deep_copy(lines)
ret = {}
Builtins.foreach(lines) do |num|
if Builtins.haskey(Ops.get_map(file.value, "l", {}), num)
file_ref = arg_ref(file.value)
AssertLineValid(file_ref, num)
file.value = file_ref.value
Ops.set(ret, num, Ops.get_map(file.value, ["l", num], {}))
end
end
Builtins.y2milestone("lines %1 ret %2", lines, ret)
deep_copy(ret)
end

# Returns map of wanted line
#
# @param [ArgRef<Hash>] file content
Expand Down Expand Up @@ -403,7 +383,6 @@ def RewriteFile(file, fpath)
publish function: :SetDelimiter, type: "void (map &, string)"
publish function: :ReadFile, type: "void (map &, string)"
publish function: :FindLineField, type: "list <integer> (map, integer, string)"
publish function: :GetLines, type: "map <integer, map> (map &, list <integer>)"
publish function: :GetLine, type: "map (map &, integer)"
publish function: :NumLines, type: "integer (map)"
publish function: :ChangeLineField, type: "void (map &, integer, integer, string)"
Expand Down
5 changes: 2 additions & 3 deletions library/general/src/modules/Assert.rb
Expand Up @@ -21,12 +21,11 @@
# you may find current contact information at www.novell.com
#
# ***************************************************************************
# File: Assert.ycp
# Summary: Assertions for test cases
# Authors: Martin Vidner <mvidner@suse.cz>
require "yast"

module Yast
# Provides assertions for old yast testsuite
# @deprecated use rspec tests instead
class AssertClass < Module
# @param [Object] expected expected value of test
# @param [Object] actual actual value of test
Expand Down

0 comments on commit 974114c

Please sign in to comment.