lib/pod/command/plugins/create.rb in cocoapods-plugins-0.4.1 vs lib/pod/command/plugins/create.rb in cocoapods-plugins-0.4.2

- old
+ new

@@ -55,11 +55,10 @@ # !@group Private helpers extend Executable executable :git - executable :ruby TEMPLATE_BASE_URL = 'https://github.com/CocoaPods/' TEMPLATE_REPO = TEMPLATE_BASE_URL + 'cocoapods-plugin-template.git' TEMPLATE_INFO_URL = TEMPLATE_BASE_URL + 'cocoapods-plugin-template' @@ -69,10 +68,18 @@ # @return [void] # def clone_template UI.section("-> Creating `#{@name}` plugin") do UI.notice "using template '#{template_repo_url}'" - git! "clone '#{template_repo_url}' #{@name}" + command = ['clone', template_repo_url, @name] + if method(:git!).arity == -1 + git! command + else + # TODO: delete this conditional and use the other branch when + # 0.5.0 is released + require 'shellwords' + git! command.map(&:to_s).map(&:shellescape).join(' ') + end end end # Runs the template configuration utilities. #