Class: SnapDeploy::Provider::Heroku::API::Slug

Inherits:
Object
  • Object
show all
Defined in:
lib/snap_deploy/provider/heroku/api.rb

Overview

A slug is a snapshot of your application code that is ready to run on the platform.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Slug

Returns a new instance of Slug.



1427
1428
1429
# File 'lib/snap_deploy/provider/heroku/api.rb', line 1427

def initialize(client)
  @client = client
end

Instance Method Details

#create(app_id_or_app_name, body) ⇒ Object

Create a new slug. For more information please refer to [Deploying Slugs using the Platform API](devcenter.heroku.com/articles/platform-api-deploying-slugs?preview=1).

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • body:

    the object to pass as the request payload



1443
1444
1445
# File 'lib/snap_deploy/provider/heroku/api.rb', line 1443

def create(app_id_or_app_name, body)
  @client.slug.create(app_id_or_app_name, body)
end

#info(app_id_or_app_name, slug_id) ⇒ Object

Info for existing slug.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • slug_id:

    unique identifier of slug



1435
1436
1437
# File 'lib/snap_deploy/provider/heroku/api.rb', line 1435

def info(app_id_or_app_name, slug_id)
  @client.slug.info(app_id_or_app_name, slug_id)
end