BasicObject
# File specs/keys_spec.rb, line 21 def check_key(the_key, key_name = "") the_key.should_not be_nil the_key.id.should be_a(String) the_key.id.should eql(key_name) the_key.actions.should_not be_nil the_key.actions.size.should eql(1) the_key.actions.first[0].should eql("destroy") the_key.actions.first[1].should eql("#{API_URL}/keys/#{key_name}") the_key.fingerprint.should_not be_nil the_key.fingerprint.should be_a(String) the_key.pem.should_not be_nil the_key.pem.first.should be_a(String) end
# File specs/spec_helper.rb, line 43 def clean_fixtures FileUtils.rm_rf( File.dirname( __FILE__ ) + '/data' ) end
# File specs/content_spec.rb, line 21 def client RestClient::Resource.new(API_URL) end
# File specs/keys_spec.rb, line 35 def create_key_if_necessary(client, key_name) the_key = client.key(key_name) unless the_key client.create_key() end end
# File specs/content_spec.rb, line 25 def headers(header) encoded_credentials = ["#{API_NAME}:#{API_PASSWORD}"].pack("m0").gsub(/\n/,'') { :authorization => "Basic " + encoded_credentials }.merge(header) end
# File specs/instance_states_spec.rb, line 74 def includes_transition( transitions, action, to ) found = transitions.find{|e| e.action.to_s == action.to_s && e.to.to_s == to.to_s } ! found.nil? end
# File bin/deltacloudc, line 81 def invalid_usage(error_msg='') puts "\n ERROR: #{error_msg} \n\n" puts @optparse exit(1) end
Generated with the Darkfish Rdoc Generator 2.