Instiki 0.17.2: Security Release
This release upgrades Instiki to Rails 2.3.4, which patches two security holes in Rails. See http://weblog.rubyonrails.org/2009/9/4/ruby-on-rails-2-3-4 There are also some new features, and the usual boatload of bugfixes. See the CHANGELOG for details.
This commit is contained in:
parent
34c4306867
commit
4bdf703ab2
211 changed files with 3959 additions and 1325 deletions
21
vendor/rails/railties/lib/tasks/databases.rake
vendored
21
vendor/rails/railties/lib/tasks/databases.rake
vendored
|
@ -55,7 +55,7 @@ namespace :db do
|
|||
case config['adapter']
|
||||
when 'mysql'
|
||||
@charset = ENV['CHARSET'] || 'utf8'
|
||||
@collation = ENV['COLLATION'] || 'utf8_general_ci'
|
||||
@collation = ENV['COLLATION'] || 'utf8_unicode_ci'
|
||||
begin
|
||||
ActiveRecord::Base.establish_connection(config.merge('database' => nil))
|
||||
ActiveRecord::Base.connection.create_database(config['database'], :charset => (config['charset'] || @charset), :collation => (config['collation'] || @collation))
|
||||
|
@ -156,8 +156,8 @@ namespace :db do
|
|||
Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
|
||||
end
|
||||
|
||||
desc 'Drops and recreates the database from db/schema.rb for the current environment.'
|
||||
task :reset => ['db:drop', 'db:create', 'db:schema:load']
|
||||
desc 'Drops and recreates the database from db/schema.rb for the current environment and loads the seeds.'
|
||||
task :reset => [ 'db:drop', 'db:setup' ]
|
||||
|
||||
desc "Retrieves the charset for the current environment's database"
|
||||
task :charset => :environment do
|
||||
|
@ -206,6 +206,15 @@ namespace :db do
|
|||
end
|
||||
end
|
||||
|
||||
desc 'Create the database, load the schema, and initialize with the seed data'
|
||||
task :setup => [ 'db:create', 'db:schema:load', 'db:seed' ]
|
||||
|
||||
desc 'Load the seed data from db/seeds.rb'
|
||||
task :seed => :environment do
|
||||
seed_file = File.join(Rails.root, 'db', 'seeds.rb')
|
||||
load(seed_file) if File.exist?(seed_file)
|
||||
end
|
||||
|
||||
namespace :fixtures do
|
||||
desc "Load fixtures into the current environment's database. Load specific fixtures using FIXTURES=x,y. Load from subdirectory in test/fixtures using FIXTURES_DIR=z. Specify an alternative path (eg. spec/fixtures) using FIXTURES_PATH=spec/fixtures."
|
||||
task :load => :environment do
|
||||
|
@ -256,7 +265,11 @@ namespace :db do
|
|||
desc "Load a schema.rb file into the database"
|
||||
task :load => :environment do
|
||||
file = ENV['SCHEMA'] || "#{RAILS_ROOT}/db/schema.rb"
|
||||
load(file)
|
||||
if File.exists?(file)
|
||||
load(file)
|
||||
else
|
||||
abort %{#{file} doesn't exist yet. Run "rake db:migrate" to create it then try again. If you do not intend to use a database, you should instead alter #{RAILS_ROOT}/config/environment.rb to prevent active_record from loading: config.frameworks -= [ :active_record ]}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue