Sha256: 60b97cee9667d3478746faccec4f93d80593788b10942716a3dd3d39bda34e21

Contents?: true

Size: 881 Bytes

Versions: 33

Compression:

Stored size: 881 Bytes

Contents

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

      request(
        :body   => options,
        :method => :put,
        :path   => "environments/#{id}/maintenance",
        :url    => url,
      )
    end
  end

  class Mock
    def change_environment_maintenance(options={})
      find(:environments, resource_identity(params))
      request_id = self.uuid

      request = {
        "id"           => request_id,
        "type"         => "app_deployment_maintenance",
        "successful"   => "true",
        "started_at"   => Time.now,
        "finished_at"  => nil,
        "resource_url" => nil
      }

      self.data[:requests][request_id] = request

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

Version data entries

33 entries across 33 versions & 2 rubygems

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