]> git.openstreetmap.org Git - rails.git/blob - vendor/gems/composite_primary_keys-2.2.2/loader.rb
Add version 2.2.2 of composite_primary_keys.
[rails.git] / vendor / gems / composite_primary_keys-2.2.2 / loader.rb
1 # Load local config files in /local
2 begin
3   local_file_supported = Dir[File.join(PROJECT_ROOT, 'local/*.sample')].map { |path| File.basename(path).sub(".sample","") }
4   local_file_supported.each do |file|
5     require "local/#{file}"
6   end
7 rescue LoadError
8   puts <<-EOS
9   This Gem supports local developer extensions in local/ folder. 
10   Supported files:
11     #{local_file_supported.map { |f| "local/#{f}"}.join(', ')}
12
13   Setup default sample files:
14     rake local:setup
15
16   Current warning: #{$!}
17   
18   EOS
19 end
20
21
22 # Now load Rake tasks from /tasks
23 rakefiles = Dir[File.join(File.dirname(__FILE__), "tasks/**/*.rake")]
24 rakefiles.each { |rakefile| load File.expand_path(rakefile) }