calabash/calabash-ios — pull request #481 by jmoody (2014-08-26 06:09:13+00:00)
Title: travis ci should submit an xtc job part 1

One of the biggest problems with updating the gemspec is that XTC jobs fail validation if the gem environment is not 'just so'.

This is beginning of solution for testing gemspec changes and XTC job validation in CI.

I did some testing against Travis CI, but decided to disable the XTC step until we can come up with a policy for device sets.

* Do device sets need to be private?
* Do we need to rotate devices to avoid hitting one device too often?

To run the script locally:

```
XTC_API_TOKEN and XTC_DEVICE_SET must be defined.
The default is submit an async job. To override this
set `XTC_WAIT_FOR_RESULT=1`
$ scripts/ci/travis/xtc-submit-ci.rb
```

You can define the environment variable on the command line, export them to the shell, or define them in a `calabash-ios/calabash-cucumber/test/xtc/.env` file.

_The dotenv gem is not part of the gemspec; it is installed for this test_.

This is not part of the script/ci/travis/local-run-as-travis.rb tests (yet).

### Security

* The XTC job will only run the commit/PR is submitted by a gem maintainer.
* The API Token is mine.
* The API Token and device set are encrypted and when they appear in the output they are obscured.

```
EXEC: test-cloud submit chou-cal.ipa f***6 -c cucumber.yml -p ci --series travis-ci-calabash-ios-gem -d 7***2 --async
```