Skip to content

Commit

Permalink
Let merb autoload lib directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
Martyn Loughran committed Oct 14, 2008
1 parent 9c93539 commit 56ba4bf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
22 changes: 13 additions & 9 deletions config/init.rb
Expand Up @@ -2,9 +2,9 @@
Gem.clear_paths
Gem.path.unshift(Merb.root / "gems")

# Make the app's "lib" directory a place where ruby files get "require"d from
# Autoload from lib
$LOAD_PATH.unshift(Merb.root / "lib")

Merb.push_path(:lib, Merb.root / "lib") # uses **/*.rb as path glob.

Merb::Config.use do |c|

Expand All @@ -20,14 +20,18 @@

require "config" / "panda_init"

dependencies 'merb-assets', 'merb-mailer', 'merb_helpers', 'uuid', 'to_simple_xml', 'rog', 'amazon_sdb', 'simple_db', 'retryable', 'activesupport', 'rvideo', 'panda', 'gd_resize', 'map_to_hash', 'spec_eql_hash', 'error_sender'

dependencies 'abstract_store', 's3_store', 'file_store'
dependencies 'local_store'
# Gem dependencies
dependency 'merb-assets'
dependency 'merb-mailer'
dependency 'merb_helpers'
dependency 'uuid'
dependency 'amazon_sdb'
dependency 'activesupport'
dependency 'rvideo'

# Not sure why dependencies won't load AWS::S3
require 'aws/s3'
require 'inline'
# Dependencies in lib - not autoloaded in time so require them explicitly
require 'simple_db'
require 'local_store'

Panda::Config.check

Expand Down
2 changes: 2 additions & 0 deletions lib/gd_resize.rb
@@ -1,3 +1,5 @@
require 'inline'

class GDResize
SUPPORTED_FORMATS = %w(jpg jpeg png gif)

Expand Down

0 comments on commit 56ba4bf

Please sign in to comment.