Top Level Namespace

Defined Under Namespace

Modules: Bacon, Ezamar, GetText, Kernel, MaRuKu, MockHTTP, Ramaze, Requester, Sequel, SequelImage, SequelRelation, Syslog, WEBrick Classes: BlankSlate, Browser, Controller, FalseClass, FormField, MOFile, MainController, Numeric, Object, OrderedSet, Proc, ProjectCreator, Should, SimpleHttp, String, Symbol, Thread, TrueClass

Constant Summary collapse

SPEC_REQUIRE_DEPENDENCY =
{
  'sequel' => %w[sqlite3 sequel_model sequel_core]
}
Traits =

Copyright © 2008 Michael Fellinger [email protected] All files in this distribution are subject to the terms of the Ruby license.

Hash.new{|h,k| h[k] = {}}

Instance Method Summary collapse

Instance Method Details

#spec_require(*following) ⇒ Object

require each of the following and rescue LoadError, telling you why it failed.



38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/ramaze/spec/helper.rb', line 38

def spec_require(*following)
  following << following.map{|f| SPEC_REQUIRE_DEPENDENCY[f] }
  following.flatten.uniq.compact.reverse.each do |file|
    require file.to_s
  end
rescue LoadError => ex
  puts ex
  puts "Can't run #{$0}: #{ex}"
  puts "Usually you should not worry about this failure, just install the"
  puts "library and try again (if you want to use that feature later on)"
  exit
end