Commit d4599ea5
Changed files (11)
app
controllers
models
config
spec
support
app/controllers/registrations_controller.rb → app/controllers/registrations_controller.rb.bak
File renamed without changes
app/models/user.rb
@@ -4,7 +4,7 @@ class User < ActiveRecord::Base
validates :name, :presence => true
validates :website, :format => URI::regexp(%w(http https)), :allow_blank => true
- devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable, :token_authenticatable
+ #devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable, :token_authenticatable
has_many :creations, :dependent => :destroy
has_many :favorites, :dependent => :destroy
config/initializers/devise.rb → config/initializers/devise.rb.bak
File renamed without changes
config/application.rb
@@ -33,13 +33,13 @@ module Cake
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
- config.to_prepare {
- Devise::SessionsController.layout "application"
- # Devise::RegistrationsController.layout proc{ |controller| user_signed_in? ? "application" : "users" }
- Devise::ConfirmationsController.layout "application"
- Devise::UnlocksController.layout "application"
- Devise::PasswordsController.layout "application"
- }
+ #config.to_prepare {
+ #Devise::SessionsController.layout "application"
+ ## Devise::RegistrationsController.layout proc{ |controller| user_signed_in? ? "application" : "users" }
+ #Devise::ConfirmationsController.layout "application"
+ #Devise::UnlocksController.layout "application"
+ #Devise::PasswordsController.layout "application"
+ #}
config.middleware.use ExceptionNotification::Rack, :email => {
:email_prefix => "[Boom! #{Rails.env}] ",
:sender_address => %{"notifier" <notifier@cakeside.com>},
config/routes.rb
@@ -51,7 +51,7 @@ Cake::Application.routes.draw do
get "search" => 'search#index'
# /users
- devise_for :users, :controllers => {:registrations => 'registrations'}, :path => '', :path_names => { :sign_in => "signin", :sign_out => "signout", :sign_up => "register" }
+ #devise_for :users, :controllers => {:registrations => 'registrations'}, :path => '', :path_names => { :sign_in => "signin", :sign_out => "signout", :sign_up => "register" }
# sitemap
get "/sitemap.xml", to: "sitemap#index", defaults: { format: :xml }
spec/controllers/profiles_controller_spec.rb
@@ -1,13 +1,14 @@
require 'rails_helper'
describe ProfilesController do
- include Devise::TestHelpers
+ #include Devise::TestHelpers
let(:user) { create(:user) }
let!(:creation) { create(:creation, user: user) }
before (:each) do
- request.env['warden'] = double(Warden, :authenticate => user, :authenticate! => user)
+ #request.env['warden'] = double(Warden, :authenticate => user, :authenticate! => user)
+ http_login(user)
end
describe "GET 'index'" do
spec/controllers/registrations_controller_spec.rb
@@ -1,4 +0,0 @@
-require 'rails_helper'
-
-describe RegistrationsController do
-end
spec/support/devise_helper.rb
@@ -1,10 +1,8 @@
-module DeviseHelper
- module Controllers
- def http_login(user)
- new_session = UserSession.new
- controller.stub(:user_session).and_return(new_session)
- controller.stub(:current_user).and_return(user)
- controller.stub(:user_signed_in?).and_return(true)
- end
+module Authentication
+ def http_login(user)
+ new_session = UserSession.new
+ controller.stub(:user_session).and_return(new_session)
+ controller.stub(:current_user).and_return(user)
+ controller.stub(:user_signed_in?).and_return(true)
end
end
spec/rails_helper.rb
@@ -40,8 +40,8 @@ RSpec.configure do |config|
# The different available types are documented in the features, such as in
# https://relishapp.com/rspec/rspec-rails/docs
config.infer_spec_type_from_file_location!
- config.include DeviseHelper::Controllers, type: :controller
- config.include Devise::TestHelpers, type: :controller
+ config.include Authentication, type: :controller
+ #config.include Devise::TestHelpers, type: :controller
config.include WaitForAjax, type: :feature
config.before(:suite) do
Gemfile
@@ -13,7 +13,7 @@ group :doc do
end
# to remove
-gem 'devise', '~> 3.0.0'
+#gem 'devise', '~> 3.0.0'
gem 'carrierwave', '~> 0.9.0'
gem 'rmagick', '~> 2.13.0'
gem 'acts-as-taggable-on', '~> 3.3.0'
Gemfile.lock
@@ -37,9 +37,6 @@ GEM
aws-sdk (1.42.0)
json (~> 1.4)
nokogiri (>= 1.4.4)
- bcrypt (3.1.7)
- bcrypt-ruby (3.1.5)
- bcrypt (>= 3.1.3)
better_errors (2.0.0)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
@@ -97,11 +94,6 @@ GEM
delayed_job_active_record (4.0.2)
activerecord (>= 3.0, < 4.2)
delayed_job (>= 3.0, < 4.1)
- devise (3.0.4)
- bcrypt-ruby (~> 3.0)
- orm_adapter (~> 0.1)
- railties (>= 3.2.6, < 5)
- warden (~> 1.2.3)
diff-lcs (1.2.5)
docile (1.1.5)
dotenv (0.11.1)
@@ -209,7 +201,6 @@ GEM
newrelic_rpm (3.9.4.245)
nokogiri (1.6.3.1)
mini_portile (= 0.6.0)
- orm_adapter (0.5.0)
pg (0.17.1)
poltergeist (1.5.1)
capybara (~> 2.1)
@@ -337,8 +328,6 @@ GEM
rack
raindrops (~> 0.7)
uniform_notifier (1.6.2)
- warden (1.2.3)
- rack (>= 1.0)
websocket (1.2.1)
websocket-driver (0.3.4)
xpath (2.0.0)
@@ -367,7 +356,6 @@ DEPENDENCIES
database_cleaner
delayed_job (~> 4.0)
delayed_job_active_record (~> 4.0)
- devise (~> 3.0.0)
dotenv-deployment
dotenv-rails
ejs (~> 1.1.1)