From fd4059252fb4ea3a0430a1e9824e3d3f4c95160f Mon Sep 17 00:00:00 2001 From: Pairing Workstation Calculon Date: Mon, 30 Aug 2010 09:34:46 -0400 Subject: [PATCH] Bumping version to beta 17 --- lib/mongoid/version.rb | 2 +- mongoid.gemspec | 49 ------------------------------------------ 2 files changed, 1 insertion(+), 50 deletions(-) diff --git a/lib/mongoid/version.rb b/lib/mongoid/version.rb index 40009c5549..93fafb29d5 100644 --- a/lib/mongoid/version.rb +++ b/lib/mongoid/version.rb @@ -1,4 +1,4 @@ # encoding: utf-8 module Mongoid #:nodoc - VERSION = "2.0.0.beta.16" + VERSION = "2.0.0.beta.17" end diff --git a/mongoid.gemspec b/mongoid.gemspec index eb99f5c695..a080615ea1 100644 --- a/mongoid.gemspec +++ b/mongoid.gemspec @@ -31,53 +31,4 @@ Gem::Specification.new do |s| s.files = Dir.glob("lib/**/*") + %w(MIT_LICENSE README.rdoc) s.require_path = 'lib' - - s.post_install_message = <<-POST_INSTALL_MESSAGE - _________________________________ - |:::::::::::::::::::::::::::::::::| "I find your lack of faith disturbing." - |:::::::::::::;;::::::::::::::::::| - |:::::::::::'~||~~~``:::::::::::::| Mongoid 2 introduces - |::::::::' .': o`:::::::::::| a different way of defining how - |:::::::' oo | |o o ::::::::::| ids are stored on documents, as - |::::::: 8 .'.' 8 o :::::::::| well as how foreign key fields - |::::::: 8 | | 8 :::::::::| and indexes are stored. - |::::::: _._| |_,...8 :::::::::| - |::::::'~--. .--. `. `::::::::| If you were using String - |:::::' =8 ~ \\ o ::::::::| representations of BSON::ObjectIDs - |::::' 8._ 88. \\ o::::::::| as your document ids, all of your - |:::' __. ,.ooo~~. \\ o`::::::| documents will now need to tell - |::: . -. 88`78o/: \\ `:::::| Mongoid to use Strings like so: - |::' /. o o \\ :: \\88`::::| - |:; o|| 8 8 |d. `8 `:::| class User - |:. - ^ ^ -' `-`::| include Mongoid::Document - |::. .:::| identity :type => String - |:::::..... ::' ``::| end - |::::::::-'`- 88 `| - |:::::-'. - :: | All ids will default to - |:-~. . . : | BSON:ObjectIDs from now on, and - | .. . ..: o:8 88o | Config#use_object_ids has been - |. . ::: 8:P d888. . . | removed. - |. . :88 88 888' . . | - | o8 d88P . 88 ' d88P .. | Foreign key fields for relational - | 88P 888 d8P ' 888 | associations no longer index by - | 8 d88P.'d:8 .- dP~ o8 | default - you will need to pass - | 888 888 d~ o888 LS | :index => true to the association - |_________________________________| definition to have the field indexed - - or create the index manually, which is the preferred method. Note that - if you were using String ids and now want to use object ids instead you - will have to migrate your database manually - Mongoid cannot perform - this for you automatically. If you were using custom composite keys, - these will need to be defined as Strings since they cannot be converted. - - You can run a rake task to convert all your string object ids to ObjectID (thanks to Kyle Banker): - - rake db:mongoid:objectid_convert - - Your old collections will be backed up to their original names appended with "_old". - If you verify your site is still working good with the ObjectIDs, you can clean them up using: - - rake db:mongoid:cleanup_old_collections - - POST_INSTALL_MESSAGE end