# File lib/rhc/rest/mock.rb, line 686 def add_application(name, type=nil, scale=nil, gear_profile='default', git_url=nil) if type.is_a?(Hash) scale = type[:scale] gear_profile = type[:gear_profile] git_url = type[:initial_git_url] tags = type[:tags] type = Array(type[:cartridges] || type[:cartridge]) end a = MockRestApplication.new(client, name, type, self, scale, gear_profile, git_url) builder = @applications.find{ |app| app.cartridges.map(&:name).any?{ |s| s =~ /^jenkins-[\d\.]+$/ } } a.building_app = builder.name if builder @applications << a a.add_message("Success") a end
# File lib/rhc/rest/mock.rb, line 712 def add_member(member) (@members ||= []) << member (attributes['members'] ||= []) << member.attributes self end
# File lib/rhc/rest/mock.rb, line 702 def applications(*args) @applications end
# File lib/rhc/rest/mock.rb, line 679 def destroy(force=false) raise RHC::Rest::ClientErrorException.new("Applications must be empty.") unless @applications.empty? or force.present? client.domains.delete_if { |d| d.name == @name } @applications = nil end
Generated with the Darkfish Rdoc Generator 2.