Class: BuildpackSupport::Rake::PackageTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- BuildpackSupport::Rake::PackageTask
- Defined in:
- lib/buildpack_support/rake/package_task.rb
Overview
A task generator for the package
task. Responsible for creating the package
task and all of the sub-tasks that are required to do the work of creating the package
Instance Attribute Summary collapse
-
#build_dir ⇒ String
The directory to place the created package in.
-
#files ⇒ Array<String>
The files to copy to the
staging_dir
. -
#name ⇒ String
The name of the task.
-
#prefix ⇒ String
The prefix of the package that is created.
-
#staging_dir ⇒ String
The directory to zip the contents of.
-
#verbose ⇒ Boolean
The verbosity of the task.
Instance Method Summary collapse
-
#initialize(*args, &task_block) ⇒ PackageTask
constructor
A new instance of PackageTask.
Constructor Details
#initialize(*args, &task_block) ⇒ PackageTask
Returns a new instance of PackageTask.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/buildpack_support/rake/package_task.rb', line 58 def initialize(*args, &task_block) setup_ivars args task_block.call(*[self].slice(0, task_block.arity)) if task_block abort 'package prefix must be configured' unless prefix CLEAN.include build_dir, staging_dir desc 'Create packaged buildpack' unless ::Rake.application.last_comment task(name, *args) task name => package_name add_universal_tasks add_offline_tasks if @buildpack_version.offline end |
Instance Attribute Details
#build_dir ⇒ String
Returns the directory to place the created package in. Defaults to build
.
36 37 38 |
# File 'lib/buildpack_support/rake/package_task.rb', line 36 def build_dir @build_dir end |
#files ⇒ Array<String>
Returns the files to copy to the staging_dir
.
40 41 42 |
# File 'lib/buildpack_support/rake/package_task.rb', line 40 def files @files end |
#name ⇒ String
Returns the name of the task. Defaults to :package
.
44 45 46 |
# File 'lib/buildpack_support/rake/package_task.rb', line 44 def name @name end |
#prefix ⇒ String
Returns the prefix of the package that is created.
48 49 50 |
# File 'lib/buildpack_support/rake/package_task.rb', line 48 def prefix @prefix end |
#staging_dir ⇒ String
Returns the directory to zip the contents of. Defaults to build/staging
.
52 53 54 |
# File 'lib/buildpack_support/rake/package_task.rb', line 52 def staging_dir @staging_dir end |
#verbose ⇒ Boolean
Returns the verbosity of the task.
56 57 58 |
# File 'lib/buildpack_support/rake/package_task.rb', line 56 def verbose @verbose end |