Sha256: 2c810967bcf1c7c0200fdb3ca905038615479da2994d0aed4cd08d8337eebf6d

Contents?: true

Size: 965 Bytes

Versions: 53

Compression:

Stored size: 965 Bytes

Contents

class Ey::Core::Client
  class Real
    def create_keypair_deployment(params={})
      url            = params.delete("url")
      keypair_id     = params["keypair"]
      environment_id = params["environment"]

      request(
        :method => :post,
        :path   => "/environments/#{environment_id}/keypairs/#{keypair_id}",
        :url    => url,
      )
    end
  end  #  Real

  class Mock
    def create_keypair_deployment(params={})
      resource_id    = self.serial_id
      keypair_id     = params["keypair"]
      environment_id = params["environment"]

      resource  =  {
        "id"      => resource_id,
        "keypair" => url_for("/keypairs/#{keypair_id}"),
        "target"  => url_for("/environments/#{environment_id}"),
      }

      self.data[:keypair_deployments][resource_id] = resource

      response(
        :body   => {"keypair_deployment" => resource},
        :status => 201,
      )
    end
  end # Mock
end # Ey::Core::Client

Version data entries

53 entries across 53 versions & 3 rubygems

Version Path
ey-core-3.6.4 lib/ey-core/requests/create_keypair_deployment.rb
ey-core-3.6.3 lib/ey-core/requests/create_keypair_deployment.rb
ey-core-3.6.1 lib/ey-core/requests/create_keypair_deployment.rb
groove-ey-core-3.6.3 lib/ey-core/requests/create_keypair_deployment.rb
groove-ey-core-3.6.2 lib/ey-core/requests/create_keypair_deployment.rb
groove-ey-core-3.6.1 lib/ey-core/requests/create_keypair_deployment.rb
ey-core-3.5.0 lib/ey-core/requests/create_keypair_deployment.rb
ey-core-3.4.4 lib/ey-core/requests/create_keypair_deployment.rb
ey-core-3.4.2 lib/ey-core/requests/create_keypair_deployment.rb
ey-core-3.4.1 lib/ey-core/requests/create_keypair_deployment.rb
ey-core-3.4.0 lib/ey-core/requests/create_keypair_deployment.rb
ey-core-3.3.1 lib/ey-core/requests/create_keypair_deployment.rb
ey-core-3.3.0 lib/ey-core/requests/create_keypair_deployment.rb
ey-core-3.2.6 lib/ey-core/requests/create_keypair_deployment.rb
ey-core-3.2.5 lib/ey-core/requests/create_keypair_deployment.rb
ey-core-3.2.4 lib/ey-core/requests/create_keypair_deployment.rb
ey-core-3.2.3 lib/ey-core/requests/create_keypair_deployment.rb
ey-core-3.2.2 lib/ey-core/requests/create_keypair_deployment.rb
ey-core-3.2.1 lib/ey-core/requests/create_keypair_deployment.rb
ey-core-3.2.0 lib/ey-core/requests/create_keypair_deployment.rb