Skip to content

Commit

Permalink
Remove deprecation warning for FIXTURES_PATH
Browse files Browse the repository at this point in the history
FIXTURES_PATH has a bit different case than DatabaseTasks.fixtures_path,
which was added along with deprecation. A use case for FIXTURES_PATH
could be loading fixtures from a different directory just for a given
test run. The implementation is fairly simple, so leaving it as it is
won't hurt.
  • Loading branch information
drogus committed Dec 30, 2013
1 parent 2be2003 commit 3d865c1
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions activerecord/lib/active_record/railties/databases.rake
Expand Up @@ -179,9 +179,6 @@ db_namespace = namespace :db do
require 'active_record/fixtures' require 'active_record/fixtures'


base_dir = if ENV['FIXTURES_PATH'] base_dir = if ENV['FIXTURES_PATH']
STDERR.puts "Using FIXTURES_PATH env variable is deprecated, please use " +
"ActiveRecord::Tasks::DatabaseTasks.fixtures_path = '/path/to/fixtures' " +
"instead."
File.join [Rails.root, ENV['FIXTURES_PATH'] || %w{test fixtures}].flatten File.join [Rails.root, ENV['FIXTURES_PATH'] || %w{test fixtures}].flatten
else else
ActiveRecord::Tasks::DatabaseTasks.fixtures_path ActiveRecord::Tasks::DatabaseTasks.fixtures_path
Expand All @@ -204,9 +201,6 @@ db_namespace = namespace :db do
puts %Q(The fixture ID for "#{label}" is #{ActiveRecord::FixtureSet.identify(label)}.) if label puts %Q(The fixture ID for "#{label}" is #{ActiveRecord::FixtureSet.identify(label)}.) if label


base_dir = if ENV['FIXTURES_PATH'] base_dir = if ENV['FIXTURES_PATH']
STDERR.puts "Using FIXTURES_PATH env variable is deprecated, please use " +
"ActiveRecord::Tasks::DatabaseTasks.fixtures_path = '/path/to/fixtures' " +
"instead."
File.join [Rails.root, ENV['FIXTURES_PATH'] || %w{test fixtures}].flatten File.join [Rails.root, ENV['FIXTURES_PATH'] || %w{test fixtures}].flatten
else else
ActiveRecord::Tasks::DatabaseTasks.fixtures_path ActiveRecord::Tasks::DatabaseTasks.fixtures_path
Expand Down

0 comments on commit 3d865c1

Please sign in to comment.