Module: Perkins::Build

Defined in:
lib/perkins/build.rb,
lib/perkins/build/data.rb,
lib/perkins/build/shell.rb,
lib/perkins/build/script.rb,
lib/perkins/build/data/env.rb,
lib/perkins/build/data/var.rb,
lib/perkins/build/script/go.rb,
lib/perkins/build/shell/dsl.rb,
lib/perkins/build/script/jdk.rb,
lib/perkins/build/script/rvm.rb,
lib/perkins/build/shell/node.rb,
lib/perkins/build/script/ruby.rb,
lib/perkins/build/script/stages.rb,
lib/perkins/build/script/bundler.rb,
lib/perkins/build/script/helpers.rb

Defined Under Namespace

Modules: Shell Classes: Data, Script

Constant Summary collapse

HOME_DIR =
'$HOME'
BUILD_DIR =
File.join(HOME_DIR, 'build')

Class Method Summary collapse

Class Method Details

.by_lang(lang) ⇒ Object



20
21
22
23
# File 'lib/perkins/build.rb', line 20

def by_lang(lang)
  name = lang.split('_').map { |w| w.capitalize }.join
  Script.const_get(name, false) rescue Script::Ruby
end

.script(config, options = {}) ⇒ Object



13
14
15
16
17
18
# File 'lib/perkins/build.rb', line 13

def script(config, options = {})
  #config  = config.deep_symbolize_keys
  lang  = (config.language || 'ruby').downcase.strip
  const = by_lang(lang)
  const.new(config, options)
end