Class: PoiseLanguages::Static::Resource Private

Inherits:
Chef::Resource
  • Object
show all
Includes:
Poise
Defined in:
lib/poise_languages/static/resource.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

A ‘poise_languages_static` resource to manage installing a language from static binary archives. This is an internal implementation detail of poise-languages.

Since:

  • 1.1.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#download_retriesInteger

Number of times to retry failed downloads. Defaults to 5.

Returns:

  • (Integer)


45
# File 'lib/poise_languages/static/resource.rb', line 45

attribute(:download_retries, kind_of: Integer, default: 5)

#pathString

Directory to install to.

Returns:

  • (String)


41
# File 'lib/poise_languages/static/resource.rb', line 41

attribute(:path, kind_of: String, name_attribute: true)

#sourceString

URL to download from.

Returns:

  • (String)


49
# File 'lib/poise_languages/static/resource.rb', line 49

attribute(:source, kind_of: String, required: true)

#strip_componentsString, ...

Value to pass to tar –strip-components.

Returns:

  • (String, Integer, nil)


53
# File 'lib/poise_languages/static/resource.rb', line 53

attribute(:strip_components, kind_of: [String, Integer, NilClass], default: 1)

Instance Method Details

#cache_pathObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 1.1.0



55
56
57
# File 'lib/poise_languages/static/resource.rb', line 55

def cache_path
  @cache_path ||= ::File.join(Chef::Config[:file_cache_path], source.split(/\//).last)
end