lib/jazzy/config.rb in jazzy-0.14.2 vs lib/jazzy/config.rb in jazzy-0.14.3
- old
+ new
@@ -125,11 +125,11 @@
parse: ->(o) { expand_path(o) }
config_attr :clean,
command_line: ['-c', '--[no-]clean'],
description: ['Delete contents of output directory before running. ',
- 'WARNING: If --output is set to ~/Desktop, this will '\
+ 'WARNING: If --output is set to ~/Desktop, this will ' \
'delete the ~/Desktop directory.'],
default: false
config_attr :objc_mode,
command_line: '--[no-]objc',
@@ -199,20 +199,20 @@
'representing the module to be documented',
parse: ->(sd) { expand_path(sd) }
config_attr :excluded_files,
command_line: ['-e', '--exclude filepath1,filepath2,…filepathN', Array],
- description: 'Source file pathnames to be excluded from documentation. '\
+ description: 'Source file pathnames to be excluded from documentation. ' \
'Supports wildcards.',
default: [],
parse: ->(files) do
Array(files).map { |f| expand_glob_path(f).to_s }
end
config_attr :included_files,
command_line: ['-i', '--include filepath1,filepath2,…filepathN', Array],
- description: 'Source file pathnames to be included in documentation. '\
+ description: 'Source file pathnames to be included in documentation. ' \
'Supports wildcards.',
default: [],
parse: ->(files) do
Array(files).map { |f| expand_glob_path(f).to_s }
end
@@ -232,18 +232,18 @@
SWIFT_BUILD_TOOLS = %w[spm xcodebuild symbolgraph].freeze
config_attr :swift_build_tool,
command_line: "--swift-build-tool #{SWIFT_BUILD_TOOLS.join(' | ')}",
- description: 'Control whether Jazzy uses Swift Package Manager, '\
- 'xcodebuild, or swift-symbolgraph to build the module '\
- 'to be documented. By default it uses xcodebuild if '\
+ description: 'Control whether Jazzy uses Swift Package Manager, ' \
+ 'xcodebuild, or swift-symbolgraph to build the module ' \
+ 'to be documented. By default it uses xcodebuild if ' \
'there is a .xcodeproj file in the source directory.',
parse: ->(tool) do
return tool.to_sym if SWIFT_BUILD_TOOLS.include?(tool)
- raise "Unsupported swift_build_tool #{tool}, "\
+ raise "Unsupported swift_build_tool #{tool}, " \
"supported values: #{SWIFT_BUILD_TOOLS.join(', ')}"
end
# ──────── Metadata ────────
@@ -263,17 +263,17 @@
description: 'Name of module being documented. (e.g. RealmSwift)',
default: ''
config_attr :version,
command_line: '--module-version VERSION',
- description: 'Version string to use as part of the default docs '\
+ description: 'Version string to use as part of the default docs ' \
'title and inside the docset.',
default: '1.0'
config_attr :title,
command_line: '--title TITLE',
- description: 'Title to display at the top of each page, overriding the '\
+ description: 'Title to display at the top of each page, overriding the ' \
'default generated from module name and version.',
default: ''
config_attr :copyright,
command_line: '--copyright COPYRIGHT_MARKDOWN',
@@ -294,20 +294,20 @@
description: 'Glob that matches available abstracts for categories',
parse: ->(ag) { Pathname.glob(ag) }
config_attr :podspec,
command_line: '--podspec FILEPATH',
- description: 'A CocoaPods Podspec that describes the Swift library to '\
+ description: 'A CocoaPods Podspec that describes the Swift library to ' \
'document',
parse: ->(ps) { PodspecDocumenter.create_podspec(Pathname(ps)) if ps },
default: Dir['*.podspec{,.json}'].first
config_attr :pod_sources,
command_line: ['--pod-sources url1,url2,…urlN', Array],
- description: 'A list of sources to find pod dependencies. Used only '\
- 'with --podspec when the podspec contains references to '\
- 'privately hosted pods. You must include the default pod '\
+ description: 'A list of sources to find pod dependencies. Used only ' \
+ 'with --podspec when the podspec contains references to ' \
+ 'privately hosted pods. You must include the default pod ' \
'source if public pods are also used.',
default: []
config_attr :docset_icon,
command_line: '--docset-icon FILEPATH',
@@ -325,11 +325,11 @@
# ensure trailing slash for correct URI.join()
parse: ->(r) { URI(r.sub(%r{/?$}, '/')) }
config_attr :dash_url,
command_line: ['-d', '--dash_url URL'],
- description: 'Location of the dash XML feed '\
+ description: 'Location of the dash XML feed ' \
'e.g. https://realm.io/docsets/realm.xml)',
parse: ->(d) { URI(d) }
SOURCE_HOSTS = %w[github gitlab bitbucket].freeze
@@ -340,11 +340,11 @@
"Default: 'github'"],
default: 'github',
parse: ->(host) do
return host.to_sym if SOURCE_HOSTS.include?(host)
- raise "Unsupported source_host '#{host}', "\
+ raise "Unsupported source_host '#{host}', " \
"supported values: #{SOURCE_HOSTS.join(', ')}"
end
config_attr :source_host_url,
command_line: ['--source-host-url URL'],
@@ -357,28 +357,28 @@
description: 'Back-compatibility alias for source_host_url.'
config_attr :source_host_files_url,
command_line: '--source-host-files-url PREFIX',
description: [
- "The base URL on the source host of the project's files, to link "\
+ "The base URL on the source host of the project's files, to link " \
'from individual declarations.',
'For example https://github.com/realm/realm-cocoa/tree/v0.87.1',
]
alias_config_attr :github_file_prefix, :source_host_files_url,
command_line: '--github-file-prefix PREFIX',
description: 'Back-compatibility alias for source_host_files_url'
config_attr :docset_playground_url,
command_line: '--docset-playground-url URL',
- description: 'URL of an interactive playground to demonstrate the '\
+ description: 'URL of an interactive playground to demonstrate the ' \
'framework, linked to from the docset.'
# ──────── Doc generation options ────────
config_attr :disable_search,
command_line: '--disable-search',
- description: 'Avoid generating a search index. '\
+ description: 'Avoid generating a search index. ' \
'Search is available in some themes.',
default: false
config_attr :skip_documentation,
command_line: '--skip-documentation',
@@ -394,35 +394,35 @@
SourceDeclaration::AccessControlLevel.from_human_string(acl)
end
config_attr :skip_undocumented,
command_line: '--[no-]skip-undocumented',
- description: "Don't document declarations that have no documentation "\
+ description: "Don't document declarations that have no documentation " \
'comments.',
default: false
config_attr :hide_documentation_coverage,
command_line: '--[no-]hide-documentation-coverage',
description: 'Hide "(X% documented)" from the generated documents',
default: false
config_attr :custom_categories,
- description: 'Custom navigation categories to replace the standard '\
- "'Classes', 'Protocols', etc. Types not explicitly named "\
- 'in a custom category appear in generic groups at the '\
+ description: 'Custom navigation categories to replace the standard ' \
+ "'Classes', 'Protocols', etc. Types not explicitly named " \
+ 'in a custom category appear in generic groups at the ' \
'end. Example: https://git.io/v4Bcp',
default: []
config_attr :custom_categories_unlisted_prefix,
- description: "Prefix for navigation section names that aren't "\
+ description: "Prefix for navigation section names that aren't " \
'explicitly listed in `custom_categories`.',
default: 'Other '
config_attr :hide_unlisted_documentation,
command_line: '--[no-]hide-unlisted-documentation',
- description: "Don't include documentation in the sidebar from the "\
- "`documentation` config value that aren't explicitly "\
+ description: "Don't include documentation in the sidebar from the " \
+ "`documentation` config value that aren't explicitly " \
'listed in `custom_categories`.',
default: false
config_attr :custom_head,
command_line: '--head HTML',
@@ -432,13 +432,13 @@
BUILTIN_THEME_DIR = Pathname(__dir__) + 'themes'
BUILTIN_THEMES = BUILTIN_THEME_DIR.children(false).map(&:to_s)
config_attr :theme_directory,
command_line: "--theme [#{BUILTIN_THEMES.join(' | ')} | DIRPATH]",
- description: "Which theme to use. Specify either 'apple' (default), "\
- 'one of the other built-in theme names, or the path to '\
- 'your mustache templates and other assets for a custom '\
+ description: "Which theme to use. Specify either 'apple' (default), " \
+ 'one of the other built-in theme names, or the path to ' \
+ 'your mustache templates and other assets for a custom ' \
'theme.',
default: 'apple',
parse: ->(t) do
if BUILTIN_THEMES.include?(t)
BUILTIN_THEME_DIR + t
@@ -447,13 +447,13 @@
end
end
config_attr :use_safe_filenames,
command_line: '--use-safe-filenames',
- description: 'Replace unsafe characters in filenames with an encoded '\
- 'representation. This will reduce human readability of '\
- 'some URLs, but may be necessary for projects that '\
+ description: 'Replace unsafe characters in filenames with an encoded ' \
+ 'representation. This will reduce human readability of ' \
+ 'some URLs, but may be necessary for projects that ' \
'expose filename-unfriendly functions such as /(_:_:)',
default: false
config_attr :template_directory,
command_line: ['-t', '--template-directory DIRPATH'],
@@ -469,24 +469,24 @@
raise '--assets-directory is deprecated: use --theme instead.'
end
config_attr :undocumented_text,
command_line: '--undocumented-text UNDOCUMENTED_TEXT',
- description: 'Default text for undocumented symbols. The default '\
+ description: 'Default text for undocumented symbols. The default ' \
'is "Undocumented", put "" if no text is required',
default: 'Undocumented'
config_attr :separate_global_declarations,
command_line: '--[no-]separate-global-declarations',
- description: 'Create separate pages for all global declarations '\
- "(classes, structures, enums etc.) even if they don't "\
+ description: 'Create separate pages for all global declarations ' \
+ "(classes, structures, enums etc.) even if they don't " \
'have children.',
default: false
config_attr :include_spi_declarations,
command_line: '--[no-]include-spi-declarations',
- description: 'Include Swift declarations marked `@_spi` even if '\
+ description: 'Include Swift declarations marked `@_spi` even if ' \
'--min-acl is set to `public` or `open`.',
default: false
# rubocop:enable Layout/ArgumentAlignment
@@ -592,17 +592,17 @@
def validate
if source_host_configured &&
source_host_url.nil? &&
source_host_files_url.nil?
- warning 'Option `source_host` is set but has no effect without either '\
+ warning 'Option `source_host` is set but has no effect without either ' \
'`source_host_url` or `source_host_files_url`.'
end
if objc_mode &&
build_tool_arguments_configured &&
(framework_root_configured || umbrella_header_configured)
- warning 'Option `build_tool_arguments` is set: values passed to '\
+ warning 'Option `build_tool_arguments` is set: values passed to ' \
'`framework_root` or `umbrella_header` may be ignored.'
end
end
# rubocop:enable Metrics/MethodLength