Class: Stove::Packager
- Inherits:
-
Object
- Object
- Stove::Packager
- Defined in:
- lib/stove/packager.rb
Constant Summary collapse
- ACCEPTABLE_FILES =
[ 'README.*', 'CHANGELOG.*', 'metadata.{json,rb}', 'attributes', 'definitions', 'files', 'libraries', 'providers', 'recipes', 'resources', 'templates', ]
Instance Attribute Summary collapse
-
#cookbook ⇒ Object
readonly
The cookbook to package.
Instance Method Summary collapse
-
#cookbook_files ⇒ Array
The list of files that should actually be uploaded.
-
#initialize(cookbook) ⇒ Packager
constructor
Create a new packager instance.
-
#package_path ⇒ String
The path to the tar.gz package in the temporary directory.
Constructor Details
#initialize(cookbook) ⇒ Packager
Create a new packager instance.
32 33 34 |
# File 'lib/stove/packager.rb', line 32 def initialize(cookbook) @cookbook = cookbook end |
Instance Attribute Details
#cookbook ⇒ Object (readonly)
The cookbook to package.
26 27 28 |
# File 'lib/stove/packager.rb', line 26 def cookbook @cookbook end |
Instance Method Details
#cookbook_files ⇒ Array
The list of files that should actually be uploaded.
40 41 42 |
# File 'lib/stove/packager.rb', line 40 def cookbook_files Dir.glob("#{File.(cookbook.path)}/{#{ACCEPTABLE_FILES.join(',')}}") end |
#package_path ⇒ String
The path to the tar.gz package in the temporary directory.
47 48 49 |
# File 'lib/stove/packager.rb', line 47 def package_path pack! end |