Commit caea00de authored by Kyle Fuller's avatar Kyle Fuller

Don't allow `pod lib create` to continue with a space in the pod name

Fixed a crash which was causing a failure in `pod lib create` if the name of
the Pod included spaces. As spaces are not supported now this is gracefully
handled with an informative message.

Fixes #1456
parent 54607a2d
...@@ -2,6 +2,16 @@ ...@@ -2,6 +2,16 @@
To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides/installing_cocoapods.html). To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides/installing_cocoapods.html).
## Master
###### Bug Fixes
* Fixed a crash which was causing a failure in `pod lib create` if the name of
the Pod included spaces. As spaces are not supported now this is gracefully
handled with an informative message.
[Kyle Fuller](https://github.com/kylef)
[#1456](https://github.com/CocoaPods/CocoaPods/issues/1456)
## 0.26.1 ## 0.26.1
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.25.0...0.26.0) [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.25.0...0.26.0)
[cocoapods-core](https://github.com/CocoaPods/Core/compare/0.25.0...0.26.0) [cocoapods-core](https://github.com/CocoaPods/Core/compare/0.25.0...0.26.0)
......
...@@ -23,6 +23,7 @@ module Pod ...@@ -23,6 +23,7 @@ module Pod
def validate! def validate!
super super
help! "A name for the Pod is required." unless @name help! "A name for the Pod is required." unless @name
help! "The Pod name cannot contain spaces." if @name.match(/\s/)
end end
def run def run
......
require File.expand_path('../../../spec_helper', __FILE__)
require 'xcodeproj'
module Pod
describe Command::Lib::Create do
it "complains if wrong parameters" do
lambda { run_command('lib', 'create') }.should.raise CLAide::Help
end
it "complains if pod name contains spaces" do
lambda { run_command('lib', 'create', 'Pod Name With Spaces') }.should.raise CLAide::Help
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment