I think I got pretty close to being able to install RubyMotion and run my test suite. I recently switched to using Bitrise when Ship.io decided to shut down. I think my last remaining problem had more to do with my own test suite, so I never got it to work. However, this should get you close. I reverse engineered the command-line upgrade process, so this downloads the installer and activates your license. Let me know if this works for you!
echo 'Downloading RubyMotion...'
echo 'Fetching download URL...'
DOWNLOAD_URL=$(curl -d current_software_version=4.3 -d wanted_software_version=4.4 -d pre=false -d license_key=$RM_LICENSE_KEY -d product=rubymotion https://secure.rubymotion.com/update_software)
echo "Downloading $DOWNLOAD_URL"
curl -# -o "rubymotion.pkg" "$DOWNLOAD_URL"
echo 'Installing RubyMotion'
sudo /usr/sbin/installer -pkg "rubymotion.pkg" -target /
sudo motion activate $RM_LICENSE_KEY
sudo motion update
sudo mkdir -p ~/Library/RubyMotion/build
sudo chown -R $(whoami) ~/Library/RubyMotion
echo 'Installing Gems'
gem install bundler
# now install all the gems
bundle install --without development
echo 'Reset everything into a clean state'
bundle exec rake clean:all
echo 'Installing CocoaPods'
bundle exec rake pod:install
echo 'Running our tests'
killall "iOS Simulator"
bundle exec rake spec SIM_STDOUT_PATH=$OUT SIM_STDERR_PATH=$ERR