Skip to content

Commit

Permalink
force aligned hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Nov 25, 2014
1 parent 2fd49b0 commit 1a04950
Show file tree
Hide file tree
Showing 14 changed files with 475 additions and 476 deletions.
5 changes: 2 additions & 3 deletions .rubocop.yml
Expand Up @@ -98,11 +98,10 @@ Metrics/ParameterLists:
Style/AccessModifierIndentation:
EnforcedStyle: outdent

# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles.
Style/AlignHash:
Enabled: false
EnforcedHashRocketStyle: table
EnforcedColonStyle: table

# Offense count: 14
# Cop supports --auto-correct.
Expand Down
4 changes: 2 additions & 2 deletions src/clients/bootloader.rb
Expand Up @@ -78,14 +78,14 @@ def main
}
},
"options" => {
"option" => {
"option" => {
# command line help text for an option
"help" => _(
"The key of the option"
),
"type" => "string"
},
"value" => {
"value" => {
# command line help text for an option
"help" => _(
"The value of the option"
Expand Down
2 changes: 1 addition & 1 deletion src/clients/inst_bootloader.rb
Expand Up @@ -69,7 +69,7 @@ def main

# FATE #302245 save kernel args etc to /etc/sysconfig/bootloader
sysconfig = ::Bootloader::Sysconfig.new(
bootloader: Bootloader.getLoaderType,
bootloader: Bootloader.getLoaderType,
secure_boot: BootCommon.getSystemSecureBootStatus(false)

)
Expand Down
36 changes: 18 additions & 18 deletions src/include/bootloader/grub/helps.rb
Expand Up @@ -20,72 +20,72 @@ def initialize_bootloader_grub_helps(_include_target)
textdomain "bootloader"

@grub_help_messages = {
"boot-menu" => _("<p><big><b>Boot Menu</b></big><br></p>"),
"activate" => _(
"boot-menu" => _("<p><big><b>Boot Menu</b></big><br></p>"),
"activate" => _(
"<p><b>Set active Flag in Partition Table for Boot Partition</b><br>\n" +
"To activate the partition which contains the boot loader. The generic MBR code will then\n" +
"boot the active partition. Older BIOSes require one partition to be active even\n" +
"if the boot loader is installed in the MBR.</p>"
),
"timeout" => _(
"timeout" => _(
"<p><b>Timeout in Seconds</b><br>\nSpecifies the time the bootloader will wait until the default kernel is loaded.</p>\n"
),
"default" => _(
"default" => _(
"<p> By pressing <b>Set as Default</b> you mark the selected section as\n" +
"the default. When booting, the boot loader will provide a boot menu and\n" +
"wait for the user to select a kernel or OS to boot. If no\n" +
"key is pressed before the timeout, the default kernel or OS will\n" +
"boot. The order of the sections in the boot loader menu can be changed\n" +
"using the <b>Up</b> and <b>Down</b> buttons.</p>\n"
),
"generic_mbr" => _(
"generic_mbr" => _(
"<p><b>Write generic Boot Code to MBR</b> replace the master boot record of your disk with generic code (OS independent code which\nboots the active partition).</p>"
),
"boot_boot" => _(
"boot_boot" => _(
"<p><b>Boot from Boot Partition</b> is one of the recommended options, the other is\n<b>Boot from Root Partition</b>.</p>"
),
"boot_mbr" => _(
"boot_mbr" => _(
"<p><b>Boot from Master Boot Record</b> is not recommended if you have another operating system\ninstalled on your computer</p>"
),
"boot_root" => _(
"boot_root" => _(
"<p><b>Boot from Root Partition</b> is the recommended option whenever there is a suitable\n" +
"partition. Either select <b>Set active Flag in Partition Table for Boot Partition</b> and <b>Write generic Boot Code to MBR</b>\n" +
"in <b>Boot Loader Options</b> to update the master boot record if that is needed or configure your other boot manager\n" +
"to start this section.</p>"
),
"boot_extended" => _(
"boot_extended" => _(
"<p><b>Boot from Extended Partition</b> should be selected if your root partition is on \nlogical partition and the /boot partition is missing</p>"
),
"boot_custom" => _(
"boot_custom" => _(
"<p><b>Custom Boot Partition</b> lets you choose a partition to boot from.</p>"
),
"enable_redundancy" => _(
"enable_redundancy" => _(
"<p>MD array is build from 2 disks. <b>Enable Redundancy for MD Array</b>\nenable to write GRUB to MBR of both disks.</p>"
),
"serial" => _(
"serial" => _(
"<p><b>Use Serial Console</b> lets you define the parameters to use\nfor a serial console. Please see the grub documentation (<code>info grub2</code>) for details.</p>"
),
"terminal" => _(
"terminal" => _(
"<p><b>Terminal Definition</b></p><br>\n" +
"Defines the type of terminal you want to use. For a serial terminal (eg. a serial console),\n" +
"you have to specify <code>serial</code>. You can also pass <code>console</code> to the\n" +
"command, as <code>serial console</code>. In this case, a terminal in which you\n" +
"press any key will be selected as a GRUB terminal.</p>"
),
"fallback" => _(
"fallback" => _(
"<p><b>Fallback Sections if default Fails</b> contains a list of section numbers\nthat will be used for booting in case the default section is unbootable.</p>"
),
"hiddenmenu" => _(
"hiddenmenu" => _(
"<p>Selecting <b>Hide Menu on Boot</b> will hide the boot menu.</p>"
),
"password" => _(
"password" => _(
"<p><b>Protect Boot Loader with Password</b><br>\n" +
"Define the password that will be required to access the boot menu. YaST will only accept the password if you repeat\n" +
"it in <b>Retype Password</b>.</p>"
),
"disk_order" =>
"disk_order" =>
# help text 1/5
_(
_(
"<p><big><b>Disks Order</b></big><br>\n" +
"To specify the order of the disks according to the order in BIOS, use\n" +
"the <b>Up</b> and <b>Down</b> buttons to reorder the disks.\n" +
Expand Down
8 changes: 4 additions & 4 deletions src/include/bootloader/grub2/dialogs.rb
Expand Up @@ -81,7 +81,7 @@ def kernel_tab
# Title in tab
"header" => _("Kernel Parameters"),
"widget_names" => widgets,
"contents" => VBox(
"contents" => VBox(
VSpacing(1),
MarginBox(1, 0.5, "vgamode"),
MarginBox(1, 0.5, "append"),
Expand All @@ -97,11 +97,11 @@ def bootloader_tab
widgets.delete("os_prober") if Arch.s390 # there is no os prober on s390(bnc#868909)

{
"id" => "bootloader_tab",
"id" => "bootloader_tab",
# Title in tab
"header" => _("Bootloader Options"),
"header" => _("Bootloader Options"),
"widget_names" => widgets,
"contents" => VBox(
"contents" => VBox(
VSpacing(2),
HBox(
HSpacing(1),
Expand Down
2 changes: 1 addition & 1 deletion src/include/bootloader/grub2/options.rb
Expand Up @@ -373,7 +373,7 @@ def Grub2Options
"store" => fun_ref(method(:StoreGlobalStr), "void (string, map)"),
"help" => Ops.get(@grub2_help_messages, "vgamode", "")
},
"pmbr" => {
"pmbr" => {
"widget" => :combobox,
"label" => @grub2_descriptions["pmbr"],
"opt" => [],
Expand Down
10 changes: 5 additions & 5 deletions src/include/bootloader/routines/global_widgets.rb
Expand Up @@ -316,20 +316,20 @@ def CommonGlobalWidgets
@_common_global_widgets = {
"adv_button" => getAdvancedButtonWidget,
"loader_type" => {
"widget" => :func,
"widget_func" => fun_ref(
"widget" => :func,
"widget_func" => fun_ref(
method(:LoaderTypeComboWidget),
"term ()"
),
"init" => fun_ref(
"init" => fun_ref(
method(:LoaderTypeComboInit),
"void (string)"
),
"handle" => fun_ref(
"handle" => fun_ref(
method(:LoaderTypeComboHandle),
"symbol (string, map)"
),
"help" => LoaderTypeHelp()
"help" => LoaderTypeHelp()
},
"loader_options" => {
"widget" => :push_button,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/bootloader/grub2base.rb
Expand Up @@ -63,7 +63,7 @@ def StandardGlobals
"vgamode" => "",
"gfxmode" => "auto",
"terminal" => Arch.s390 ? "console" : "gfxterm",
"os_prober" => disable_os_prober ? "false" : "true",
"os_prober" => disable_os_prober ? "false" : "true",
"activate" => Arch.ppc ? "true" : "false"
}
end
Expand Down
4 changes: 2 additions & 2 deletions src/lib/bootloader/sysconfig.rb
Expand Up @@ -6,7 +6,7 @@ class Sysconfig
include Yast::Logger
AGENT_PATH = Yast::Path.new(".sysconfig.bootloader")
ATTR_VALUE_MAPPING = {
bootloader: "LOADER_TYPE",
bootloader: "LOADER_TYPE",
secure_boot: "SECURE_BOOT"
}

Expand Down Expand Up @@ -39,7 +39,7 @@ def pre_write
end

PROPOSED_COMMENTS = {
bootloader: "\n" \
bootloader: "\n" \
"## Path:\tSystem/Bootloader\n" \
"## Description:\tBootloader configuration\n" \
"## Type:\tlist(grub,grub2,grub2-efi,none)\n" \
Expand Down
2 changes: 1 addition & 1 deletion src/modules/Bootloader.rb
Expand Up @@ -556,7 +556,7 @@ def ReadOrProposeIfNeeded
# Write settings to /etc/sysconfig/bootloader
def write_sysconfig
sysconfig = ::Bootloader::Sysconfig.new(
bootloader: getLoaderType,
bootloader: getLoaderType,
secure_boot: BootCommon.getSystemSecureBootStatus(false)
)
sysconfig.write
Expand Down

0 comments on commit 1a04950

Please sign in to comment.