Skip to content

Commit

Permalink
fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Nov 25, 2014
1 parent ccd45d1 commit a166eb7
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 55 deletions.
11 changes: 0 additions & 11 deletions .rubocop.yml
Expand Up @@ -134,17 +134,6 @@ Style/HashSyntax:
Style/IfUnlessModifier:
Enabled: false

# Offense count: 5
# Cop supports --auto-correct.
# Configuration parameters: Width.
Style/IndentationWidth:
Enabled: false

# Offense count: 1
# Cop supports --auto-correct.
Style/InfiniteLoop:
Enabled: false

# Offense count: 6
Style/Lambda:
Enabled: false
Expand Down
52 changes: 26 additions & 26 deletions src/include/bootloader/grub2/dialogs.rb
Expand Up @@ -92,33 +92,33 @@ def kernel_tab
end

def bootloader_tab
widgets = ["default", "timeout", "password", "os_prober", "hiddenmenu"]
widgets.delete("os_prober") if Arch.s390 # there is no os prober on s390(bnc#868909)

{
"id" => "bootloader_tab",
# Title in tab
"header" => _("Bootloader Options"),
"widget_names" => widgets,
"contents" => VBox(
VSpacing(2),
HBox(
HSpacing(1),
"timeout",
HSpacing(1),
VBox(
Left("os_prober"),
VSpacing(1),
Left("hiddenmenu")
),
HSpacing(1)
widgets = ["default", "timeout", "password", "os_prober", "hiddenmenu"]
widgets.delete("os_prober") if Arch.s390 # there is no os prober on s390(bnc#868909)

{
"id" => "bootloader_tab",
# Title in tab
"header" => _("Bootloader Options"),
"widget_names" => widgets,
"contents" => VBox(
VSpacing(2),
HBox(
HSpacing(1),
"timeout",
HSpacing(1),
VBox(
Left("os_prober"),
VSpacing(1),
Left("hiddenmenu")
),
VSpacing(1),
MarginBox(1, 1, "default"),
MarginBox(1, 1, "password"),
VStretch()
)
}
HSpacing(1)
),
VSpacing(1),
MarginBox(1, 1, "default"),
MarginBox(1, 1, "password"),
VStretch()
)
}
end

def Grub2TabDescr
Expand Down
10 changes: 5 additions & 5 deletions src/modules/BootGRUB2.rb
Expand Up @@ -98,7 +98,7 @@ def Write
if @orig_globals
location = ["boot_mbr", "boot_boot", "boot_root", "boot_extended", "boot_custom", "boot_custom", "activate", "generic_mbr"]
location.each do |i|
BootCommon.location_changed = true if @orig_globals[i] != BootCommon.globals[i]
BootCommon.location_changed = true if @orig_globals[i] != BootCommon.globals[i]
end
else
# there is no original, so we do not read config, but propose it
Expand Down Expand Up @@ -229,10 +229,10 @@ def urlLocationSummary
end

if ["boot_root", "boot_boot", "boot_mbr", "boot_extended"].none? { |loc| BootCommon.globals[loc] == "true" }
# no location chosen, so warn user that it is problem unless he is sure
msg = _("Warning: No location for bootloader stage1 selected." \
"Unless you know what you are doing please select above location.")
line << "<li>" << HTML.Colorize(msg, "red") << "</li>"
# no location chosen, so warn user that it is problem unless he is sure
msg = _("Warning: No location for bootloader stage1 selected." \
"Unless you know what you are doing please select above location.")
line << "<li>" << HTML.Colorize(msg, "red") << "</li>"
end

line << "</ul>"
Expand Down
26 changes: 13 additions & 13 deletions test/device_map_test.rb
Expand Up @@ -77,20 +77,20 @@
end

it "returns device map with keys mapped to mount_by option" do
map = Bootloader::DeviceMap.new(
"/dev/vdb" => "hd0",
"/dev/vda" => "hd2",
"/dev/vdc" => "hd1"
map = Bootloader::DeviceMap.new(
"/dev/vdb" => "hd0",
"/dev/vda" => "hd2",
"/dev/vdc" => "hd1"
)

expect(Bootloader::UdevMapping).to receive(:to_kernel_device)
.and_return("/dev/bla", "/dev/ble", "/dev/blabla")

expect(map.remapped_hash).to eq(
"/dev/bla" => "hd0",
"/dev/ble" => "hd2",
"/dev/blabla" => "hd1"
)

expect(Bootloader::UdevMapping).to receive(:to_kernel_device)
.and_return("/dev/bla", "/dev/ble", "/dev/blabla")

expect(map.remapped_hash).to eq(
"/dev/bla" => "hd0",
"/dev/ble" => "hd2",
"/dev/blabla" => "hd1"
)
end

it "returns not mapped map if mount_by is label and arch is not ppc" do
Expand Down

0 comments on commit a166eb7

Please sign in to comment.