Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 344
- Log:
Massive changeset which brings the old, ROOL customised Instiki
version up to date, but without any ROOL customisations in this
latest checked-in version (which is 0.19.1). This is deliberate,
so that it's easy to see the changes made for the ROOL version
in a subsequent changeset. The 'app/views/shared' directory is not
part of Instiki but is kept to maintain the change history with
updated ROOL customisations, some of which involve the same files
in that same directory.
- Author:
- rool
- Date:
- Sat Mar 19 19:52:13 +0000 2011
- Size:
- 908 Bytes
1 | require 'rake' |
2 | |
3 | desc "This task will perform necessary upgrades to your Instiki installation" |
4 | task :upgrade_instiki => :environment do |
5 | ENV['RAILS_ENV'] ||= 'production' |
6 | puts "Upgrading Instiki in #{ENV['RAILS_ENV']} environment." |
7 | |
8 | InstikiUpgrade.migrate_db |
9 | InstikiUpgrade.move_uploaded_files |
10 | end |
11 | |
12 | class InstikiUpgrade |
13 | |
14 | def self.migrate_db |
15 | ActiveRecord::Base.establish_connection ENV['RAILS_ENV'] |
16 | Rake::Task["db:migrate"].invoke |
17 | end |
18 | |
19 | def self.move_uploaded_files |
20 | Web.all.each do |web| |
21 | public_path = Rails.root.join("public", web.address) |
22 | if public_path.exist? |
23 | webs_path = Rails.root.join("webs", web.address) |
24 | if webs_path.exist? |
25 | puts "Warning! The directory #{webs_path} already exists. Skipping." |
26 | else |
27 | public_path.rename(webs_path) |
28 | puts "Moved #{public_path} to #{webs_path}" |
29 | end |
30 | end |
31 | end |
32 | end |
33 | |
34 | end |