Class: XcodeBuilder::DeploymentStrategies::Web
- Inherits:
-
Strategy
- Object
- Strategy
- XcodeBuilder::DeploymentStrategies::Web
show all
- Defined in:
- lib/xcode_builder/deployment_strategies/web.rb
Instance Method Summary
collapse
Methods inherited from Strategy
#configure, #initialize
Instance Method Details
#deploy ⇒ Object
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/xcode_builder/deployment_strategies/web.rb', line 13
def deploy
puts "Deploying to the web server : '#{@configuration.server_url}'"
payload = {
:ipa_file => File.new(@configuration.ipa_path, 'rb'),
}
statusCode = 0
begin
response = RestClient::Request.new(:method => :post, :url => "#{@configuration.server_url}", :user => "#{@configuration.server_user}", :password => "#{@configuration.server_password}", :payload => payload).execute
statusCode = response.code
rescue => e
puts "Web upload failed with exception:\n#{e}Response\n#{e.response}"
end
if (statusCode == 200) || (statusCode == 201)
puts "Web upload completed"
else
puts "Web upload failed"
end
end
|
#prepare ⇒ Object
9
10
11
|
# File 'lib/xcode_builder/deployment_strategies/web.rb', line 9
def prepare
puts "Nothing to prepare!" if @configuration.verbose
end
|