Class: Wukong::Deploy::Repo
- Inherits:
-
Object
- Object
- Wukong::Deploy::Repo
- Defined in:
- lib/wukong-deploy/repo.rb
Overview
A class to represent a deploy pack repository as a collection of files on disk.
Constant Summary collapse
- TOP_LEVEL_DIR_NAMES =
The names of the top level directories in the deploy pack.
%w[app config data lib log script spec tmp]
Instance Attribute Summary collapse
-
#root ⇒ Object
readonly
The root directory where this deploy pack repo is or will be located.
Instance Method Summary collapse
-
#dirs_to_create ⇒ Array<String>
The directories to create within this repo.
-
#files_to_template ⇒ Array<String>
The files to template within this repo, relative to the repo's #root.
-
#initialize(root) ⇒ Repo
constructor
Initialize a new deploy pack repo at the given
root
.
Constructor Details
Instance Attribute Details
#root ⇒ Object (readonly)
The root directory where this deploy pack repo is or will be located.
13 14 15 |
# File 'lib/wukong-deploy/repo.rb', line 13 def root @root end |
Instance Method Details
#dirs_to_create ⇒ Array<String>
The directories to create within this repo.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/wukong-deploy/repo.rb', line 31 def dirs_to_create [ root, app_dir('models'), app_dir('processors'), app_dir('flows'), app_dir('jobs'), config_dir('environments'), config_dir('initializers'), data_dir, lib_dir, log_dir, script_dir, spec_dir('models'), spec_dir('processors'), spec_dir('flows'), spec_dir('jobs'), spec_dir('support'), tmp_dir ] end |
#files_to_template ⇒ Array<String>
The files to template within this repo, relative to the repo's
root.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/wukong-deploy/repo.rb', line 61 def files_to_template %w[ config/boot.rb config/application.rb config/environment.rb config/settings.yml config/environments/development.yml config/environments/test.yml config/environments/production.yml config/initializers/event_machine.rb Gemfile Rakefile README.md spec/spec_helper.rb ] end |