Skip to content

Commit

Permalink
Rubocop fix: Style/AlignHash
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Apr 20, 2017
1 parent 2c4eef2 commit 45d0bf1
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 58 deletions.
4 changes: 2 additions & 2 deletions src/include/s390/dasd/dialogs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def ListSelectedDASD
selected = Convert.convert(
UI.QueryWidget(Id(:table), :SelectedItems),
from: "any",
to: "list <integer>"
to: "list <integer>"
)
Builtins.y2milestone("selected %1", selected)
deep_copy(selected)
Expand Down Expand Up @@ -497,7 +497,7 @@ def ReloadDASDDialog
selected = Convert.convert(
UI.QueryWidget(Id(:table), :SelectedItems),
from: "any",
to: "list <integer>"
to: "list <integer>"
)
UI.ChangeWidget(Id(:table), :Items, items)
UI.ChangeWidget(Id(:table), :SelectedItems, selected)
Expand Down
10 changes: 5 additions & 5 deletions src/include/s390/dasd/wizards.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ def initialize_s390_dasd_wizards(include_target)
# @return [Symbol] MainDASDSequence
def MainDASDSequence
aliases = {
"main" => -> { DASDDialog() },
"add" => -> { AddDASDDiskDialog() },
"main" => -> { DASDDialog() },
"add" => -> { AddDASDDiskDialog() },
"delete" => lambda() { DeleteDASDDiskDialog() }
}

sequence = {
"ws_start" => "main",
"main" => {
abort: :abort,
next: :next,
add: "add",
abort: :abort,
next: :next,
add: "add",
delete: "delete"
},
"add" => { abort: :abort, next: "main" },
Expand Down
2 changes: 1 addition & 1 deletion src/include/s390/dump/ui.rb
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def DumpDialog
selected_items = Convert.convert(
UI.QueryWidget(Id(:dasd_disks), :SelectedItems),
from: "any",
to: "list <string>"
to: "list <string>"
)
Builtins.foreach(selected_items) do |dev_line|
entries = Builtins.splitstring(dev_line, "\t")
Expand Down
40 changes: 20 additions & 20 deletions src/include/s390/iucvterminal-server/ui.rb
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ def CommitTsUserDialogSettings
grouplist = Convert.convert(
UI.QueryWidget(Id(:ts_additional_groups), :SelectedItems),
from: "any",
to: "list <string>"
to: "list <string>"
)
groups = Builtins.mergestring(grouplist, ",")
groupmap = Builtins.listmap(grouplist) { |g| { g => "1" } }
Expand All @@ -745,10 +745,10 @@ def CommitTsUserDialogSettings
@ts_member_conf,
username,
{
type: :rb_ts_list,
rb_ts_list: [],
type: :rb_ts_list,
rb_ts_list: [],
rb_ts_regex: "",
rb_ts_file: ""
rb_ts_file: ""
}
)
else
Expand All @@ -766,7 +766,7 @@ def CommitTsGroupDialogSettings
items = Convert.convert(
UI.QueryWidget(Id(:ts_table_add_groups), :Items),
from: "any",
to: "list <term>"
to: "list <term>"
)
groups = IUCVTerminalServer.GetGroups(true)

Expand Down Expand Up @@ -834,10 +834,10 @@ def CommitTsGroupDialogSettings
@ts_member_conf,
identification,
{
type: :rb_ts_list,
rb_ts_list: [],
type: :rb_ts_list,
rb_ts_list: [],
rb_ts_regex: "",
rb_ts_file: ""
rb_ts_file: ""
}
)
end
Expand Down Expand Up @@ -936,7 +936,7 @@ def GetTsGroupTableUserList
items = Convert.convert(
UI.QueryWidget(Id(:ts_table_add_groups), :Items),
from: "any",
to: "list <term>"
to: "list <term>"
)
current_group = Convert.to_string(
UI.QueryWidget(Id(:ts_table_add_groups), :CurrentItem)
Expand All @@ -963,7 +963,7 @@ def SetTSGroupTableUserList(new_list)
items = Convert.convert(
UI.QueryWidget(Id(:ts_table_add_groups), :Items),
from: "any",
to: "list <term>"
to: "list <term>"
)
current_group = Convert.to_string(
UI.QueryWidget(Id(:ts_table_add_groups), :CurrentItem)
Expand Down Expand Up @@ -1100,7 +1100,7 @@ def UpdateIdSelections(previous_ids, widget)
ids = Convert.convert(
UI.QueryWidget(Id(widget), :SelectedItems),
from: "any",
to: "list <string>"
to: "list <string>"
)

# make sure that only available ids are compared
Expand Down Expand Up @@ -1350,7 +1350,7 @@ def HandleEvent(widget)
@zvm_id_list = Convert.convert(
Builtins.union(id_list, id_list),
from: "list",
to: "list <string>"
to: "list <string>"
)
# sort list
@zvm_id_list = Builtins.sort(@zvm_id_list)
Expand All @@ -1359,7 +1359,7 @@ def HandleEvent(widget)
@zvm_id_entries = Convert.convert(
Builtins.merge([@TEXT_ALL], @zvm_id_list),
from: "list",
to: "list <string>"
to: "list <string>"
)
else
# reset list to prevent saving the previous settings
Expand All @@ -1380,7 +1380,7 @@ def HandleEvent(widget)
Convert.convert(
UI.QueryWidget(Id(:ts_table_add_groups), :Items),
from: "any",
to: "list <term>"
to: "list <term>"
)
UI.ChangeWidget(Id(:ts_groups_members), :Enabled, groups_exist)
UI.ChangeWidget(Id(:ts_groups_select), :Enabled, groups_exist)
Expand All @@ -1397,7 +1397,7 @@ def HandleEvent(widget)
table_data = Convert.convert(
UI.QueryWidget(Id(:ts_table_add_groups), :Items),
from: "any",
to: "list <term>"
to: "list <term>"
)
groupname = Convert.to_string(
UI.QueryWidget(Id(:ts_groups_name), :Value)
Expand All @@ -1416,7 +1416,7 @@ def HandleEvent(widget)
items = Convert.convert(
UI.QueryWidget(Id(:ts_table_add_groups), :Items),
from: "any",
to: "list <term>"
to: "list <term>"
)

item = Item(Id(groupname), groupname, @TEXT_YES, "new", "")
Expand All @@ -1435,7 +1435,7 @@ def HandleEvent(widget)
items = Convert.convert(
UI.QueryWidget(Id(:ts_table_add_groups), :Items),
from: "any",
to: "list <term>"
to: "list <term>"
)
groupname = Convert.to_string(
UI.QueryWidget(Id(:ts_table_add_groups), :CurrentItem)
Expand All @@ -1459,7 +1459,7 @@ def HandleEvent(widget)
user_list = Convert.convert(
UI.QueryWidget(Id(:ts_groups_members), :SelectedItems),
from: "any",
to: "list <string>"
to: "list <string>"
)
SetTSGroupTableUserList(user_list)
end
Expand Down Expand Up @@ -1509,7 +1509,7 @@ def IUCVTerminalServerDialog
@zvm_id_entries = Convert.convert(
Builtins.merge([@TEXT_ALL], @zvm_id_list),
from: "list",
to: "list <string>"
to: "list <string>"
)

# initialize screen
Expand Down Expand Up @@ -1546,7 +1546,7 @@ def IUCVTerminalServerDialog
current_items = Convert.convert(
UI.QueryWidget(Id(:ts_table_add_groups), :Items),
from: "any",
to: "list <term>"
to: "list <term>"
)
if @current_dialog == :ts_open_group_dialog &&
@ts_groups_items != current_items &&
Expand Down
4 changes: 2 additions & 2 deletions src/include/s390/zfcp/dialogs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def ListSelectedZFCP
selected = Convert.convert(
UI.QueryWidget(Id(:table), :SelectedItems),
from: "any",
to: "list <integer>"
to: "list <integer>"
)
Builtins.y2milestone("selected %1", selected)
deep_copy(selected)
Expand Down Expand Up @@ -186,7 +186,7 @@ def ReloadZFCPDialog
selected = Convert.convert(
UI.QueryWidget(Id(:table), :SelectedItems),
from: "any",
to: "list <integer>"
to: "list <integer>"
)
UI.ChangeWidget(Id(:table), :Items, items)
UI.ChangeWidget(Id(:table), :SelectedItems, selected)
Expand Down
10 changes: 5 additions & 5 deletions src/include/s390/zfcp/wizards.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ def initialize_s390_zfcp_wizards(include_target)
# @return [Symbol] dialog
def MainZFCPSequence
aliases = {
"main" => -> { ZFCPDialog() },
"add" => -> { AddZFCPDiskDialog() },
"main" => -> { ZFCPDialog() },
"add" => -> { AddZFCPDiskDialog() },
"delete" => -> { DeleteZFCPDiskDialog() }
}

sequence = {
"ws_start" => "main",
"main" => {
abort: :abort,
next: :next,
add: "add",
abort: :abort,
next: :next,
add: "add",
delete: "delete"
},
"add" => { abort: :abort, next: "main" },
Expand Down
6 changes: 3 additions & 3 deletions src/modules/DASDController.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def GetDeviceName(channel)
files = Convert.convert(
SCR.Read(path(".target.dir"), dir),
from: "any",
to: "list <string>"
to: "list <string>"
)
if Builtins.size(files) == 1
return Ops.add("/dev/", Ops.get(files, 0, ""))
Expand Down Expand Up @@ -236,7 +236,7 @@ def Export
end }

{
"devices" => l,
"devices" => l,
"format_unformatted" => @format_unformatted
}
end
Expand Down Expand Up @@ -357,7 +357,7 @@ def ProbeDisks
disks = Convert.convert(
SCR.Read(path(".probe.disk")),
from: "any",
to: "list <map <string, any>>"
to: "list <map <string, any>>"
)
disks = Builtins.filter(disks) do |d|
Builtins.tolower(Ops.get_string(d, "device", "")) == "dasd"
Expand Down
2 changes: 1 addition & 1 deletion src/modules/IUCVTerminal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def Read
parameters = Convert.convert(
SCR.Read(path(".proc.cmdline")),
from: "any",
to: "list <string>"
to: "list <string>"
)
Builtins.foreach(parameters) do |parameter|
if Builtins.regexpmatch(parameter, "console=hvc0")
Expand Down
18 changes: 9 additions & 9 deletions src/modules/IUCVTerminalServer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ def GetUsers(local)
users = Convert.convert(
Users.GetUsers("uid", "local"),
from: "map",
to: "map <string, map>"
to: "map <string, map>"
)
if !local
users = Convert.convert(
Builtins.union(users, Users.GetUsers("uid", "system")),
from: "map",
to: "map <string, map>"
to: "map <string, map>"
)
end
deep_copy(users)
Expand All @@ -114,13 +114,13 @@ def GetGroups(local)
groups = Convert.convert(
Users.GetGroups("cn", "local"),
from: "map",
to: "map <string, map>"
to: "map <string, map>"
)
if !local
groups = Convert.convert(
Builtins.union(groups, Users.GetGroups("cn", "system")),
from: "map",
to: "map <string, map>"
to: "map <string, map>"
)
end
deep_copy(groups)
Expand Down Expand Up @@ -274,10 +274,10 @@ def UpdateTsMemberConfig(name, value)
@ts_member_conf,
name,
{
type: :rb_ts_list,
rb_ts_list: [],
type: :rb_ts_list,
rb_ts_list: [],
rb_ts_regex: "",
rb_ts_file: ""
rb_ts_file: ""
}
)
end
Expand Down Expand Up @@ -394,7 +394,7 @@ def Read
@ts_audited_ids = Convert.convert(
Builtins.merge([@TEXT_ALL], @zvm_id_list),
from: "list",
to: "list <string>"
to: "list <string>"
)
else
# only add known ids
Expand All @@ -411,7 +411,7 @@ def Read
@ts_authorization_map = Convert.convert(
SCR.Read(path(".etc.iucvterm-ts-authorization.all")),
from: "any",
to: "map <string, any>"
to: "map <string, any>"
)
ts_auth_list = Ops.get_list(@ts_authorization_map, "value", [])
Builtins.foreach(ts_auth_list) do |entry|
Expand Down
10 changes: 5 additions & 5 deletions src/modules/ZFCPController.rb
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def GetControllers
@controllers = Convert.convert(
SCR.Read(path(".probe.storage")),
from: "any",
to: "list <map <string, any>>"
to: "list <map <string, any>>"
)
@controllers = Builtins.filter(@controllers) do |c|
Ops.get_string(c, "device", "") == "zFCP controller"
Expand Down Expand Up @@ -368,7 +368,7 @@ def ProbeDisks
disks = Convert.convert(
SCR.Read(path(".probe.disk")),
from: "any",
to: "list <map <string, any>>"
to: "list <map <string, any>>"
)
disks = Builtins.filter(disks) do |d|
Ops.get_string(d, "bus", "") == "SCSI"
Expand All @@ -377,7 +377,7 @@ def ProbeDisks
tapes = Convert.convert(
SCR.Read(path(".probe.tape")),
from: "any",
to: "list <map <string, any>>"
to: "list <map <string, any>>"
)
tapes = Builtins.filter(tapes) do |d|
Ops.get_string(d, "bus", "") == "SCSI"
Expand All @@ -386,7 +386,7 @@ def ProbeDisks
disks_tapes = Convert.convert(
Builtins.merge(disks, tapes),
from: "list",
to: "list <map <string, any>>"
to: "list <map <string, any>>"
)

disks_tapes = Builtins.maplist(disks_tapes) { |d| Builtins.filter(d) do |k, _v|
Expand Down Expand Up @@ -658,7 +658,7 @@ def runCommand(cmd)
cmd_output = Convert.convert(
SCR.Execute(path(".target.bash_output"), cmd),
from: "any",
to: "map <string, any>"
to: "map <string, any>"
)
if Ops.get_integer(cmd_output, "exit", -1) == 0
ret = Builtins.splitstring(
Expand Down
Loading

0 comments on commit 45d0bf1

Please sign in to comment.