Module: FalkorLib

Defined in:
lib/falkorlib.rb,
lib/falkorlib/cli.rb,
lib/falkorlib/git.rb,
lib/falkorlib/error.rb,
lib/falkorlib/common.rb,
lib/falkorlib/config.rb,
lib/falkorlib/puppet.rb,
lib/falkorlib/cli/new.rb,
lib/falkorlib/version.rb,
lib/falkorlib/cli/link.rb,
lib/falkorlib/cli/make.rb,
lib/falkorlib/git/base.rb,
lib/falkorlib/git/flow.rb,
lib/falkorlib/bootstrap.rb,
lib/falkorlib/tasks/gem.rb,
lib/falkorlib/tasks/git.rb,
lib/falkorlib/cli/config.rb,
lib/falkorlib/versioning.rb,
lib/falkorlib/puppet/base.rb,
lib/falkorlib/tasks/puppet.rb,
lib/falkorlib/bootstrap/git.rb,
lib/falkorlib/bootstrap/base.rb,
lib/falkorlib/bootstrap/base.rb,
lib/falkorlib/bootstrap/link.rb,
lib/falkorlib/bootstrap/ruby.rb,
lib/falkorlib/puppet/modules.rb,
lib/falkorlib/bootstrap/latex.rb,
lib/falkorlib/bootstrap/mkdocs.rb,
lib/falkorlib/bootstrap/python.rb,
lib/falkorlib/bootstrap/vagrant.rb

Overview

:nodoc:

Defined Under Namespace

Modules: Bootstrap, CLI, Common, Config, Git, GitFlow, Puppet, Version, Versioning Classes: AbortError, ArgumentError, Error, ExecError, Exit, FalkorError, GemTasks, GitTasks, InternalError, PuppetTasks, TemplateNotFound

Constant Summary collapse

VERSION =

Shorter version of the Gem’s VERSION

Version.to_s

Class Method Summary collapse

Class Method Details

.config {|configuration| ... } ⇒ Object

Yields up a configuration object when given a block. Without a block it just returns the configuration object. Uses Configatron under the covers.

Example:

FalkorLib.config do |c|
  c.foo = :bar
end

FalkorLib.config.foo # => :bar

Yields:



30
31
32
33
# File 'lib/falkorlib/config.rb', line 30

def config
  yield configuration if block_given?
  configuration
end

.configurationObject

initiate the configuration (with default value) if needed



36
37
38
# File 'lib/falkorlib/config.rb', line 36

def configuration
  @config ||= Configatron::Store.new(FalkorLib::Config.default)
end

.libObject



42
43
44
# File 'lib/falkorlib.rb', line 42

def self.lib
  File.join root, 'lib'
end

.rootObject

Return the root directory of the gem



38
39
40
# File 'lib/falkorlib.rb', line 38

def self.root
  File.expand_path '../..', __FILE__
end

.templatesObject



46
47
48
# File 'lib/falkorlib.rb', line 46

def self.templates
  File.join root, 'templates'
end