./lib/shenzhen/plugins/itunesconnect.rb in shenzhen-0.10.0 vs ./lib/shenzhen/plugins/itunesconnect.rb in shenzhen-0.10.1

- old
+ new

@@ -1,9 +1,9 @@ require 'security' -require 'pathname' require 'fileutils' require 'digest/md5' +require 'shellwords' module Shenzhen::Plugins module ITunesConnect ITUNES_CONNECT_SERVER = 'Xcode:itunesconnect.apple.com' @@ -38,14 +38,13 @@ private def transport xcode = `xcode-select --print-path`.strip - tool = Pathname.new(xcode).parent + "Applications/Application Loader.app/Contents/MacOS/itms/bin/iTMSTransporter" - tool = tool.to_s.gsub(/ /, '\ ') + tool = File.join(File.dirname(xcode), "Applications/Application Loader.app/Contents/MacOS/itms/bin/iTMSTransporter").gsub(/\s/, '\ ') - args = [tool.to_s, "-m upload", "-f Package.itmsp", "-u #{@account}", "-p #{@password}"] - command = args.join(' ').strip + args = [tool, "-m upload", "-f Package.itmsp", "-u #{Shellwords.escape(@account)}", "-p #{Shellwords.escape(@password)}"] + command = args.join(' ') say "#{command}" if verbose? output = `#{command} 2> /dev/null` say output.chomp if verbose?