A simple Ruby api client for PhoneGap Build.
I made this as the only other Ruby gem didn't work.
Selfishly I have/will only include the api calls that I require.
If people start using it or pull requests come in then we'll see what happens.
Add this line to your application's Gemfile:
gem 'phone_gap-build'
And then execute:
$ bundle
Or install it yourself as:
$ gem install phone_gap-build
require 'phone_gap/build'
# manually set your api credentials
PhoneGap::Build.credentials(token: 'my_api_token')
# credentials are autoloaded from config/phonegap.yml if it exists and you are running in the context of bundler
# i.e. BUNDLE_GEMFILE environment variable is set.
# set what apps you got
apps = PhoneGap::Build.apps
# update an existing app
app = apps.first
app.description = 'Fancy Pants App'
app.save
# create a new app
app = PhoneGap::Build::App.new
# add any required values (see http://docs.build.phonegap.com/en_US/3.3.0/developer_api_api.md.html#PhoneGap%20Build%20Developer%20API)
app.title = 'Batman'
app.create_method = 'file'
app.file = File.new('./batman-files/gotham.city')
# save/create the app
app.save
# build the app
app.build
# check if the build is complete
app.build_complete?
# download all build platform's packages
app.download
# delete it!
app.destroy
- Fork it ( https://github.com/sebglazebrook/phone_gap-build/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request