Module: Depo

Includes:
KungFigure
Defined in:
lib/depo.rb,
lib/depo/build.rb,
lib/depo/config.rb,
lib/depo/view_helpers.rb,
lib/depo/dijit_conventions.rb

Defined Under Namespace

Modules: ViewHelpers Classes: Build, Config, DijitConventions

Constant Summary collapse

VERSION =
'0.0.8'

Class Method Summary collapse

Class Method Details

.configure(&block) ⇒ Object


15
16
17
18
# File 'lib/depo.rb', line 15

def configure(&block)
  old_configure(&block)
  dojofy if Depo.config.enable_dojofy 
end

.dojofyObject


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

def dojofy
  Dir.chdir(RAILS_ROOT) do 
    require 'dojo_src'
    version = DojoSrc::VERSION
    #version = Depo.config.dojo_version
    system "dojofy _#{version}_ #{Depo.config.src_path}"
  end
end

.enableObject


27
28
29
30
31
32
# File 'lib/depo.rb', line 27

def enable
  return if ActionView::Base.instance_methods.include? 'dojo'
  if defined?(ActionController::Base) 
    ActionView::Base.send :include, ViewHelpers
  end
end

.old_configureObject


14
# File 'lib/depo.rb', line 14

alias_method :old_configure, :configure