Added authlogic and user schema
This commit is contained in:
parent
a9b7e50209
commit
3b056a2db8
6 changed files with 46 additions and 1 deletions
3
Gemfile
3
Gemfile
|
|
@ -102,3 +102,6 @@ gem 'cookies_eu'
|
|||
|
||||
# Requires: apt-get install libbz2-dev
|
||||
gem 'bzip2-ruby', :git => 'https://github.com/chewi/bzip2-ruby.git'
|
||||
|
||||
# Authentication
|
||||
gem 'authlogic'
|
||||
|
|
|
|||
13
Gemfile.lock
13
Gemfile.lock
|
|
@ -43,6 +43,11 @@ GEM
|
|||
thread_safe (~> 0.3, >= 0.3.4)
|
||||
tzinfo (~> 1.1)
|
||||
arel (6.0.0)
|
||||
authlogic (3.4.5)
|
||||
activerecord (>= 3.2)
|
||||
activesupport (>= 3.2)
|
||||
request_store (~> 1.0)
|
||||
scrypt (~> 1.2)
|
||||
better_errors (2.1.1)
|
||||
coderay (>= 1.0.0)
|
||||
erubis (>= 2.6.6)
|
||||
|
|
@ -83,6 +88,9 @@ GEM
|
|||
fancybox2-rails (0.2.8)
|
||||
railties (>= 3.1.0, < 5.0)
|
||||
ffi (1.9.8)
|
||||
ffi-compiler (0.1.3)
|
||||
ffi (>= 1.0.0)
|
||||
rake
|
||||
formatador (0.2.5)
|
||||
foundation-rails (5.5.1.2)
|
||||
railties (>= 3.1.0)
|
||||
|
|
@ -194,6 +202,7 @@ GEM
|
|||
rdoc (4.2.0)
|
||||
json (~> 1.4)
|
||||
ref (1.0.5)
|
||||
request_store (1.1.0)
|
||||
ruby-graphviz (1.0.9)
|
||||
sass (3.4.13)
|
||||
sass-rails (5.0.3)
|
||||
|
|
@ -202,6 +211,9 @@ GEM
|
|||
sprockets (>= 2.8, < 4.0)
|
||||
sprockets-rails (>= 2.0, < 4.0)
|
||||
tilt (~> 1.1)
|
||||
scrypt (1.2.1)
|
||||
ffi-compiler (>= 0.0.2)
|
||||
rake
|
||||
sdoc (0.4.1)
|
||||
json (~> 1.7, >= 1.7.7)
|
||||
rdoc (~> 4.0)
|
||||
|
|
@ -250,6 +262,7 @@ PLATFORMS
|
|||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
authlogic
|
||||
better_errors
|
||||
binding_of_caller
|
||||
byebug
|
||||
|
|
|
|||
2
app/models/user.rb
Normal file
2
app/models/user.rb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
class User < ActiveRecord::Base
|
||||
end
|
||||
11
db/migrate/20150503133405_create_users.rb
Normal file
11
db/migrate/20150503133405_create_users.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
class CreateUsers < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :users do |t|
|
||||
t.text :email
|
||||
t.text :realname
|
||||
t.text :password
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20150503130412) do
|
||||
ActiveRecord::Schema.define(version: 20150503133405) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
|
@ -65,6 +65,9 @@ ActiveRecord::Schema.define(version: 20150503130412) do
|
|||
add_index "screenshots", ["id", "uploaderhash"], name: "id_uploaderhash", using: :btree
|
||||
|
||||
create_table "users", force: :cascade do |t|
|
||||
t.text "email"
|
||||
t.text "realname"
|
||||
t.text "password"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
|
|
|||
13
test/models/user_test.rb
Normal file
13
test/models/user_test.rb
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
require "test_helper"
|
||||
|
||||
class UserTest < ActiveSupport::TestCase
|
||||
|
||||
def user
|
||||
@user ||= User.new
|
||||
end
|
||||
|
||||
def test_valid
|
||||
assert user.valid?
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue