Module: Flak::Template::Environment::Settings

Extended by:
MergeEngine
Defined in:
lib/flak/rake/templates/environment.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from MergeEngine

flatten_yaml, flatten_yaml_file, infuse, settings_modifications

Class Method Details

.extended(target) ⇒ Object



8
9
10
# File 'lib/flak/rake/templates/environment.rb', line 8

def self.extended target
  infuse target
end

.settings_modifications(settings) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/flak/rake/templates/environment.rb', line 13

def self.settings_modifications settings

  mods = Hash.new

  bind = binding()

  Flak::Errors.assert("settings[:product_revision]", "String", bind,__FILE__)
  Flak::Errors.assert("settings[:platform_id]", "String", bind,__FILE__)
  Flak::Errors.assert("settings[:configuration]", "String", bind,__FILE__)
  Flak::Errors.assert("settings[:tools_directory]", "String", bind,__FILE__)
  Flak::Errors.assert("settings[:product_name]", "String", bind,__FILE__)

  mods[:build_directory] = File.join( "build", settings[:product_revision] , settings[:platform_id], settings[:configuration])

  mods[:platform_directory] = File.join(settings[:tools_directory], settings[:platform_id])
  
  mods[:release_root] = File.join(mods[:platform_directory], settings[:product_name])

  mods[:revision_directory] =  File.join( mods[:release_root] , settings[:product_revision] )

  mods
end

Instance Method Details

#destination_filepath(relative_path, file) ⇒ Object



37
38
39
40
41
# File 'lib/flak/rake/templates/environment.rb', line 37

def destination_filepath(relative_path, file)
  bind = binding()
  Flak::Errors.assert("@settings[:revision_directory]", "String", bind,__FILE__)
  File.join(@settings[:revision_directory] , relative_path , file.pathmap('%f').no_erb)
end