13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/sup/api.rb', line 13
def self.add(attributes)
unless self.project_id
render "You're not in an UtSup project. Run 'sup init' to add this directory.".in_red
return false
end
create attributes.merge({:project_id => @@project_id, :branch => Sup::current_branch_name, :version => VERSION})
rescue ActiveResource::ResourceNotFound
render "Your project_id was invalid, check #{PROJECT_CONFIG_PATH}".in_red
rescue SocketError
Sup::socket_error
rescue Exception => exc
render exc.message.in_red
end
|