diff options
author | Michael Koziarski <michael@koziarski.com> | 2007-07-24 21:06:45 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2007-07-24 21:06:45 +0000 |
commit | 94e5b10aff8adbda671d5b63a8ad46b1e1263b18 (patch) | |
tree | 3f6b73f4004ecb340dd09c594c6aa5f381d26035 /railties | |
parent | 6391e192f8c9424179657e17f82b264746ee2c10 (diff) | |
download | rails-94e5b10aff8adbda671d5b63a8ad46b1e1263b18.tar.gz rails-94e5b10aff8adbda671d5b63a8ad46b1e1263b18.tar.bz2 rails-94e5b10aff8adbda671d5b63a8ad46b1e1263b18.zip |
Use Gem.find_name instead of search when freezing gems. Prevent false positive for other gems with rails in the name. Closes #8729 [wselman]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7233 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/tasks/framework.rake | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 24eda9da03..c942ed6ca4 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* use Gem.find_name instead of search when freezing gems. Prevent false positives for other gems with rails in the name. Closes #8729 [wselman] + * Automatically generate add/remove column commands in specially named migrations like AddLocationToEvent. Closes #9006 [zenspider] * Default to plural table name in Rails Generator if ActiveRecord is not present. Closes #8963 [evan] diff --git a/railties/lib/tasks/framework.rake b/railties/lib/tasks/framework.rake index 6eaff2918e..2687129581 100644 --- a/railties/lib/tasks/framework.rake +++ b/railties/lib/tasks/framework.rake @@ -7,8 +7,8 @@ namespace :rails do Gem.manage_gems rails = (version = ENV['VERSION']) ? - Gem.cache.search('rails', "= #{version}").first : - Gem.cache.search('rails').sort_by { |g| g.version }.last + Gem.cache.find_name('rails', "= #{version}").first : + Gem.cache.find_name('rails').sort_by { |g| g.version }.last version ||= rails.version |