Skip to content

Commit

Permalink
add check for documentation and fix all found issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Nov 28, 2017
1 parent f43b04c commit 0d191da
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -9,3 +9,4 @@ script:
# the "yast-travis-ruby" script is included in the base yastdevel/ruby image
# see https://github.com/yast/docker-yast-ruby/blob/master/yast-travis-ruby
- docker run -it -e TRAVIS=1 -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" yast-ntp-client-image yast-travis-ruby
- docker run -it -e TRAVIS=1 -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" yast-ntp-client-image rake check:doc
6 changes: 0 additions & 6 deletions src/clients/ntp-client_auto.rb
Expand Up @@ -11,12 +11,6 @@
# goes through the configuration and return the setting.
# Does not do any changes to the configuration.

# @param function to execute
# @param map/list of ntp-client settings
# @return [Hash] edited settings, Summary or boolean on success depending on called function
# @example map mm = $[ "FAIL_DELAY" : "77" ];
# @example map ret = WFM::CallFunction ("ntp-client_auto", [ "Summary", mm ]);

require "fileutils"

module Yast
Expand Down
8 changes: 7 additions & 1 deletion src/lib/y2ntp_client/dialog/pool.rb
Expand Up @@ -11,7 +11,10 @@ module Y2NtpClient
module Dialog
# Dialog to add/edit ntp pool server
class Pool < CWM::Dialog
# @param pool_entry [nil, Hash]
# @param address [String] initial address for pool to show
# @param options [Hash] pool options in format where
# key is option and value is string for key value options
# or nil for keyword options
def initialize(address = "", options = {})
textdomain "ntp-client"
@address = address
Expand Down Expand Up @@ -53,6 +56,9 @@ def abort_button
""
end

# Returns value set in dialog.
# @return [Array<String, Hash>] returns pair, where first one is address and second
# is modified options ( see #initialize options parameter ).
def resulting_pool
[@address_widget.address, @options]
end
Expand Down
8 changes: 4 additions & 4 deletions src/modules/NtpClient.rb
Expand Up @@ -353,7 +353,7 @@ def reachable_ntp_server?(server)

# Test NTP server answer for a given IP version.
# @param [String] server string host name or IP address of the NTP server
# @param [Fixnum] integer ip version to use (4 or 6)
# @param [Integer] ip_version ip version to use (4 or 6)
# @return [Boolean] true if stderr does not include lookup error and exit
# code is 0
def ntp_test(server, ip_version = 4)
Expand Down Expand Up @@ -710,8 +710,8 @@ def read_known_servers
# country_server_label("Nürnberg", "") # => " (Nürnberg)"
# country_server_label("", "Deutschland") # => " (Deutschland)"
#
# @param [String] server location
# @param [String] server country
# @param [String] location of server
# @param [String] country of server
# @return [String] concatenate location and country if not empty
def country_server_label(location = "", country = "")
return "" if location.empty? && country.empty?
Expand All @@ -724,7 +724,7 @@ def country_server_label(location = "", country = "")
# each country.
# @see #MakePoolRecord
#
# @param [Hash <String, String>] known countries
# @param [Hash <String, String>] known_countries
# @return [Array <Hash>] pool records for given countries
def pool_servers_for(known_countries)
known_countries.map do |short_country, country_name|
Expand Down

0 comments on commit 0d191da

Please sign in to comment.