Sha256: 6c08b9b791cd07f2516400de0a973302c45b6c9a11b6d11917ef3a00148d4382

Contents?: true

Size: 664 Bytes

Versions: 21

Compression:

Stored size: 664 Bytes

Contents

class Ey::Core::Client
  class Real
    def reset_server_state(params={})
      id  = params.delete("id")
      url = params.delete("url")

      request(
        :method => :put,
        :path   => "servers/#{id}/reset_state",
        :body   => params,
        :url    => url,
      )
    end
  end # Real

  class Mock
    def reset_server_state(params={})
      id    = params["id"]
      state = params["state"]

      if server = self.data[:servers][id]
        server[:state] = state
        response(
          :body   => {"server" => server},
          :status => 200,
        )
      else
        response(status: 404)
      end
    end
  end # Mock
end

Version data entries

21 entries across 21 versions & 2 rubygems

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