Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixes to get cucumber tests passing

  • Loading branch information...
commit ea0e66f290063ceaec9d1b7e394cb97ffd8683aa 1 parent 1307d24
@senior senior authored
View
3  Gemfile
@@ -61,7 +61,8 @@ end
#And with fix that doesn't assume cache strategy is file/directory backed
#And with Google Analytics _trackPageLoadTime
#And switching defaults that would otherwise say 'Company Name' to 'Strange Loop'
-gem 'refinerycms', :git => "git://github.com/strangeloop/refinerycms.git", :branch => 'path_not_url_ssl_fix', :ref => '6ba952141436b69b7feab69498709090815a7271'
+gem 'refinerycms', :git => "git://github.com/strangeloop/refinerycms.git", :branch => 'path_not_url_ssl_fix', :ref => 'aeaaef2078903cb9ec9f8b80f45aeb335f7acc13'
+#gem 'refinerycms', :path => "~/devl/tsl/tsl-refinerycms"
group :development, :test do
# RSpec
View
10 Gemfile.lock
@@ -1,7 +1,7 @@
GIT
remote: git://github.com/strangeloop/refinerycms.git
- revision: 6ba952141436b69b7feab69498709090815a7271
- ref: 6ba952141436b69b7feab69498709090815a7271
+ revision: aeaaef2078903cb9ec9f8b80f45aeb335f7acc13
+ ref: aeaaef2078903cb9ec9f8b80f45aeb335f7acc13
branch: path_not_url_ssl_fix
specs:
refinerycms (0.9.9.15)
@@ -161,7 +161,7 @@ GEM
babosa (~> 0.3.0)
gherkin (2.4.6)
json (>= 1.4.6)
- globalize3 (0.2.0.beta1)
+ globalize3 (0.2.0.beta3)
activemodel (>= 3.0.0)
activerecord (>= 3.0.0)
paper_trail (~> 2)
@@ -240,7 +240,7 @@ GEM
oa-openid (= 0.2.6)
open4 (1.1.0)
orm_adapter (0.0.5)
- paper_trail (2.2.9)
+ paper_trail (2.3.1)
rails (~> 3)
polyglot (0.3.2)
pyu-ruby-sasl (0.0.3.3)
@@ -273,7 +273,7 @@ GEM
thor (~> 0.14.4)
rake (0.9.2)
rbx-require-relative (0.0.5)
- rdoc (3.9.2)
+ rdoc (3.9.4)
refinerycms-generators (1.0.3)
refinerycms-news (1.0.1)
refinerycms (~> 0.9.8)
View
18 app/models/attendee.rb
@@ -85,13 +85,17 @@ def activation_token
end
def self.check_token (cipher_text)
- token = decrypt_token(cipher_text)
- token_time = Time.parse(token[2]).to_i
- attendee = Attendee.where("acct_activation_token = ?", token[1]).first
- if attendee && attendee.token_created_at.to_i == token_time && attendee.email == token[0]
- attendee
- else
- false
+ begin
+ token = decrypt_token(cipher_text)
+ token_time = Time.parse(token[2]).to_i
+ attendee = Attendee.where("acct_activation_token = ?", token[1]).first
+ if attendee && attendee.token_created_at.to_i == token_time && attendee.email == token[0]
+ attendee
+ else
+ nil
+ end
+ rescue
+ nil
end
end
View
4 app/models/attendee_cred.rb
@@ -2,7 +2,9 @@ class AttendeeCred < ActiveRecord::Base
# Include default devise modules. Others available are:
# :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable
devise :database_authenticatable, :registerable,
- :recoverable, :rememberable, :trackable, :validatable, :omniauthable
+ :recoverable, :rememberable, :trackable, :validatable, :omniauthable,
+ :authentication_keys => [:email]
+
# Setup accessible (or protected) attributes for your model
attr_accessible :email, :password, :password_confirmation, :remember_me
View
2  app/views/devise/registrations/new.html.erb
@@ -39,7 +39,7 @@
<% end %>
</div>
</div>
- <% @else %>
+ <% else %>
Invalid Token
<% end %>
<div class="clear"></div>
View
3  config/routes.rb
@@ -26,6 +26,7 @@
get '/attendee_creds/auth/:provider' => 'omniauth_callbacks#passthru', :as => :external_auth
get '/login' => 'devise/sessions#new', :as => :new_attendee_session
get '/logout' => 'devise/sessions#destroy', :as => :destroy_attendee_session
+ get '/activation/:token', :to => 'devise/registrations#new', :as => :activation
end
resource :attendee, :only => [:edit]
@@ -42,6 +43,6 @@
match '/blog/stloopadm' => redirect('/news')
match '/blog' => redirect('/news')
- get '/activation/:token', :to => 'attendee_cred/sign_up#create', :as => :activation
+
end
Please sign in to comment.
Something went wrong with that request. Please try again.