module Kamaze::Project::Bundled

Bundled behavior.

Allow to detect bundled execution due to “gems.rb“ and “gems.locked“ files presence, and“development“ execution (“gemspec.tpl“ file presence).

Public Class Methods

included(base) click to toggle source
# File lib/kamaze/project/bundled.rb, line 25
def included(base)
  base.extend(ClassMethods)

  Pathname.new(caller_locations.first.path).dirname.tap do |caller_path|
    (base.__send__(:base_path) || caller_path).tap do |basepath|
      base.__send__(:base_path=, Pathname(basepath).join('..'))
    end
  end
end