mirror of
https://github.com/danbee/danbarberphoto
synced 2025-03-04 08:49:07 +00:00
Update Monban to Oath
This commit is contained in:
parent
53a0a6259c
commit
e7733b8bf0
5
Gemfile
5
Gemfile
@ -39,7 +39,6 @@ end
|
||||
group :test do
|
||||
gem 'factory_girl_rails'
|
||||
gem 'shoulda'
|
||||
gem 'shoulda-context'
|
||||
gem 'shoulda-matchers'
|
||||
gem 'poltergeist'
|
||||
gem 'database_cleaner'
|
||||
@ -58,8 +57,8 @@ gem 'administrate-field-image'
|
||||
gem 'dragonfly'
|
||||
gem 'dragonfly-s3_data_store'
|
||||
gem 'kaminari'
|
||||
gem 'monban'
|
||||
gem 'monban-generators'
|
||||
gem 'oath'
|
||||
gem 'oath-generators'
|
||||
gem 'nokogiri'
|
||||
gem 'pg'
|
||||
gem 'kramdown'
|
||||
|
||||
19
Gemfile.lock
19
Gemfile.lock
@ -180,16 +180,16 @@ GEM
|
||||
minitest (5.11.3)
|
||||
momentjs-rails (2.17.1)
|
||||
railties (>= 3.1)
|
||||
monban (1.1.1)
|
||||
bcrypt
|
||||
rails
|
||||
warden
|
||||
monban-generators (1.0.1)
|
||||
monban (>= 0.0.12)
|
||||
multi_json (1.13.1)
|
||||
nio4r (2.2.0)
|
||||
nokogiri (1.8.2)
|
||||
mini_portile2 (~> 2.3.0)
|
||||
oath (1.1.0)
|
||||
bcrypt
|
||||
rails
|
||||
warden
|
||||
oath-generators (1.0.1)
|
||||
oath (>= 0.0.12)
|
||||
parallel (1.12.1)
|
||||
parser (2.4.0.2)
|
||||
ast (~> 2.3)
|
||||
@ -351,9 +351,9 @@ DEPENDENCIES
|
||||
kaminari
|
||||
kramdown
|
||||
letter_opener
|
||||
monban
|
||||
monban-generators
|
||||
nokogiri
|
||||
oath
|
||||
oath-generators
|
||||
pg
|
||||
poltergeist
|
||||
powder
|
||||
@ -367,7 +367,6 @@ DEPENDENCIES
|
||||
ruby_parser
|
||||
sass-rails
|
||||
shoulda
|
||||
shoulda-context
|
||||
shoulda-matchers
|
||||
simple_form
|
||||
simplecov
|
||||
@ -379,4 +378,4 @@ RUBY VERSION
|
||||
ruby 2.4.2p198
|
||||
|
||||
BUNDLED WITH
|
||||
1.16.0
|
||||
1.16.1
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
# you're free to overwrite the RESTful controller actions.
|
||||
module Admin
|
||||
class ApplicationController < Administrate::ApplicationController
|
||||
include Monban::ControllerHelpers
|
||||
include Oath::ControllerHelpers
|
||||
|
||||
before_action :require_login
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
class ApplicationController < ActionController::Base
|
||||
include Monban::ControllerHelpers
|
||||
include Oath::ControllerHelpers
|
||||
protect_from_forgery
|
||||
|
||||
rescue_from ActiveRecord::RecordNotFound, with: :render_404
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
require 'monban/constraints/signed_in'
|
||||
require 'monban/constraints/signed_out'
|
||||
require 'oath/constraints/signed_in'
|
||||
require 'oath/constraints/signed_out'
|
||||
|
||||
DanBarberPhoto::Application.routes.draw do
|
||||
namespace :admin do
|
||||
|
||||
12
db/schema.rb
12
db/schema.rb
@ -1,4 +1,3 @@
|
||||
# encoding: UTF-8
|
||||
# This file is auto-generated from the current state of the database. Instead
|
||||
# of editing this file, please use the migrations feature of Active Record to
|
||||
# incrementally modify your database, and then regenerate this schema definition.
|
||||
@ -30,10 +29,9 @@ ActiveRecord::Schema.define(version: 20151028124718) do
|
||||
create_table "categories_photos", id: false, force: :cascade do |t|
|
||||
t.integer "category_id"
|
||||
t.integer "photo_id"
|
||||
t.index ["category_id", "photo_id"], name: "index_categories_photos_on_category_id_and_photo_id", unique: true
|
||||
end
|
||||
|
||||
add_index "categories_photos", ["category_id", "photo_id"], name: "index_categories_photos_on_category_id_and_photo_id", unique: true, using: :btree
|
||||
|
||||
create_table "pages", force: :cascade do |t|
|
||||
t.string "name", limit: 255
|
||||
t.string "title", limit: 255
|
||||
@ -62,18 +60,16 @@ ActiveRecord::Schema.define(version: 20151028124718) do
|
||||
t.text "data"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.index ["session_id"], name: "index_sessions_on_session_id"
|
||||
t.index ["updated_at"], name: "index_sessions_on_updated_at"
|
||||
end
|
||||
|
||||
add_index "sessions", ["session_id"], name: "index_sessions_on_session_id", using: :btree
|
||||
add_index "sessions", ["updated_at"], name: "index_sessions_on_updated_at", using: :btree
|
||||
|
||||
create_table "users", force: :cascade do |t|
|
||||
t.string "email", null: false
|
||||
t.string "password_digest", limit: 60, null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["email"], name: "index_users_on_email", unique: true
|
||||
end
|
||||
|
||||
add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
|
||||
|
||||
end
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
require "spec_helper"
|
||||
|
||||
describe Contact do
|
||||
it { should validate_presence_of(:email) }
|
||||
it { should validate_presence_of(:name) }
|
||||
it { should validate_presence_of(:message) }
|
||||
it { is_expected.to validate_presence_of(:email) }
|
||||
it { is_expected.to validate_presence_of(:name) }
|
||||
it { is_expected.to validate_presence_of(:message) }
|
||||
|
||||
it { should allow_value("test@test.com").for(:email) }
|
||||
it { should_not allow_value("test@test").for(:email) }
|
||||
it { is_expected.to allow_value('test@test.com').for(:email) }
|
||||
it { is_expected.not_to allow_value('test@test').for(:email) }
|
||||
|
||||
let(:contact) { build(:contact) }
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user