Skip to content

Commit

Permalink
allow specifying empty swift version
Browse files Browse the repository at this point in the history
to use the default
  • Loading branch information
jpsim committed May 11, 2017
1 parent 1e9d12f commit 2893436
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/jazzy/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def expand_path(path)
command_line: '--swift-version VERSION',
default: nil,
parse: ->(v) do
return nil if v.empty?
raise 'jazzy only supports Swift 2.0 or later.' if v.to_f < 2
v
end
Expand Down
4 changes: 2 additions & 2 deletions spec/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@
behaves_like cli_spec 'document_siesta',
# Siesta already has Docs/
'--output api-docs',
# Siesta specifies Swift 3.0.2 but supports 3.1
'--swift-version=3.1'
# Use default Swift rather than the specified 3.0.2
'--swift-version='
end

describe 'Creates docs for Swift project with a variety of contents' do
Expand Down
2 changes: 1 addition & 1 deletion spec/integration_specs

0 comments on commit 2893436

Please sign in to comment.