Some small YARD doc fixes.

This commit is contained in:
Eloy Durán
2014-10-20 16:53:19 +02:00
parent 0f6d698bd3
commit 8b593f831c
2 changed files with 13 additions and 9 deletions

View File

@@ -53,6 +53,8 @@ module Motion; module Project
# The platform for which to build, which in this case should always
# be `MacOSX`.
#
# @return [void]
#
# @todo Do we really need the platform parameter when it's always the same?
#
def codesign(config, platform)
@@ -89,6 +91,8 @@ module Motion; module Project
#
# @yieldreturn [String] the path to the entitlements file.
#
# @return [void]
#
def codesign_bundle(config, bundle)
if File.mtime(config.project_file) > File.mtime(bundle) \
or !system("/usr/bin/codesign --verify '#{bundle}' >& /dev/null")

View File

@@ -3,10 +3,10 @@
module Motion; module Util
module CodeSign
class << self
# @param valid_only [Boolean] Whether or not to include only valid code
# sign identities.
# @param [Boolean] valid_only
# Whether or not to include _only_ valid code sign identities.
#
# @returns [String] The raw output from querying the `security` DB.
# @return [String] The raw output from querying the `security` DB.
#
def query_security_db_for_identities(valid_only)
command = '/usr/bin/security -q find-identity -p codesigning'
@@ -14,20 +14,20 @@ module Motion; module Util
`#{command}`.strip
end
# @param valid_only [Boolean] Whether or not to include only valid code
# sign identities.
# @param [Boolean] valid_only
# Whether or not to include _only_ valid code sign identities.
#
# @returns [Hash{String => String}] The UUIDs and names of the identities.
# @return [Hash{String => String}] The UUIDs and names of the identities.
#
def identities(valid_only)
output = query_security_db_for_identities(valid_only)
Hash[*output.scan(/(\h{40})\s"(.+?)"/).flatten]
end
# @param valid_only [Boolean] Whether or not to include only valid code
# sign identities.
# @param [Boolean] valid_only
# Whether or not to include _only_ valid code sign identities.
#
# @returns [Array<String>] The names of the identities.
# @return [Array<String>] The names of the identities.
#
def identity_names(valid_only)
identities(valid_only).values