Module: FalkorLib

Defined in:
lib/falkorlib.rb,
lib/falkorlib/git.rb,
lib/falkorlib/common.rb,
lib/falkorlib/config.rb,
lib/falkorlib/puppet.rb,
lib/falkorlib/version.rb,
lib/falkorlib/git/base.rb,
lib/falkorlib/git/flow.rb,
lib/falkorlib/gem_tasks.rb,
lib/falkorlib/git_tasks.rb,
lib/falkorlib/tasks/gem.rb,
lib/falkorlib/tasks/git.rb,
lib/falkorlib/versioning.rb,
lib/falkorlib/puppet/base.rb,
lib/falkorlib/puppet_tasks.rb,
lib/falkorlib/tasks/puppet.rb,
lib/falkorlib/puppet/modules.rb

Overview

:nodoc:

Defined Under Namespace

Modules: Common, Config, Git, GitFlow, Puppet, Version, Versioning Classes: GemTasks, GitTasks, PuppetTasks

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:



28
29
30
31
# File 'lib/falkorlib/config.rb', line 28

def config(&block)
    yield configuration if block_given?
    configuration
end

.configurationObject

initiate the configuration (with default value) if needed



34
35
36
# File 'lib/falkorlib/config.rb', line 34

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

.libObject



40
41
42
# File 'lib/falkorlib.rb', line 40

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

.rootObject

Return the root directory of the gem



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

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

.templatesObject



44
45
46
# File 'lib/falkorlib.rb', line 44

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