class Emplace::Project

Public Class Methods

new(name, opts = {}, impl = Emplace.load_env) click to toggle source
# File lib/emplace.rb, line 6
def initialize(name, opts = {}, impl = Emplace.load_env)
  @name = name
  @opts = opts
  @impl = impl
end

Public Instance Methods

build!() click to toggle source
# File lib/emplace.rb, line 31
def build!
  @impl.build build_dir
end
build_dir() click to toggle source
# File lib/emplace.rb, line 14
def build_dir
  'build'
end
clean!() click to toggle source
# File lib/emplace.rb, line 23
def clean!
  FileUtils.rm_rf build_dir
  FileUtils.rm_rf dist_dir
  FileUtils.rm_rf vendor_dir
end
cmake!() click to toggle source
# File lib/emplace.rb, line 28
def cmake!
  @impl.cmake @name, module_dir, build_dir, dist_dir
end
dist_dir() click to toggle source
# File lib/emplace.rb, line 17
def dist_dir
  'dist'
end
extract!() click to toggle source
# File lib/emplace.rb, line 40
def extract!
  @impl.extract @name, vendor_dir
end
fetch!() click to toggle source
# File lib/emplace.rb, line 43
def fetch!
  @impl.fetch(@name, @opts, vendor_dir)
end
module_dir() click to toggle source
# File lib/emplace.rb, line 11
def module_dir
  File.join(File.dirname(File.dirname(__FILE__)), 'modules')
end
package!() click to toggle source
# File lib/emplace.rb, line 37
def package!
  @impl.package @name, dist_dir
end
test!() click to toggle source
# File lib/emplace.rb, line 34
def test!
  @impl.test build_dir
end
vendor_dir() click to toggle source
# File lib/emplace.rb, line 20
def vendor_dir
  'vendor'
end

Private Instance Methods

fetch_url() click to toggle source
# File lib/emplace.rb, line 47
def fetch_url
  @impl.fetch_url(@opts[:url], @opts[:version])
end