tb_media 1.2.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. checksums.yaml +5 -5
  2. data/Rakefile +2 -2
  3. data/Readme.markdown +3 -19
  4. data/app/assets/javascripts/admin/media/application.js +2 -2
  5. data/app/assets/javascripts/admin/media/picker.js +8 -5
  6. data/app/assets/javascripts/admin/media/plugin.js.erb +86 -81
  7. data/app/assets/stylesheets/admin/media/application.css.scss +1 -12
  8. data/app/controllers/admin/media_controller.rb +54 -61
  9. data/app/controllers/admin/media_picker_controller.rb +8 -16
  10. data/app/models/spud_media.rb +63 -110
  11. data/app/views/admin/media/index.html.erb +4 -12
  12. data/app/views/admin/media/new.html.erb +0 -1
  13. data/app/views/admin/media_picker/_media.html.erb +2 -7
  14. data/app/views/admin/media_picker/index.html.erb +1 -2
  15. data/config/locales/en.yml +0 -1
  16. data/config/routes.rb +5 -8
  17. data/db/migrate/20120101194256_create_spud_media.rb +2 -2
  18. data/db/migrate/20120501203325_add_protected_to_spud_media.rb +1 -2
  19. data/db/migrate/20120508132153_add_cropping_to_spud_media.rb +1 -1
  20. data/lib/spud_media/configuration.rb +3 -4
  21. data/lib/spud_media/content_types.rb +2 -2
  22. data/lib/spud_media/engine.rb +21 -13
  23. data/lib/spud_media/version.rb +3 -3
  24. data/lib/tasks/spud_media_tasks.rake +4 -6
  25. data/spec/controllers/admin/media_controller_spec.rb +23 -24
  26. data/spec/dummy/config.ru +1 -1
  27. data/spec/dummy/config/application.rb +2 -3
  28. data/spec/dummy/config/boot.rb +1 -1
  29. data/spec/dummy/config/environments/development.rb +0 -7
  30. data/spec/dummy/config/environments/test.rb +3 -5
  31. data/spec/dummy/config/routes.rb +2 -2
  32. data/spec/dummy/db/migrate/20130904141442_create_spud_users.tb_core.rb +12 -12
  33. data/spec/dummy/db/migrate/20130904141443_add_time_zone_to_spud_user.tb_core.rb +0 -1
  34. data/spec/dummy/db/migrate/20130904141444_add_scope_to_spud_admin_permissions.tb_core.rb +0 -1
  35. data/spec/dummy/db/migrate/20130904141446_create_spud_media.tb_media.rb +1 -1
  36. data/spec/dummy/db/migrate/20130904141447_add_protected_to_spud_media.tb_media.rb +1 -1
  37. data/spec/dummy/db/migrate/20130904141448_add_cropping_to_spud_media.tb_media.rb +3 -3
  38. data/spec/dummy/db/migrate/20151012194531_create_spud_permissions.tb_core.rb +3 -3
  39. data/spec/dummy/db/migrate/20151012194532_create_spud_role_permissions.tb_core.rb +2 -2
  40. data/spec/dummy/db/migrate/20151012194534_add_requires_password_change_to_spud_users.tb_core.rb +1 -1
  41. data/spec/dummy/db/schema.rb +63 -67
  42. data/spec/dummy/public/system/spud_media/1/cropped/test_img1.png +0 -0
  43. data/spec/dummy/public/system/spud_media/1/small/test_img1.png +0 -0
  44. data/spec/dummy/public/system/spud_media/2/cropped/test_img1.png +0 -0
  45. data/spec/dummy/public/system/spud_media/2/small/test_img1.png +0 -0
  46. data/spec/dummy/public/system/spud_media/3/cropped/test_img1.png +0 -0
  47. data/spec/dummy/public/system/spud_media/3/small/test_img1.png +0 -0
  48. data/spec/dummy/public/system/spud_media/4/cropped/test_img1.png +0 -0
  49. data/spec/dummy/public/system/spud_media/4/small/test_img1.png +0 -0
  50. data/spec/dummy/public/system/spud_media/5/cropped/test_img1.png +0 -0
  51. data/spec/dummy/public/system/spud_media/5/small/test_img1.png +0 -0
  52. data/spec/dummy/script/rails +2 -2
  53. data/spec/javascripts/support/jasmine_helper.rb +6 -7
  54. data/spec/models/spud_media_spec.rb +2 -2
  55. data/spec/rails_helper.rb +14 -7
  56. data/spec/spec_helper.rb +42 -44
  57. metadata +103 -104
  58. data/app/controllers/protected_media_controller.rb +0 -24
  59. data/app/helpers/protected_media_helper.rb +0 -3
  60. data/spec/dummy/public/system/spud_media/1/cropped/test_img1.jpg +0 -0
  61. data/spec/dummy/public/system/spud_media/2/cropped/test_img1.jpg +0 -0
  62. data/spec/dummy/public/system/spud_media/3/cropped/test_img1.jpg +0 -0
  63. data/spec/dummy/public/system/spud_media/4/cropped/test_img1.jpg +0 -0
  64. data/spec/dummy/public/system/spud_media/5/cropped/test_img1.jpg +0 -0
  65. data/spec/support/authlogic_helper.rb +0 -2
@@ -1,5 +1,5 @@
1
1
  module Spud
2
- module Media
3
- VERSION = "1.2.1"
4
- end
2
+ module Media
3
+ VERSION = '1.3.2'.freeze
4
+ end
5
5
  end
@@ -5,11 +5,9 @@
5
5
 
6
6
  namespace :spud_media do
7
7
 
8
- desc "Validate that all media files have the proper permission settings"
9
- task :validate_permissions => :environment do
10
- SpudMedia.find_each do |m|
11
- m.validate_permissions
12
- end
8
+ desc 'Validate that all media files have the proper permission settings'
9
+ task validate_permissions: :environment do
10
+ SpudMedia.find_each(&:validate_permissions)
13
11
  end
14
12
 
15
- end
13
+ end
@@ -1,44 +1,43 @@
1
1
  require 'rails_helper'
2
2
 
3
- describe Admin::MediaController, :type => :controller do
3
+ describe Admin::MediaController, type: :controller do
4
4
 
5
5
  before :each do
6
6
  activate_authlogic
7
- u = SpudUser.new(:login => "testuser",:email => "test@testuser.com",:password => "test",:password_confirmation => "test")
7
+ u = SpudUser.new(login: 'testuser', email: 'test@testuser.com', password: 'test', password_confirmation: 'test')
8
8
  u.super_admin = true
9
9
  u.save
10
10
  @user = SpudUserSession.create(u)
11
11
  end
12
-
12
+
13
13
  describe 'index' do
14
- it "index page should return all media in descending order by create_at" do
15
- @media1 = FactoryGirl.create(:spud_media, created_at: 1.hour.ago)
16
- @media2 = FactoryGirl.create(:spud_media, created_at: 2.hours.ago)
17
- @media3 = FactoryGirl.create(:spud_media, created_at: 3.hours.ago)
18
- get :index
19
- @medias = assigns(:media)
20
- expect(@medias.count).to eq(3)
21
- expect((@medias[0].id)).to eq(@media1.id)
22
- expect((@medias[1].id)).to eq(@media2.id)
23
- expect((@medias[2].id)).to eq(@media3.id)
14
+ it 'index page should return all media in descending order by create_at' do
15
+ @media1 = FactoryBot.create(:spud_media, created_at: 1.hour.ago)
16
+ @media2 = FactoryBot.create(:spud_media, created_at: 2.hours.ago)
17
+ @media3 = FactoryBot.create(:spud_media, created_at: 3.hours.ago)
18
+ get :index
19
+ @medias = assigns(:media)
20
+ expect(@medias.count).to eq(3)
21
+ expect(@medias[0].id).to eq(@media1.id)
22
+ expect(@medias[1].id).to eq(@media2.id)
23
+ expect(@medias[2].id).to eq(@media3.id)
24
24
  end
25
25
  end
26
26
 
27
27
  describe 'new' do
28
- it "should return a new media object" do
29
- get :new
30
- @media = assigns(:media)
31
- expect(@media).to_not be_blank
28
+ it 'should return a new media object' do
29
+ get :new
30
+ @media = assigns(:media)
31
+ expect(@media).to_not be_blank
32
32
  end
33
33
  end
34
34
 
35
35
  describe 'create' do
36
- it "should create a new media and returned the saved object's edit page" do
37
- post :create, spud_media: FactoryGirl.attributes_for(:spud_media)
38
- expect {
39
- post :create, spud_media: FactoryGirl.attributes_for(:spud_media)
40
- }.to change(SpudMedia, :count).by(1)
41
- end
36
+ it "should create a new media and returned the saved object's edit page" do
37
+ expect do
38
+ post :create, params: { spud_media: FactoryBot.attributes_for(:spud_media) }
39
+ end.to change(SpudMedia, :count).by(1)
40
+ end
42
41
  end
43
42
 
44
- end
43
+ end
@@ -1,4 +1,4 @@
1
1
  # This file is used by Rack-based servers to start the application.
2
2
 
3
- require ::File.expand_path('../config/environment', __FILE__)
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
4
  run Dummy::Application
@@ -3,7 +3,7 @@ require File.expand_path('../boot', __FILE__)
3
3
  require 'rails/all'
4
4
 
5
5
  Bundler.require
6
- require "tb_media"
6
+ require 'tb_media'
7
7
 
8
8
  module Dummy
9
9
  class Application < Rails::Application
@@ -31,7 +31,7 @@ module Dummy
31
31
  config.i18n.enforce_available_locales = true
32
32
 
33
33
  # Configure the default encoding used in templates for Ruby 1.9.
34
- config.encoding = "utf-8"
34
+ config.encoding = 'utf-8'
35
35
 
36
36
  # Configure sensitive parameters which will be filtered from the log file.
37
37
  config.filter_parameters += [:password]
@@ -54,4 +54,3 @@ module Dummy
54
54
  config.assets.version = '1.0'
55
55
  end
56
56
  end
57
-
@@ -7,4 +7,4 @@ if File.exist?(gemfile)
7
7
  Bundler.setup
8
8
  end
9
9
 
10
- $:.unshift File.expand_path('../../../../lib', __FILE__)
10
+ $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
@@ -22,13 +22,6 @@ Dummy::Application.configure do
22
22
  # Only use best-standards-support built into browsers
23
23
  config.action_dispatch.best_standards_support = :builtin
24
24
 
25
- # Raise exception on mass assignment protection for Active Record models
26
- config.active_record.mass_assignment_sanitizer = :strict
27
-
28
- # Log the query plan for queries taking more than this (works
29
- # with SQLite, MySQL, and PostgreSQL)
30
- config.active_record.auto_explain_threshold_in_seconds = 0.5
31
-
32
25
  # Do not compress assets
33
26
  config.assets.compress = false
34
27
 
@@ -8,8 +8,8 @@ Dummy::Application.configure do
8
8
  config.cache_classes = true
9
9
 
10
10
  # Configure static asset server for tests with Cache-Control for performance
11
- config.serve_static_files = true
12
- config.static_cache_control = "public, max-age=3600"
11
+ config.serve_static_assets = true
12
+ config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }
13
13
 
14
14
  # Do not eager load code on boot. This avoids loading your whole application
15
15
  # just for the purpose of running a single test. If you are using a tool that
@@ -24,7 +24,7 @@ Dummy::Application.configure do
24
24
  config.action_dispatch.show_exceptions = false
25
25
 
26
26
  # Disable request forgery protection in test environment
27
- config.action_controller.allow_forgery_protection = false
27
+ config.action_controller.allow_forgery_protection = false
28
28
 
29
29
  # Tell Action Mailer not to deliver emails to the real world.
30
30
  # The :test delivery method accumulates sent emails in the
@@ -33,6 +33,4 @@ Dummy::Application.configure do
33
33
 
34
34
  # Print deprecation notices to the stderr
35
35
  config.active_support.deprecation = :stderr
36
-
37
- config.active_record.raise_in_transactional_callbacks = true
38
36
  end
@@ -1,5 +1,5 @@
1
1
  Rails.application.routes.draw do
2
2
 
3
- #mount SpudMedia::Engine => "/spud_media"
4
-
3
+ # mount SpudMedia::Engine => "/spud_media"
4
+
5
5
  end
@@ -2,21 +2,21 @@
2
2
  class CreateSpudUsers < ActiveRecord::Migration
3
3
  def change
4
4
  create_table :spud_users do |t|
5
-
5
+
6
6
  t.string :first_name
7
7
  t.string :last_name
8
8
  t.boolean :super_admin
9
- t.string :login, :null => false # optional, you can use email instead, or both
10
- t.string :email, :null => false # optional, you can use login instead, or both
11
- t.string :crypted_password, :null => false # optional, see below
12
- t.string :password_salt, :null => false # optional, but highly recommended
13
- t.string :persistence_token, :null => false # required
14
- t.string :single_access_token, :null => false # optional, see Authlogic::Session::Params
15
- t.string :perishable_token, :null => false # optional, see Authlogic::Session::Perishability
9
+ t.string :login, null: false # optional, you can use email instead, or both
10
+ t.string :email, null: false # optional, you can use login instead, or both
11
+ t.string :crypted_password, null: false # optional, see below
12
+ t.string :password_salt, null: false # optional, but highly recommended
13
+ t.string :persistence_token, null: false # required
14
+ t.string :single_access_token, null: false # optional, see Authlogic::Session::Params
15
+ t.string :perishable_token, null: false # optional, see Authlogic::Session::Perishability
16
16
 
17
17
  # Magic columns, just like ActiveRecord's created_at and updated_at. These are automatically maintained by Authlogic if they are present.
18
- t.integer :login_count, :null => false, :default => 0 # optional, see Authlogic::Session::MagicColumns
19
- t.integer :failed_login_count, :null => false, :default => 0 # optional, see Authlogic::Session::MagicColumns
18
+ t.integer :login_count, null: false, default: 0 # optional, see Authlogic::Session::MagicColumns
19
+ t.integer :failed_login_count, null: false, default: 0 # optional, see Authlogic::Session::MagicColumns
20
20
  t.datetime :last_request_at # optional, see Authlogic::Session::MagicColumns
21
21
  t.datetime :current_login_at # optional, see Authlogic::Session::MagicColumns
22
22
  t.datetime :last_login_at # optional, see Authlogic::Session::MagicColumns
@@ -24,7 +24,7 @@ class CreateSpudUsers < ActiveRecord::Migration
24
24
  t.string :last_login_ip # optional, see Authlogic::Session::MagicColumns
25
25
  t.timestamps
26
26
  end
27
- add_index :spud_users,:login
28
- add_index :spud_users,:email
27
+ add_index :spud_users, :login
28
+ add_index :spud_users, :email
29
29
  end
30
30
  end
@@ -2,6 +2,5 @@
2
2
  class AddTimeZoneToSpudUser < ActiveRecord::Migration
3
3
  def change
4
4
  add_column :spud_users, :time_zone, :string
5
-
6
5
  end
7
6
  end
@@ -2,6 +2,5 @@
2
2
  class AddScopeToSpudAdminPermissions < ActiveRecord::Migration
3
3
  def change
4
4
  add_column :spud_admin_permissions, :scope, :string
5
-
6
5
  end
7
6
  end
@@ -9,4 +9,4 @@ class CreateSpudMedia < ActiveRecord::Migration
9
9
  t.timestamps
10
10
  end
11
11
  end
12
- end
12
+ end
@@ -1,7 +1,7 @@
1
1
  # This migration comes from tb_media (originally 20120501203325)
2
2
  class AddProtectedToSpudMedia < ActiveRecord::Migration
3
3
  def change
4
- add_column :spud_media, :is_protected, :boolean, :default => false
4
+ add_column :spud_media, :is_protected, :boolean, default: false
5
5
  add_column :spud_media, :attachment_updated_at, :datetime
6
6
  end
7
7
  end
@@ -1,10 +1,10 @@
1
1
  # This migration comes from tb_media (originally 20120508132153)
2
2
  class AddCroppingToSpudMedia < ActiveRecord::Migration
3
3
  def change
4
- add_column :spud_media, :crop_x, :int, :default => 0
5
- add_column :spud_media, :crop_y, :int, :default => 0
4
+ add_column :spud_media, :crop_x, :int, default: 0
5
+ add_column :spud_media, :crop_y, :int, default: 0
6
6
  add_column :spud_media, :crop_w, :int
7
7
  add_column :spud_media, :crop_h, :int
8
- add_column :spud_media, :crop_s, :int, :default => 100
8
+ add_column :spud_media, :crop_s, :int, default: 100
9
9
  end
10
10
  end
@@ -2,10 +2,10 @@
2
2
  class CreateSpudPermissions < ActiveRecord::Migration
3
3
  def change
4
4
  create_table :spud_permissions do |t|
5
- t.string :name, :null => false
6
- t.string :tag, :null => false
5
+ t.string :name, null: false
6
+ t.string :tag, null: false
7
7
  t.timestamps
8
8
  end
9
- add_index :spud_permissions, :tag, :unique => true
9
+ add_index :spud_permissions, :tag, unique: true
10
10
  end
11
11
  end
@@ -2,8 +2,8 @@
2
2
  class CreateSpudRolePermissions < ActiveRecord::Migration
3
3
  def change
4
4
  create_table :spud_role_permissions do |t|
5
- t.integer :spud_role_id, :null => false
6
- t.string :spud_permission_tag, :null => false
5
+ t.integer :spud_role_id, null: false
6
+ t.string :spud_permission_tag, null: false
7
7
  t.timestamps
8
8
  end
9
9
  add_index :spud_role_permissions, :spud_role_id
@@ -1,6 +1,6 @@
1
1
  # This migration comes from tb_core (originally 20150610143438)
2
2
  class AddRequiresPasswordChangeToSpudUsers < ActiveRecord::Migration
3
3
  def change
4
- add_column :spud_users, :requires_password_change, :boolean, :default => false
4
+ add_column :spud_users, :requires_password_change, :boolean, default: false
5
5
  end
6
6
  end
@@ -1,4 +1,3 @@
1
- # encoding: UTF-8
2
1
  # This file is auto-generated from the current state of the database. Instead
3
2
  # of editing this file, please use the migrations feature of Active Record to
4
3
  # incrementally modify your database, and then regenerate this schema definition.
@@ -11,83 +10,80 @@
11
10
  #
12
11
  # It's strongly recommended that you check this file into your version control system.
13
12
 
14
- ActiveRecord::Schema.define(version: 20151012194534) do
13
+ ActiveRecord::Schema.define(version: 20_151_012_194_534) do
15
14
 
16
- create_table "spud_media", force: :cascade do |t|
17
- t.string "attachment_content_type", limit: 255
18
- t.integer "attachment_file_size", limit: 4
19
- t.string "attachment_file_name", limit: 255
20
- t.datetime "created_at"
21
- t.datetime "updated_at"
22
- t.boolean "is_protected", limit: 1, default: false
23
- t.datetime "attachment_updated_at"
24
- t.integer "crop_x", limit: 4, default: 0
25
- t.integer "crop_y", limit: 4, default: 0
26
- t.integer "crop_w", limit: 4
27
- t.integer "crop_h", limit: 4
28
- t.integer "crop_s", limit: 4, default: 100
15
+ create_table 'spud_media', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
16
+ t.string 'attachment_content_type'
17
+ t.integer 'attachment_file_size'
18
+ t.string 'attachment_file_name'
19
+ t.datetime 'created_at'
20
+ t.datetime 'updated_at'
21
+ t.boolean 'is_protected', default: false
22
+ t.datetime 'attachment_updated_at'
23
+ t.integer 'crop_x', default: 0
24
+ t.integer 'crop_y', default: 0
25
+ t.integer 'crop_w'
26
+ t.integer 'crop_h'
27
+ t.integer 'crop_s', default: 100
29
28
  end
30
29
 
31
- create_table "spud_permissions", force: :cascade do |t|
32
- t.string "name", limit: 255, null: false
33
- t.string "tag", limit: 255, null: false
34
- t.datetime "created_at"
35
- t.datetime "updated_at"
30
+ create_table 'spud_permissions', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
31
+ t.string 'name', null: false
32
+ t.string 'tag', null: false
33
+ t.datetime 'created_at'
34
+ t.datetime 'updated_at'
35
+ t.index ['tag'], name: 'index_spud_permissions_on_tag', unique: true, using: :btree
36
36
  end
37
37
 
38
- add_index "spud_permissions", ["tag"], name: "index_spud_permissions_on_tag", unique: true, using: :btree
39
-
40
- create_table "spud_role_permissions", force: :cascade do |t|
41
- t.integer "spud_role_id", limit: 4, null: false
42
- t.string "spud_permission_tag", limit: 255, null: false
43
- t.datetime "created_at"
44
- t.datetime "updated_at"
38
+ create_table 'spud_role_permissions', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
39
+ t.integer 'spud_role_id', null: false
40
+ t.string 'spud_permission_tag', null: false
41
+ t.datetime 'created_at'
42
+ t.datetime 'updated_at'
43
+ t.index ['spud_permission_tag'], name: 'index_spud_role_permissions_on_spud_permission_tag', using: :btree
44
+ t.index ['spud_role_id'], name: 'index_spud_role_permissions_on_spud_role_id', using: :btree
45
45
  end
46
46
 
47
- add_index "spud_role_permissions", ["spud_permission_tag"], name: "index_spud_role_permissions_on_spud_permission_tag", using: :btree
48
- add_index "spud_role_permissions", ["spud_role_id"], name: "index_spud_role_permissions_on_spud_role_id", using: :btree
49
-
50
- create_table "spud_roles", force: :cascade do |t|
51
- t.string "name", limit: 255
52
- t.datetime "created_at"
53
- t.datetime "updated_at"
47
+ create_table 'spud_roles', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
48
+ t.string 'name'
49
+ t.datetime 'created_at'
50
+ t.datetime 'updated_at'
54
51
  end
55
52
 
56
- create_table "spud_user_settings", force: :cascade do |t|
57
- t.integer "spud_user_id", limit: 4
58
- t.string "key", limit: 255
59
- t.string "value", limit: 255
60
- t.datetime "created_at"
61
- t.datetime "updated_at"
53
+ create_table 'spud_user_settings', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
54
+ t.integer 'spud_user_id'
55
+ t.string 'key'
56
+ t.string 'value'
57
+ t.datetime 'created_at'
58
+ t.datetime 'updated_at'
62
59
  end
63
60
 
64
- create_table "spud_users", force: :cascade do |t|
65
- t.string "first_name", limit: 255
66
- t.string "last_name", limit: 255
67
- t.boolean "super_admin", limit: 1
68
- t.string "login", limit: 255, null: false
69
- t.string "email", limit: 255, null: false
70
- t.string "crypted_password", limit: 255, null: false
71
- t.string "password_salt", limit: 255, null: false
72
- t.string "persistence_token", limit: 255, null: false
73
- t.string "single_access_token", limit: 255, null: false
74
- t.string "perishable_token", limit: 255, null: false
75
- t.integer "login_count", limit: 4, default: 0, null: false
76
- t.integer "failed_login_count", limit: 4, default: 0, null: false
77
- t.datetime "last_request_at"
78
- t.datetime "current_login_at"
79
- t.datetime "last_login_at"
80
- t.string "current_login_ip", limit: 255
81
- t.string "last_login_ip", limit: 255
82
- t.datetime "created_at"
83
- t.datetime "updated_at"
84
- t.string "time_zone", limit: 255
85
- t.integer "spud_role_id", limit: 4
86
- t.boolean "requires_password_change", limit: 1, default: false
61
+ create_table 'spud_users', force: :cascade, options: 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
62
+ t.string 'first_name'
63
+ t.string 'last_name'
64
+ t.boolean 'super_admin'
65
+ t.string 'login', null: false
66
+ t.string 'email', null: false
67
+ t.string 'crypted_password', null: false
68
+ t.string 'password_salt', null: false
69
+ t.string 'persistence_token', null: false
70
+ t.string 'single_access_token', null: false
71
+ t.string 'perishable_token', null: false
72
+ t.integer 'login_count', default: 0, null: false
73
+ t.integer 'failed_login_count', default: 0, null: false
74
+ t.datetime 'last_request_at'
75
+ t.datetime 'current_login_at'
76
+ t.datetime 'last_login_at'
77
+ t.string 'current_login_ip'
78
+ t.string 'last_login_ip'
79
+ t.datetime 'created_at'
80
+ t.datetime 'updated_at'
81
+ t.string 'time_zone'
82
+ t.integer 'spud_role_id'
83
+ t.boolean 'requires_password_change', default: false
84
+ t.index ['email'], name: 'index_spud_users_on_email', using: :btree
85
+ t.index ['login'], name: 'index_spud_users_on_login', using: :btree
86
+ t.index ['spud_role_id'], name: 'index_spud_users_on_spud_role_id', using: :btree
87
87
  end
88
88
 
89
- add_index "spud_users", ["email"], name: "index_spud_users_on_email", using: :btree
90
- add_index "spud_users", ["login"], name: "index_spud_users_on_login", using: :btree
91
- add_index "spud_users", ["spud_role_id"], name: "index_spud_users_on_spud_role_id", using: :btree
92
-
93
89
  end