diff --git a/.gitignore b/.gitignore index 6696b22..ca1cf73 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ public/javascripts/cache-application.js public/stylesheets/cache-application.css coverage.data test/coverage +.bundle diff --git a/config/boot.rb b/config/boot.rb index dd5e3b6..9ee835a 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -106,5 +106,19 @@ def read_environment_rb end end +class Rails::Boot + def run + load_initializer + + Rails::Initializer.class_eval do + def load_gems + @bundler_loaded ||= Bundler.require :default, Rails.env + end + end + + Rails::Initializer.run(:set_load_path) + end +end + # All that for this: Rails.boot! diff --git a/config/database.example.yml b/config/database.example.yml new file mode 100644 index 0000000..1cf4169 --- /dev/null +++ b/config/database.example.yml @@ -0,0 +1,25 @@ +# SQLite version 3.x +# gem install sqlite3-ruby (not necessary on OS X Leopard) +development: + host: 127.0.0.1 + adapter: mysql + database: clojuredocs + username: root + password: + +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + host: 127.0.0.1 + adapter: mysql + database: clojuredocs_test + username: root + password: + +production: + host: 127.0.0.1 + adapter: mysql + database: clojuredocs + username: root + password: diff --git a/config/database.yml b/config/database.yml index 42bb9a4..1cf4169 100644 --- a/config/database.yml +++ b/config/database.yml @@ -11,15 +11,15 @@ development: # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: - host: 127.0.0.1 - adapter: mysql - database: clojuredocs_test - username: root - password: + host: 127.0.0.1 + adapter: mysql + database: clojuredocs_test + username: root + password: production: host: 127.0.0.1 adapter: mysql database: clojuredocs username: root - password: \ No newline at end of file + password: diff --git a/config/environment.rb b/config/environment.rb index 3f31e27..8eb69e7 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -8,52 +8,9 @@ require 'digest/md5' Rails::Initializer.run do |config| - # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. - - # Add additional load paths for your own custom dirs - # config.load_paths += %W( #{RAILS_ROOT}/extras ) - - # Specify gems that this application depends on and have them installed with rake gems:install - # config.gem "bj" - # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net" - # config.gem "sqlite3-ruby", :lib => "sqlite3" - # config.gem "aws-s3", :lib => "aws/s3" - -# config.gem "ruby-openid", :version => '2.1.2' -# config.gem "rack-openid", :version => '1.0.3' - config.gem "shoulda", :lib => "shoulda" - config.gem 'will_paginate', :version => '~> 2.3.11', :source => 'http://gemcutter.org' - config.gem 'levenshtein', :version => '0.2.0' - config.gem 'rdiscount', :version => '1.6.5' - config.gem 'chronic', :version => '0.2.3' -# config.gem 'json_pure', :version => '1.4.3' - config.gem 'flexmock', :version => '0.8.7' - -# config.gem 'rubytree', :version => '0.7.0' - - # Only load the plugins named here, in the order given (default is alphabetical). - # :all can be used as a placeholder for all plugins not explicitly named - # config.plugins = [ :exception_notification, :ssl_requirement, :all ] - - # Skip frameworks you're not going to use. To use Rails without a database, - # you must remove the Active Record framework. - # config.frameworks -= [ :active_record, :active_resource, :action_mailer ] - - # Activate observers that should always be running - # config.active_record.observers = :cacher, :garbage_collector, :forum_observer - - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. config.time_zone = 'UTC' - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')] - # config.i18n.default_locale = :de - config.action_controller.perform_caching = true ROOT_URL = "http://localhost:3000" - -end \ No newline at end of file +end