Sha256: c8be5368e92b214a94c7dea05c3b68456fcd7645f6f50edd867129b3e03bb332
Contents?: true
Size: 694 Bytes
Versions: 29
Compression:
Stored size: 694 Bytes
Contents
module Fog module Compute class DigitalOcean class Real def get_server_details(server_id) request( :expects => [200], :method => 'GET', :path => "droplets/#{server_id}" ) end end class Mock def get_server_details(server_id) response = Excon::Response.new response.status = 200 server = self.data[:servers].find { |s| s['id'] == server_id } response.body = { "status" => "OK", "droplet" => self.data[:servers].find { |s| s['id'] == server_id } } response end end end end end
Version data entries
29 entries across 29 versions & 4 rubygems