Class: RBoss::Resource
- Inherits:
-
Object
- Object
- RBoss::Resource
- Includes:
- FileUtils, Component
- Defined in:
- lib/rboss/components/resource.rb
Overview
A class to add resources to a JBoss Profile
Any resource can be added using the following structure:
absolute_path => [resource_a_path, resource_b_path, …], relative_path => resource_c_path
Relative paths are based on the profile path (example: “lib” is $JBOSS_HOME/server/$JBOSS_PROFILE/lib)
author: Marcelo Guimarães <[email protected]>
Instance Method Summary collapse
Methods included from Component
#configure, #initialize, #load_yaml, #new_file_processor
Instance Method Details
#process ⇒ Object
40 41 42 43 44 45 46 47 48 |
# File 'lib/rboss/components/resource.rb', line 40 def process @logger.info "Including resources..." @config.each do |to_path, resources| [*resources].each do |resource| to_path = "#{@jboss.profile}/#{to_path}" unless to_path.to_s.start_with? '/' cp_r File.(resource), to_path end end end |