Skip to content

Commit

Permalink
Update from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
dgdavid committed Aug 10, 2018
1 parent b029053 commit fb6a305
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/include/dns-server/dialog-installwizard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def initialize_dns_server_dialog_installwizard(include_target)
Yast.import "CWMFirewallInterfaces"
end

# Writes settings and save the service
# Writes settings and saves the service
#
# @return [Boolean] true if service is saved successfully; false otherwise
def write_dns_settings
Expand Down
10 changes: 5 additions & 5 deletions src/include/dns-server/dialog-main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Summary: Data for configuration of dns-server, input and output functions.
# Authors: Jiri Srain <jsrain@suse.cz>

require "yast/logger"
require "yast"
require "yast2/popup"
require "dns-server/service_widget_helpers"

Expand Down Expand Up @@ -1875,8 +1875,6 @@ def HandleExpertZonesPage(key, event)
# :back if user decided to change settings
# :abort otherwise
def WriteDialog
log.info("Running write dialog")

Wizard.RestoreHelp(write_help_text)

return :next if write_settings
Expand All @@ -1898,7 +1896,7 @@ def SaveAndRestart(event)
nil
end

# Writes DNS server settings and save the service
# Writes DNS server settings and saves the service
#
# @note currently, the DnsServer is a Perl module, reason why the write of
# settings is being performed in two steps.
Expand All @@ -1908,7 +1906,7 @@ def write_settings
DnsServer.Write && service.save
end

# Shows a popup asking to user if wants to change settings
# Shows a popup asking to the user if wants to change settings
#
# @return [Boolean] true if user decides to go back to change settings; false otherwise
def back_to_change_setting?
Expand All @@ -1919,6 +1917,8 @@ def back_to_change_setting?
# Validates and saves CWM widgets
#
# @param [Hash] event map that triggered saving
#
# @return [Boolean] false if validation fails; true otherwise
def validate_and_save_widgets(event)
return false unless CWM.validate_current_widgets(event)

Expand Down
5 changes: 3 additions & 2 deletions test/main_test.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#! /usr/bin/env rspec

require_relative "test_helper"
require_relative "../src/modules/DnsServerUI.rb"
require "dns-server/service_widget_helpers"

require "yast2/system_service"
require "dns-server/service_widget_helpers"

Yast.import "DnsServerUI"

describe "DnsServerDialogMainInclude" do
class CurrentDialogMain
Expand Down

0 comments on commit fb6a305

Please sign in to comment.