Sha256: 5c54512fcb03b28d3dd17e4fda928bea9c69e030d393e4631c78c1583b4d124e

Contents?: true

Size: 669 Bytes

Versions: 34

Compression:

Stored size: 669 Bytes

Contents

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

      request(
        :path   => "blueprints/#{id}",
        :body   => params,
        :method => :put
      )
    end
  end

  class Mock
    def update_blueprint(params={})
      params           = Cistern::Hash.stringify_keys(params)
      blueprint_params = params["blueprint"]
      blueprint        = find(:blueprints, params["id"])

      blueprint["name"] = blueprint_params["name"]
      self.data[:blueprints][blueprint["id"]] = blueprint

      response(
        :body   => {"blueprint" => blueprint},
        :status => 200,
      )
    end
  end
end

Version data entries

34 entries across 34 versions & 2 rubygems

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