defcon 1.2.0 → 1.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 35613e488dcfd15df5e53bea6a181c1ba10454c3
4
- data.tar.gz: fb978e16feedefea61c8ae71caed4aca014c5cf5
3
+ metadata.gz: c1602a89c4a95e2c3e88fa987b7f6a8b5ca68f1b
4
+ data.tar.gz: 809cf2abe2a1eaaa683225ead302e37e8d84fd97
5
5
  SHA512:
6
- metadata.gz: 0ec690ed393cbbb4ad042e479e4cc1b5cf033852adbc461baaf0006c54cf3765f0b2f9f1b26bfd5549c072c9c681b76b2f971a68d53bab6849e4fee5b5c937d0
7
- data.tar.gz: f5d017288e9a0356d73bd49d1a566c2860822bddbecbca6f03dec1591e46993ae91259703c199fe01114ccd3bb556070b079c843534206fb9a60425120b1889e
6
+ metadata.gz: 0942117ab5927d3ae8b0466c82a9085d0837fa6f5d28cf873baed4005baf35f306eea7b3442b970d23655f8d8b4e3c5c3656d49e1142d1de7cb23bb8d19a9875
7
+ data.tar.gz: c93672b916e16d23a2b666f625fb42bb747649d95550dde6cca0f27ba9cfd21418e3bf26da992761ca0f2750265391f13e902d2047714d45fcd918d66b4d5088
@@ -1,7 +1,9 @@
1
1
  module Defcon
2
2
  class AdminUser < ActiveRecord::Base
3
3
  has_secure_password
4
- validates :username, presence: true
4
+
5
+ validates :username, presence: true, :uniqueness => { :case_sensitive => false }
6
+ validates :email, :uniqueness => { :case_sensitive => false }
5
7
 
6
8
  before_validation :set_defaults
7
9
 
@@ -1,5 +1,5 @@
1
1
  class AddIndexToDefconAdminUsers < ActiveRecord::Migration
2
2
  def change
3
- add_index :defcon_admin_users, :username
3
+ add_index :defcon_admin_users, :username, unique: true
4
4
  end
5
5
  end
@@ -1,6 +1,6 @@
1
1
  class AddEmailToDefconAdminUsers < ActiveRecord::Migration
2
2
  def change
3
3
  add_column :defcon_admin_users, :email, :string
4
- add_index :defcon_admin_users, :email
4
+ add_index :defcon_admin_users, :email, :unique: true
5
5
  end
6
6
  end
@@ -1,3 +1,3 @@
1
1
  module Defcon
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
File without changes
@@ -2046,3 +2046,22 @@ Migrating to AddEmailToDefconAdminUsers (20141009215910)
2046
2046
  FROM sqlite_temp_master
2047
2047
  WHERE name='index_defcon_admin_users_on_username' AND type='index'
2048
2048
  
2049
+  (129.1ms) CREATE TABLE "defcon_admin_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "username" varchar(255), "password_digest" varchar(255), "read_only" boolean, "attempts" integer, "max_attempts" integer, "master" boolean, "priority" integer, "created_at" datetime, "updated_at" datetime, "email" varchar(255)) 
2050
+  (0.1ms) select sqlite_version(*)
2051
+  (134.3ms) CREATE INDEX "index_defcon_admin_users_on_email" ON "defcon_admin_users" ("email")
2052
+  (0.2ms) SELECT sql
2053
+ FROM sqlite_master
2054
+ WHERE name='index_defcon_admin_users_on_email' AND type='index'
2055
+ UNION ALL
2056
+ SELECT sql
2057
+ FROM sqlite_temp_master
2058
+ WHERE name='index_defcon_admin_users_on_email' AND type='index'
2059
+
2060
+  (154.3ms) CREATE INDEX "index_defcon_admin_users_on_username" ON "defcon_admin_users" ("username")
2061
+  (150.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
2062
+  (154.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
2063
+  (0.4ms) SELECT version FROM "schema_migrations"
2064
+  (153.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141009215910')
2065
+  (153.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141008173352')
2066
+  (177.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141008214632')
2067
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: defcon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cleophus Robinson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-09 00:00:00.000000000 Z
11
+ date: 2014-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -115,6 +115,7 @@ files:
115
115
  - test/dummy/config/secrets.yml
116
116
  - test/dummy/db/development.sqlite3
117
117
  - test/dummy/db/schema.rb
118
+ - test/dummy/db/test.sqlite3
118
119
  - test/dummy/log/development.log
119
120
  - test/dummy/public/404.html
120
121
  - test/dummy/public/422.html
@@ -200,6 +201,7 @@ test_files:
200
201
  - test/dummy/config/environments/development.rb
201
202
  - test/dummy/config/environments/production.rb
202
203
  - test/dummy/config/secrets.yml
204
+ - test/dummy/db/test.sqlite3
203
205
  - test/dummy/db/schema.rb
204
206
  - test/dummy/db/development.sqlite3
205
207
  - test/dummy/Rakefile