Sha256: 5e3107ee9d269aba8efe5410a7aab4a66c6e6eff9c7e8cded2fe6a6e2aac7c9f

Contents?: true

Size: 828 Bytes

Versions: 33

Compression:

Stored size: 828 Bytes

Contents

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


      request(
        :body    => {"file" => Faraday::UploadIO.new(file, "application/x-gzip")},
        :headers => {"Content-Type" => "multipart/form-data" },
        :method  => :post,
        :path    => "environments/#{id}/recipes",
        :url     => url,
      )
    end
  end

  class Mock
    def upload_recipes_for_environment(params={})
      environment = find(:environments, resource_identity(params))
      environment["custom_recipes"] = "https://#{self.uuid}.s3.amazonaws.com/#{self.uuid}?X-Amz-Expires=1800"
      self.data[:environments][environment["id"]] = environment

      response(status: 204)
    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/upload_recipes_for_environment.rb
ey-core-3.6.4 lib/ey-core/requests/upload_recipes_for_environment.rb
ey-core-3.6.3 lib/ey-core/requests/upload_recipes_for_environment.rb
ey-core-3.6.1 lib/ey-core/requests/upload_recipes_for_environment.rb
groove-ey-core-3.6.3 lib/ey-core/requests/upload_recipes_for_environment.rb
groove-ey-core-3.6.2 lib/ey-core/requests/upload_recipes_for_environment.rb
groove-ey-core-3.6.1 lib/ey-core/requests/upload_recipes_for_environment.rb
ey-core-3.5.0 lib/ey-core/requests/upload_recipes_for_environment.rb
ey-core-3.4.4 lib/ey-core/requests/upload_recipes_for_environment.rb
ey-core-3.4.2 lib/ey-core/requests/upload_recipes_for_environment.rb
ey-core-3.4.1 lib/ey-core/requests/upload_recipes_for_environment.rb
ey-core-3.4.0 lib/ey-core/requests/upload_recipes_for_environment.rb
ey-core-3.3.1 lib/ey-core/requests/upload_recipes_for_environment.rb
ey-core-3.3.0 lib/ey-core/requests/upload_recipes_for_environment.rb
ey-core-3.2.6 lib/ey-core/requests/upload_recipes_for_environment.rb
ey-core-3.2.5 lib/ey-core/requests/upload_recipes_for_environment.rb
ey-core-3.2.4 lib/ey-core/requests/upload_recipes_for_environment.rb
ey-core-3.2.3 lib/ey-core/requests/upload_recipes_for_environment.rb
ey-core-3.2.2 lib/ey-core/requests/upload_recipes_for_environment.rb
ey-core-3.2.1 lib/ey-core/requests/upload_recipes_for_environment.rb