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-pro-cli-0.0.15 lib/vendor/core/ey-core/requests/create_keypair_deployment.rb
ey-pro-cli-0.0.14 lib/vendor/core/ey-core/requests/create_keypair_deployment.rb
ey-pro-cli-0.0.13 lib/vendor/core/ey-core/requests/create_keypair_deployment.rb
ey-pro-cli-0.0.12 lib/vendor/core/ey-core/requests/create_keypair_deployment.rb
ey-pro-cli-0.0.11 lib/vendor/core/ey-core/requests/create_keypair_deployment.rb
ey-pro-cli-0.0.10 lib/vendor/core/ey-core/requests/create_keypair_deployment.rb
ey-pro-cli-0.0.9 lib/vendor/core/ey-core/requests/create_keypair_deployment.rb
ey-pro-cli-0.0.8 lib/vendor/core/ey-core/requests/create_keypair_deployment.rb
ey-pro-cli-0.0.7 lib/vendor/core/ey-core/requests/create_keypair_deployment.rb
ey-pro-cli-0.0.6 lib/vendor/core/ey-core/requests/create_keypair_deployment.rb
ey-pro-cli-0.0.5 lib/vendor/core/ey-core/requests/create_keypair_deployment.rb
ey-pro-cli-0.0.4 lib/vendor/core/ey-core/requests/create_keypair_deployment.rb
ey-pro-cli-0.0.3 lib/vendor/core/ey-core/requests/create_keypair_deployment.rb