Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base: 2ab38327a8
...
compare: b07b17226c
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 8 files changed
  • 0 commit comments
  • 1 contributor
View
6 Gemfile
@@ -1,7 +1,7 @@
source 'http://rubygems.org'
gem "rake", "0.9.3.beta.1"
-gem 'rails', '~> 3.2.2'
+gem 'rails', '3.2.2'
gem 'mysql2'
@@ -17,10 +17,10 @@ gem 'sass-rails', '~> 3.2.3'
gem 'jquery-rails'
gem 'haml-rails'
gem 'kaminari'
-gem 'friendly_id', '~> 4.0.1'
+gem 'friendly_id', '~> 4.0.4'
gem 'sequel'
gem 'redcarpet'
-gem 'devise', '~> 1.5.3'
+gem 'devise'
gem "omniauth-facebook"
gem 'bootstrap-sass', '~> 1.4.4'
gem 'inherited_resources'
View
48 Gemfile.lock
@@ -10,7 +10,7 @@ GIT
GEM
remote: http://rubygems.org/
specs:
- aasm (3.0.3)
+ aasm (3.0.4)
activerecord
actionmailer (3.2.2)
actionpack (= 3.2.2)
@@ -53,8 +53,9 @@ GEM
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 0.1.4)
- carrierwave (0.5.8)
- activesupport (~> 3.0)
+ carrierwave (0.6.0)
+ activemodel (>= 3.2.0)
+ activesupport (>= 3.2.0)
childprocess (0.3.1)
ffi (~> 1.0.6)
coffee-rails (3.2.2)
@@ -65,11 +66,12 @@ GEM
execjs
coffee-script-source (1.2.0)
colored (1.2)
- database_cleaner (0.7.1)
- devise (1.5.3)
+ database_cleaner (0.7.2)
+ devise (2.0.4)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
- warden (~> 1.1)
+ railties (~> 3.1)
+ warden (~> 1.1.1)
erubis (2.7.0)
execjs (1.3.0)
multi_json (~> 1.0)
@@ -78,7 +80,7 @@ GEM
multipart-post (~> 1.1)
rack (~> 1.1)
ffi (1.0.11)
- friendly_id (4.0.3)
+ friendly_id (4.0.4)
haml (3.1.4)
haml-rails (0.3.4)
actionpack (~> 3.0)
@@ -88,7 +90,7 @@ GEM
has_scope (0.5.1)
hashie (1.2.0)
hike (1.2.1)
- hirb (0.6.1)
+ hirb (0.6.2)
i18n (0.6.0)
inherited_resources (1.3.1)
has_scope (~> 0.5.0)
@@ -97,7 +99,7 @@ GEM
jquery-rails (2.0.1)
railties (>= 3.2.0, < 5.0)
thor (~> 0.14)
- json (1.6.5)
+ json (1.6.6)
kaminari (0.13.0)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
@@ -105,18 +107,18 @@ GEM
keytar (1.5.3)
activesupport
libv8 (3.3.10.4)
- mail (2.4.3)
+ mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
memcache-client (1.8.5)
metaclass (0.0.1)
- mime-types (1.17.2)
+ mime-types (1.18)
mini_magick (3.4)
subexec (~> 0.2.1)
mocha (0.10.5)
metaclass (~> 0.0.1)
- multi_json (1.1.0)
+ multi_json (1.2.0)
multipart-post (1.1.5)
mysql2 (0.3.11)
nokogiri (1.5.2)
@@ -131,7 +133,7 @@ GEM
omniauth-oauth2 (1.0.0)
oauth2 (~> 0.5.0)
omniauth (~> 1.0)
- orm_adapter (0.0.6)
+ orm_adapter (0.0.7)
polyglot (0.3.3)
progressbar (0.10.0)
rack (1.4.1)
@@ -166,7 +168,7 @@ GEM
rake (0.9.3.beta.1)
rdoc (3.12)
json (~> 1.4)
- redcarpet (2.1.0)
+ redcarpet (2.1.1)
redis (2.2.2)
redis-actionpack (3.2.2)
actionpack (= 3.2.2)
@@ -184,12 +186,12 @@ GEM
redis-store (~> 1.1.0)
redis-store (1.1.0)
redis (~> 2.2.0)
- responders (0.8.0)
+ responders (0.9.1)
railties (~> 3.1)
riddle (1.5.1)
rubyzip (0.9.6.1)
sass (3.1.15)
- sass-rails (3.2.4)
+ sass-rails (3.2.5)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
@@ -198,21 +200,21 @@ GEM
ffi (~> 1.0)
multi_json (~> 1.0)
rubyzip
- sequel (3.33.0)
+ sequel (3.34.1)
sexp_processor (3.1.0)
shoulda (3.0.1)
shoulda-context (~> 1.0.0)
shoulda-matchers (~> 1.0.0)
shoulda-context (1.0.0)
shoulda-matchers (1.0.0)
- sitemap_generator (3.0.0)
+ sitemap_generator (3.1.1)
builder
sprockets (2.1.2)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
subexec (0.2.1)
- therubyracer (0.9.10)
+ therubyracer (0.10.0)
libv8 (~> 3.3.10)
thinking-sphinx (2.0.11)
activerecord (>= 3.0.3)
@@ -224,7 +226,7 @@ GEM
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.32)
- uglifier (1.2.3)
+ uglifier (1.2.4)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
warden (1.1.1)
@@ -245,8 +247,8 @@ DEPENDENCIES
carrierwave
coffee-rails (~> 3.2.1)
database_cleaner (~> 0.7.1)
- devise (~> 1.5.3)
- friendly_id (~> 4.0.1)
+ devise
+ friendly_id (~> 4.0.4)
haml-rails
has_scope
hirb
@@ -259,7 +261,7 @@ DEPENDENCIES
mocha
mysql2
omniauth-facebook
- rails (~> 3.2.2)
+ rails (= 3.2.2)
rails_best_practices
rake (= 0.9.3.beta.1)
redcarpet
View
10 app/views/application/_sidebar.html.haml
@@ -18,6 +18,12 @@
= render 'layouts/widgets/monthly_archive'
%h3.ribbon Seguí a Venganzas del Pasado
.widget
- = render 'layouts/widgets/facebook'
+ - if Rails.env.production?
+ = render 'layouts/widgets/facebook'
+ - else
+ = image_tag('http://placehold.it/220x440/')
.widget
- = render 'layouts/widgets/twitter'
+ - if Rails.env.production?
+ = render 'layouts/widgets/twitter'
+ - else
+ = image_tag('http://placehold.it/220x440/')
View
47 config/initializers/devise.rb
@@ -1,7 +1,5 @@
-require "omniauth-facebook"
-
-# Use this hook to configure devise mailer, warden hooks and so forth. The first
-# four configuration values can also be set straight in your models.
+# Use this hook to configure devise mailer, warden hooks and so forth.
+# Many of these configuration options can be set straight in your model.
Devise.setup do |config|
# ==> Mailer Configuration
# Configure the e-mail address which will be shown in Devise::Mailer,
@@ -11,6 +9,9 @@
# Configure the class responsible to send e-mails.
# config.mailer = "Devise::Mailer"
+ # Automatically apply schema changes in tableless databases
+ config.apply_schema = false
+
# ==> ORM configuration
# Load and configure the ORM. Supports :active_record (default) and
# :mongoid (bson_ext recommended) by default. Other ORMs may be
@@ -45,9 +46,15 @@
config.strip_whitespace_keys = [ :email ]
# Tell if authentication through request.params is enabled. True by default.
+ # It can be set to an array that will enable params authentication only for the
+ # given strategies, for example, `config.params_authenticatable = [:database]` will
+ # enable it only for database (email + password) authentication.
# config.params_authenticatable = true
# Tell if authentication through HTTP Basic Auth is enabled. False by default.
+ # It can be set to an array that will enable http authentication only for the
+ # given strategies, for example, `config.http_authenticatable = [:token]` will
+ # enable it only for token authentication.
# config.http_authenticatable = false
# If http headers should be returned for AJAX requests. True by default.
@@ -61,6 +68,13 @@
# Does not affect registerable.
# config.paranoid = true
+ # By default Devise will store the user in session. You can skip storage for
+ # :http_auth and :token_auth by adding those symbols to the array below.
+ # Notice that if you are skipping storage for all authentication paths, you
+ # may want to disable generating routes to Devise's sessions controller by
+ # passing :skip => :sessions to `devise_for` in your config/routes.rb
+ config.skip_session_storage = [:http_auth]
+
# ==> Configuration for :database_authenticatable
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
# using other encryptors, it sets how many times you want the password re-encrypted.
@@ -79,7 +93,13 @@
# able to access the website for two days without confirming his account,
# access will be blocked just in the third day. Default is 0.days, meaning
# the user cannot access the website without confirming his account.
- # config.confirm_within = 2.days
+ # config.allow_unconfirmed_access_for = 2.days
+
+ # If true, requires any email changes to be confirmed (exctly the same way as
+ # initial account confirmation) to be applied. Requires additional unconfirmed_email
+ # db field (see migrations). Until confirmed new email is stored in
+ # unconfirmed email column, and copied to email column on successful confirmation.
+ config.reconfirmable = true
# Defines which key will be used when confirming an account
# config.confirmation_keys = [ :email ]
@@ -88,9 +108,6 @@
# The time the user will be remembered without asking for credentials again.
# config.remember_for = 2.weeks
- # If true, a valid remember token can be re-used between multiple browsers.
- # config.remember_across_browsers = true
-
# If true, extends the user's remember period when remembered via cookie.
# config.extend_remember_period = false
@@ -147,7 +164,7 @@
# Time interval you can reset your password with a reset password key.
# Don't put a too small interval or your users won't have the time to
# change their passwords.
- config.reset_password_within = 2.hours
+ config.reset_password_within = 6.hours
# ==> Configuration for :encryptable
# Allow you to use another encryption algorithm besides bcrypt (default). You can use
@@ -161,10 +178,6 @@
# Defines name of the authentication token params key
# config.token_authentication_key = :auth_token
- # If true, authentication through token does not store user in session and needs
- # to be supplied on each request. Useful if you are using the token as API token.
- # config.stateless_token = false
-
# ==> Scopes configuration
# Turn scoped views on. Before rendering "sessions/new", it will first check for
# "users/sessions/new". It's turned off by default because it's slower if you
@@ -188,9 +201,8 @@
# If you have any extra navigational formats, like :iphone or :mobile, you
# should add them to the navigational formats lists.
#
- # The :"*/*" and "*/*" formats below is required to match Internet
- # Explorer requests.
- # config.navigational_formats = [:"*/*", "*/*", :html]
+ # The "*/*" below is required to match Internet Explorer requests.
+ # config.navigational_formats = ["*/*", :html]
# The default HTTP method used to sign out a resource. Default is :delete.
config.sign_out_via = :get
@@ -199,17 +211,14 @@
# Add a new OmniAuth provider. Check the wiki for more information on setting
# up on your models and hooks.
# config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
-
fb_config = YAML.load_file(Rails.root.join("config", "app_config.yml"))[Rails.env]['facebook']
config.omniauth :facebook, fb_config['app_id'], fb_config['app_secret'],
{ :scope => fb_config['scope'] }
-
# ==> Warden configuration
# If you want to use other strategies, that are not supported by Devise, or
# change the failure app, you can configure them inside the config.warden block.
#
# config.warden do |manager|
- # manager.failure_app = AnotherApp
# manager.intercept_401 = false
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
# end
View
11 config/locales/devise_es.yml
@@ -24,22 +24,21 @@ es:
signed_out: 'Sesión cerrada exitosamente.'
passwords:
send_instructions: "Recibirás un email con instrucciones sobre cómo restablecer tu contraseña."
- send_paranoid_instructions: "Si tu email existe en nuestra base de datos, recibirás un correo con instrucciones para recuperar tu clave."
updated: "Tu contraseña ha sido cambiada exitosamente. Ahora podés ingresar."
updated_not_active: 'Tu contraseña ha sido cambiada exitosamente.'
+ send_paranoid_instructions: "Si tu email existe en nuestra base de datos, recibirás un correo con instrucciones para recuperar tu clave."
confirmations:
send_instructions: 'Recibirás un email con instrucciones de cómo confirmar tu cuenta.'
send_paranoid_instructions: 'Si tu email existe en nuestra base de datos, recibirás instrucciones acerca de cómo confirmar tu cuenta.'
confirmed: 'Tu cuenta ha sido confirmada exitosamente. Ahora podés ingresar.'
registrations:
signed_up: "Te has registrado exitosamente."
- inactive_signed_up: 'Te has registrado exitosamente, sin embargo no has podido ingresar porque tu cuenta está %{reason}. Recibirás un mail con instrucciones.'
+ signed_up_but_unconfirmed: 'Se ha enviado un mensaje con un enlace de confirmación a su dirección de mail. Por favor, haga click en el enlace para confirmar su cuenta.'
+ signed_up_but_inactive: 'Te has registrado exitosamente, sin embargo no has podido ingresar porque tu cuenta está inactiva. Recibirás un mail con instrucciones.'
+ signed_up_but_locked: 'Se ha registrado correctamente. Sin embarno no podrá ingresar porque su cuenta se encuentra bloqueada.'
updated: 'Actualizaste tu cuenta exitosamente.'
+ update_needs_confirmation: "Su cuenta se ha actualizado correctamente, pero es necesario verificar su nueva dirección de mail. Por favor, chequee su email y haga click en el enlace para finalizar el proceso."
destroyed: '¡Adios! Tu cuenta ha sido eliminada exitosamente. Esperamos verte pronto.'
- reasons:
- inactive: 'inactiva'
- unconfirmed: 'sin confirmar'
- locked: 'blockeada'
unlocks:
send_instructions: "Recibirás un email con instrucciones sobre cómo desbloquear tu cuenta."
unlocked: 'Tu cuenta ha sido desbloqueada exitosamente. Ahora podés ingresar.'
View
3  config/routes.rb
@@ -2,7 +2,8 @@
get "search(/:what)", :action => :index, :controller => :search, :as => :search
- devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" } do
+ devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }
+ devise_scope :users do
get '/users/auth/:provider' => 'users/omniauth_callbacks#passthru', :as => :user_omniauth
end
View
5 db/migrate/20120402225827_change_devise_fields.rb
@@ -0,0 +1,5 @@
+class ChangeDeviseFields < ActiveRecord::Migration
+ def change
+ add_column :users, :unconfirmed_email, :string
+ end
+end
View
3  db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20120320135221) do
+ActiveRecord::Schema.define(:version => 20120402225827) do
create_table "articles", :force => true do |t|
t.string "title"
@@ -104,6 +104,7 @@
t.datetime "created_at"
t.datetime "updated_at"
t.string "gravatar_hash"
+ t.string "unconfirmed_email"
end
add_index "users", ["alias"], :name => "index_users_on_alias", :unique => true

No commit comments for this range

Something went wrong with that request. Please try again.