Module: Fabula

Defined in:
lib/fabula.rb,
lib/fabula/_lib.rb

Constant Summary collapse

VERSION =
'0.4.2'

Class Method Summary collapse

Class Method Details

.dependenciesObject



34
35
36
37
# File 'lib/fabula/_lib.rb', line 34

def dependencies
  {
  }
end

.descriptionObject



19
20
21
22
23
24
25
26
27
# File 'lib/fabula/_lib.rb', line 19

def description
  <<~____
    fabula is a an super small, super fast, static site generator with everything
    to need to build and host content driven websites.  combined with github
    pages, it offers a complete solution for headless cms, https, super fast
    hosting, editorial workflows, and clever image handling with no frameworks and
    an extremely small codebase.
  ____
end

.libdir(*args, &block) ⇒ Object



39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/fabula/_lib.rb', line 39

def libdir(*args, &block)
  @libdir ||= File.dirname(File.expand_path(__FILE__))
  args.empty? ? @libdir : File.join(@libdir, *args)
ensure
  if block
    begin
      $LOAD_PATH.unshift(@libdir)
      block.call
    ensure
      $LOAD_PATH.shift
    end
  end
end

.libsObject



29
30
31
32
# File 'lib/fabula/_lib.rb', line 29

def libs
  %w[
  ]
end

.load(*libs) ⇒ Object



53
54
55
56
# File 'lib/fabula/_lib.rb', line 53

def load(*libs)
  libs = libs.join(' ').scan(/[^\s+]+/)
  libdir { libs.each { |lib| Kernel.load(lib) } }
end

.load_dependencies!Object



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/fabula/_lib.rb', line 58

def load_dependencies!
  libs.each do |lib|
    require lib
  end

  begin
    require 'rubygems'
  rescue LoadError
    nil
  end

  has_rubygems = defined?(gem)

  dependencies.each do |lib, dependency|
    gem(*dependency) if has_rubygems
    require(lib)
  end
end

.repoObject



9
10
11
# File 'lib/fabula/_lib.rb', line 9

def repo
  'https://github.com/ahoward/fabula'
end

.summaryObject



13
14
15
16
17
# File 'lib/fabula/_lib.rb', line 13

def summary
  <<~____
    the static site builder you always dreamed of
  ____
end

.versionObject



5
6
7
# File 'lib/fabula/_lib.rb', line 5

def version
  VERSION
end