Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 171
- Log:
Initial import of Beast 0.9 from downloaded Tarball. Beast is a Ruby
On Rails based forum application. The original tarball came from the
following location:http://s3.amazonaws.com/beast-forum/beast-0.9.tar.gz
The forum post which announced this version's availability was at:
http://beast.caboo.se/forums/1/topics/446
- Author:
- rool
- Date:
- Fri Mar 02 15:51:55 +0000 2007
- Size:
- 928 Bytes
1 | require 'digest/sha1' |
2 | class AddPasswordHash < ActiveRecord::Migration |
3 | class User < ActiveRecord::Base; end |
4 | def self.up |
5 | # you need to edit your environment.rb and pick a non-default password salt |
6 | # before you continue |
7 | raise "ChangePasswordHash" if PASSWORD_SALT == '48e45be7d489cbb0ab582d26e2168621' |
8 | say_with_time "Hashing all your passwords in 30 seconds... this is a big deal (because it's not reversible), cancel if you aren't ready." |
9 | sleep 30 |
10 | rename_column :users, :password, :password_hash |
11 | say_with_time "Hashing passwords..." do |
12 | User.find(:all, :select => 'id, password_hash').each do |u| |
13 | u.update_attribute :password_hash, Digest::SHA1.hexdigest(u.password_hash.to_s + PASSWORD_SALT) |
14 | end |
15 | end |
16 | end |
17 | |
18 | def self.down |
19 | raise IrreversibleMigration |
20 | # rename_column :users, :password_hash, :password # the users will have some... interesting passwords now |
21 | end |
22 | end |