Skip to content

Commit

Permalink
Bumping to Rails 3.2.1 and Devise 2. Closes #27.
Browse files Browse the repository at this point in the history
Devise 2.0 changes the migration syntax, which was manually adjusted.  The langauage files also changed slightly.

The Rails 3.2.x upgrade threw an error about PNG already being registered, so we only define mime types if needed.
  • Loading branch information
bamnet committed Jan 29, 2012
1 parent 0941505 commit 126cd50
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 41 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Edit this Gemfile to bundle your application's dependencies.
source 'http://rubygems.org'

gem "rails", "3.2.0"
gem "rails", "3.2.1"

# Gems used only for assets and not required
# in production environments by default.
Expand Down
67 changes: 34 additions & 33 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,55 +1,56 @@
GEM
remote: http://rubygems.org/
specs:
actionmailer (3.2.0)
actionpack (= 3.2.0)
actionmailer (3.2.1)
actionpack (= 3.2.1)
mail (~> 2.4.0)
actionpack (3.2.0)
activemodel (= 3.2.0)
activesupport (= 3.2.0)
actionpack (3.2.1)
activemodel (= 3.2.1)
activesupport (= 3.2.1)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.0)
journey (~> 1.0.1)
rack (~> 1.4.0)
rack-cache (~> 1.1)
rack-test (~> 0.6.1)
sprockets (~> 2.1.2)
activemodel (3.2.0)
activesupport (= 3.2.0)
activemodel (3.2.1)
activesupport (= 3.2.1)
builder (~> 3.0.0)
activerecord (3.2.0)
activemodel (= 3.2.0)
activesupport (= 3.2.0)
activerecord (3.2.1)
activemodel (= 3.2.1)
activesupport (= 3.2.1)
arel (~> 3.0.0)
tzinfo (~> 0.3.29)
activeresource (3.2.0)
activemodel (= 3.2.0)
activesupport (= 3.2.0)
activesupport (3.2.0)
activeresource (3.2.1)
activemodel (= 3.2.1)
activesupport (= 3.2.1)
activesupport (3.2.1)
i18n (~> 0.6)
multi_json (~> 1.0)
arel (3.0.0)
attachable (0.0.2)
bcrypt-ruby (3.0.1)
builder (3.0.0)
cancan (1.6.7)
coffee-rails (3.2.1)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0.beta)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.2.0)
devise (1.5.3)
devise (2.0.0)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
railties (~> 3.1)
warden (~> 1.1)
erubis (2.7.0)
execjs (1.3.0)
multi_json (~> 1.0)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.0)
journey (1.0.1)
jquery-rails (2.0.0)
railties (< 5.0, >= 3.2.0.beta)
thor (~> 0.14)
Expand All @@ -62,24 +63,24 @@ GEM
multi_json (1.0.4)
orm_adapter (0.0.6)
polyglot (0.3.3)
rack (1.4.0)
rack (1.4.1)
rack-cache (1.1)
rack (>= 0.4)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.2.0)
actionmailer (= 3.2.0)
actionpack (= 3.2.0)
activerecord (= 3.2.0)
activeresource (= 3.2.0)
activesupport (= 3.2.0)
rails (3.2.1)
actionmailer (= 3.2.1)
actionpack (= 3.2.1)
activerecord (= 3.2.1)
activeresource (= 3.2.1)
activesupport (= 3.2.1)
bundler (~> 1.0)
railties (= 3.2.0)
railties (3.2.0)
actionpack (= 3.2.0)
activesupport (= 3.2.0)
railties (= 3.2.1)
railties (3.2.1)
actionpack (= 3.2.1)
activesupport (= 3.2.1)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
Expand All @@ -89,8 +90,8 @@ GEM
json (~> 1.4)
rmagick (2.13.1)
sass (3.1.12)
sass-rails (3.2.3)
railties (~> 3.2.0.beta)
sass-rails (3.2.4)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sprockets (2.1.2)
Expand Down Expand Up @@ -119,7 +120,7 @@ DEPENDENCIES
coffee-rails (~> 3.2.1)
devise
jquery-rails
rails (= 3.2.0)
rails (= 3.2.1)
rmagick (>= 2.12.2)
sass-rails (~> 3.2.3)
sqlite3
Expand Down
6 changes: 3 additions & 3 deletions config/initializers/mime_types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
# Mime::Type.register_alias "text/html", :iphone
Mime::Type.register "image/jpg", :jpg
Mime::Type.register "image/png", :png
Mime::Type.register "image/svg+xml", :svg
Mime::Type.register "image/jpg", :jpg unless Mime::Type.lookup_by_extension(:jpg)
Mime::Type.register "image/png", :png unless Mime::Type.lookup_by_extension(:png)
Mime::Type.register "image/svg+xml", :svg unless Mime::Type.lookup_by_extension(:svg)
4 changes: 3 additions & 1 deletion config/locales/devise.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ en:
confirmed: 'Your account was successfully confirmed. You are now signed in.'
registrations:
signed_up: 'Welcome! You have signed up successfully.'
inactive_signed_up: 'You have signed up successfully. However, we could not sign you in because your account is %{reason}.'
signed_up_but_unconfirmed: 'A message with a confirmation link has been sent to your email address. Please open the link to activate your account.'
signed_up_but_inactive: 'You have signed up successfully. However, we could not sign you in because your account is not yet activated.'
signed_up_but_locked: 'You have signed up successfully. However, we could not sign you in because your account is locked.'
updated: 'You updated your account successfully.'
destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
unlocks:
Expand Down
38 changes: 35 additions & 3 deletions db/migrate/20110530231844_devise_create_users.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,41 @@
class DeviseCreateUsers < ActiveRecord::Migration
def self.up
create_table(:users) do |t|
t.database_authenticatable :null => false
t.recoverable
t.rememberable
## Database authenticatable
t.string :email, :null => false, :default => ""
t.string :encrypted_password, :null => false, :default => ""

## Recoverable
t.string :reset_password_token
t.datetime :reset_password_sent_at

## Rememberable
t.datetime :remember_created_at

## Trackable
# t.integer :sign_in_count, :default => 0
# t.datetime :current_sign_in_at
# t.datetime :last_sign_in_at
# t.string :current_sign_in_ip
# t.string :last_sign_in_ip

## Encryptable
# t.string :password_salt

## Confirmable
# t.string :confirmation_token
# t.datetime :confirmed_at
# t.datetime :confirmation_sent_at
# t.string :unconfirmed_email # Only if using reconfirmable

## Lockable
# t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
# t.string :unlock_token # Only if unlock strategy is :email or :both
# t.datetime :locked_at

# Token authenticatable
# t.string :authentication_token

t.timestamps
end

Expand Down

0 comments on commit 126cd50

Please sign in to comment.