Class: IOSBox::Deploy::Testflight
- Defined in:
- lib/ios-box/deploy/testflight.rb
Instance Attribute Summary
Attributes inherited from Deployer
Instance Method Summary collapse
Methods inherited from Deployer
#create_dsym, #create_ipa, #initialize, #notify
Constructor Details
This class inherits a constructor from IOSBox::Deploy::Deployer
Instance Method Details
#deploy(opts) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/ios-box/deploy/testflight.rb', line 6 def deploy(opts) puts opts.to_yaml response = RestClient.post 'http://testflightapp.com/api/builds.plist', :api_token => opts[:apitoken], :team_token => opts[:teamtoken], :file => File.new(opts[:file], 'rb'), :notes => opts[:notes], :dsym => (File.exists?(opts[:dsym]) ? File.new(opts[:dsym], 'rb') : nil), :distribution_lists => opts[:distribution], :notify => opts[:notify], :replace => opts[:replace] if response.code == 200 pl = Plist::parse_xml(response.to_str) puts "Build Deployed." puts "See it at: #{pl['config_url']}" notify( :name => "Build Deployed", :title => "Build Deployed", :text => "Build Deployed to Testflight.\nSee build at #{pl['config_url']}") end puts "Complete build at #{pl['config_url']}" end |