masked-identifier 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +1 -1
- data/README.markdown +20 -6
- data/lib/code-generator.rb +28 -26
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/seeds.rb +0 -0
- data/test/dummy/log/development.log +77 -0
- data/test/dummy/log/test.log +176 -0
- data/test/masked-identifier_test.rb +1 -1
- metadata +6 -17
data/MIT-LICENSE
CHANGED
data/README.markdown
CHANGED
@@ -2,6 +2,20 @@
|
|
2
2
|
|
3
3
|
Masked Identifier makes it easy to add a non-incrementing identifier to any ActiveRecord object.
|
4
4
|
|
5
|
+
Instead of
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
http://localhost:3000/users/1
|
9
|
+
user = User.find(1)
|
10
|
+
```
|
11
|
+
|
12
|
+
with Masked Identifier you can
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
http://localhost:3000/users/2xfYgm1pQ8
|
16
|
+
user = User.find_by_masked_identifier('2xfYgm1pQ8')
|
17
|
+
```
|
18
|
+
|
5
19
|
## Installation
|
6
20
|
|
7
21
|
Add ```gem 'masked-identifier'``` to your Rails project Gemfile.
|
@@ -11,7 +25,7 @@
|
|
11
25
|
## Usage
|
12
26
|
|
13
27
|
Add a column named 'masked_identifier' to the table of the ActiveRecord object that you want to
|
14
|
-
be able to
|
28
|
+
be able to find using a masked identifier. Also, don't forget to add an index for this new
|
15
29
|
column
|
16
30
|
|
17
31
|
```ruby
|
@@ -40,7 +54,7 @@ user.masked_identifier
|
|
40
54
|
Lookup users based on the object's ```masked_identifier``` property
|
41
55
|
|
42
56
|
```ruby
|
43
|
-
user = User.find_by_masked_identifier(
|
57
|
+
user = User.find_by_masked_identifier('2xfYgm1pQ8')
|
44
58
|
user.name
|
45
59
|
=> "Matt"
|
46
60
|
```
|
@@ -59,7 +73,7 @@ end
|
|
59
73
|
## Options
|
60
74
|
|
61
75
|
Masked Identifier lets you edit a number of settings by including an options hash following
|
62
|
-
```has_masked_identifier
|
76
|
+
```has_masked_identifier```
|
63
77
|
|
64
78
|
```ruby
|
65
79
|
class User < ActiveRecord::Base
|
@@ -77,7 +91,7 @@ error._
|
|
77
91
|
* ```property``` - override the default ```masked_identifier``` property with a custom named
|
78
92
|
property. _Don't forget you'll need to use this custom name in your database migration too_
|
79
93
|
|
80
|
-
* ```charset``` - override the
|
94
|
+
* ```charset``` - override the default character set used when generating masked identifiers
|
81
95
|
(default character set includes a-z, A-Z, and 0-9). _Note: As the size of the character set is
|
82
96
|
increased, the number of possible unique masked identifiers also increases_
|
83
97
|
|
@@ -87,13 +101,13 @@ error._
|
|
87
101
|
|
88
102
|
## Exceptions
|
89
103
|
|
90
|
-
Make sure you handle the following possible exceptions in your
|
104
|
+
Make sure you handle the following possible exceptions in your application:
|
91
105
|
|
92
106
|
* ```[YourActiveRecordObject]::InvalidProperty``` - if object does not have a
|
93
107
|
```masked_identifier``` property (or the custom property passed to the ```property``` option
|
94
108
|
does not exist)
|
95
109
|
|
96
|
-
* ```CodeGenerator::TooManyFailedAttempts``` - if unable to find a unique code to
|
110
|
+
* ```CodeGenerator::TooManyFailedAttempts``` - if unable to find a unique code to use as a masked
|
97
111
|
identifier
|
98
112
|
|
99
113
|
* ```CodeGenerator::InvalidAttemptsValue``` - if the value provided to the ```attempts``` option
|
data/lib/code-generator.rb
CHANGED
@@ -18,34 +18,36 @@
|
|
18
18
|
# CodeGenerator::InvalidCodeLength if value provided is not an Integer or < 1
|
19
19
|
# CodeGenerator::InvalidCharset if value provided is not an Array with size >= 1
|
20
20
|
#
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
module MaskedIdentifier
|
22
|
+
class CodeGenerator
|
23
|
+
def self.unique_code(klass, property, options = {})
|
24
|
+
attempts = options[:attempts] || 20
|
25
|
+
raise InvalidAttemptsValue, 'Attempts value must be an integer >= 1' if !attempts.is_a?(Integer) || attempts <= 0
|
25
26
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
27
|
+
begin
|
28
|
+
i ||= 0; i += 1
|
29
|
+
raise TooManyFailedAttempts, 'Failed to find a unique code' if i > attempts
|
30
|
+
code = self.random_code length: options[:length], charset: options[:charset]
|
31
|
+
end until self.code_is_unique? klass, property, code
|
32
|
+
return code
|
33
|
+
end
|
33
34
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
private
|
36
|
+
def self.code_is_unique?(klass, property, code)
|
37
|
+
true if !klass.class.exists? property => code
|
38
|
+
end
|
38
39
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
40
|
+
def self.random_code(options = {})
|
41
|
+
length = options[:length] || 10
|
42
|
+
raise InvalidCodeLength, 'Code length must be an integer >= 1' if !length.is_a?(Integer) || length <= 0
|
43
|
+
charset = options[:charset] || %w{ 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H J K L M N O P Q R T U V W X Y Z }
|
44
|
+
raise InvalidCharset, 'Charset must be an array with 1 or more values' if !charset.is_a?(Array) || charset.length < 1
|
45
|
+
(0...length).map { charset.to_a[rand(charset.size)] }.join
|
46
|
+
end
|
46
47
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
48
|
+
class TooManyFailedAttempts < StandardError; end
|
49
|
+
class InvalidAttemptsValue < ArgumentError; end
|
50
|
+
class InvalidCodeLength < ArgumentError; end
|
51
|
+
class InvalidCharset < ArgumentError; end
|
52
|
+
end
|
51
53
|
end
|
Binary file
|
File without changes
|
@@ -64,3 +64,80 @@ Migrating to CreateUsers (20110731204706)
|
|
64
64
|
[1m[35m (3.4ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
65
65
|
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
66
66
|
[1m[35m (2.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20110731204706')
|
67
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
68
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
69
|
+
[1m[36m (3.6ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "masked_identifier" varchar(255), "mid" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
70
|
+
[1m[35m (0.1ms)[0m PRAGMA index_list("users")
|
71
|
+
[1m[36m (2.5ms)[0m [1mCREATE INDEX "index_users_on_masked_identifier" ON "users" ("masked_identifier")[0m
|
72
|
+
[1m[35m (2.6ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
73
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
74
|
+
[1m[35m (2.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
75
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
76
|
+
[1m[35m (2.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20110731204706')
|
77
|
+
[1m[36m (0.3ms)[0m [1mselect sqlite_version(*)[0m
|
78
|
+
[1m[35m (42.4ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "masked_identifier" varchar(255), "mid" varchar(255), "created_at" datetime, "updated_at" datetime)
|
79
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("users")[0m
|
80
|
+
[1m[35m (2.2ms)[0m CREATE INDEX "index_users_on_masked_identifier" ON "users" ("masked_identifier")
|
81
|
+
[1m[36m (2.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
82
|
+
[1m[35m (0.1ms)[0m PRAGMA index_list("schema_migrations")
|
83
|
+
[1m[36m (2.9ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
84
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
85
|
+
[1m[36m (2.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20110731204706')[0m
|
86
|
+
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
87
|
+
[1m[36m (0.4ms)[0m [1mselect sqlite_version(*)[0m
|
88
|
+
[1m[35m (300.8ms)[0m DROP TABLE "users"
|
89
|
+
[1m[36m (2.7ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "masked_identifier" varchar(255), "mid" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
90
|
+
[1m[35m (0.1ms)[0m PRAGMA index_list("users")
|
91
|
+
[1m[36m (2.4ms)[0m [1mCREATE INDEX "index_users_on_masked_identifier" ON "users" ("masked_identifier")[0m
|
92
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
93
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
94
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
95
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
96
|
+
[1m[36m (47.7ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "masked_identifier" varchar(255), "mid" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
97
|
+
[1m[35m (0.1ms)[0m PRAGMA index_list("users")
|
98
|
+
[1m[36m (2.1ms)[0m [1mCREATE INDEX "index_users_on_masked_identifier" ON "users" ("masked_identifier")[0m
|
99
|
+
[1m[35m (2.7ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
100
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
101
|
+
[1m[35m (3.3ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
102
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
103
|
+
[1m[35m (2.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20110731204706')
|
104
|
+
[1m[36m (0.3ms)[0m [1mselect sqlite_version(*)[0m
|
105
|
+
[1m[35m (39.8ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "masked_identifier" varchar(255), "mid" varchar(255), "created_at" datetime, "updated_at" datetime)
|
106
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("users")[0m
|
107
|
+
[1m[35m (2.2ms)[0m CREATE INDEX "index_users_on_masked_identifier" ON "users" ("masked_identifier")
|
108
|
+
[1m[36m (2.7ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
109
|
+
[1m[35m (0.1ms)[0m PRAGMA index_list("schema_migrations")
|
110
|
+
[1m[36m (2.9ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
111
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
112
|
+
[1m[36m (2.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20110731204706')[0m
|
113
|
+
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
114
|
+
[1m[36m (0.3ms)[0m [1mselect sqlite_version(*)[0m
|
115
|
+
[1m[35m (51.7ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "masked_identifier" varchar(255), "mid" varchar(255), "created_at" datetime, "updated_at" datetime)
|
116
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("users")[0m
|
117
|
+
[1m[35m (2.5ms)[0m CREATE INDEX "index_users_on_masked_identifier" ON "users" ("masked_identifier")
|
118
|
+
[1m[36m (2.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
119
|
+
[1m[35m (0.1ms)[0m PRAGMA index_list("schema_migrations")
|
120
|
+
[1m[36m (3.0ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
121
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
122
|
+
[1m[36m (2.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20110731204706')[0m
|
123
|
+
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
124
|
+
[1m[36m (0.3ms)[0m [1mselect sqlite_version(*)[0m
|
125
|
+
[1m[35m (32.6ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "masked_identifier" varchar(255), "mid" varchar(255), "created_at" datetime, "updated_at" datetime)
|
126
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("users")[0m
|
127
|
+
[1m[35m (2.1ms)[0m CREATE INDEX "index_users_on_masked_identifier" ON "users" ("masked_identifier")
|
128
|
+
[1m[36m (2.5ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
129
|
+
[1m[35m (0.1ms)[0m PRAGMA index_list("schema_migrations")
|
130
|
+
[1m[36m (2.8ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
131
|
+
[1m[35m (0.4ms)[0m SELECT version FROM "schema_migrations"
|
132
|
+
[1m[36m (2.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20110731204706')[0m
|
133
|
+
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
134
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
135
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
136
|
+
[1m[36m (319.2ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "masked_identifier" varchar(255), "mid" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
137
|
+
[1m[35m (0.1ms)[0m PRAGMA index_list("users")
|
138
|
+
[1m[36m (2.6ms)[0m [1mCREATE INDEX "index_users_on_masked_identifier" ON "users" ("masked_identifier")[0m
|
139
|
+
[1m[35m (3.1ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
140
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
141
|
+
[1m[35m (3.2ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
142
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
143
|
+
[1m[35m (3.0ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20110731204706')
|
data/test/dummy/log/test.log
CHANGED
@@ -227,3 +227,179 @@
|
|
227
227
|
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'caddadbabd' LIMIT 1
|
228
228
|
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 00:04:56 UTC +00:00], ["masked_identifier", "caddadbabd"], ["mid", nil], ["updated_at", Mon, 01 Aug 2011 00:04:56 UTC +00:00]]
|
229
229
|
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
230
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
231
|
+
[1m[35mUser Load (0.8ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'adOBAdq7cs' LIMIT 1
|
232
|
+
[1m[36mSQL (44.4ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 05:00:49 UTC +00:00], ["masked_identifier", "adOBAdq7cs"], ["mid", nil], ["updated_at", Mon, 01 Aug 2011 05:00:49 UTC +00:00]]
|
233
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
234
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
235
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'QNwK7K' LIMIT 1
|
236
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 05:00:49 UTC +00:00], ["masked_identifier", "QNwK7K"], ["mid", nil], ["updated_at", Mon, 01 Aug 2011 05:00:49 UTC +00:00]]
|
237
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
238
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
239
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
240
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
241
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
242
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 05:00:49 UTC +00:00], ["masked_identifier", "a"], ["mid", nil], ["updated_at", Mon, 01 Aug 2011 05:00:49 UTC +00:00]]
|
243
|
+
[1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
|
244
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
245
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."mid" = '2yg1vh10Hn' LIMIT 1
|
246
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 05:00:49 UTC +00:00], ["masked_identifier", nil], ["mid", "2yg1vh10Hn"], ["updated_at", Mon, 01 Aug 2011 05:00:49 UTC +00:00]]
|
247
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
248
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
249
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'bacbcaddba' LIMIT 1
|
250
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 05:00:49 UTC +00:00], ["masked_identifier", "bacbcaddba"], ["mid", nil], ["updated_at", Mon, 01 Aug 2011 05:00:49 UTC +00:00]]
|
251
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
252
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
253
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'DBWHFaj1Zr' LIMIT 1
|
254
|
+
[1m[36mSQL (13.7ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 05:01:26 UTC +00:00], ["masked_identifier", "DBWHFaj1Zr"], ["mid", nil], ["updated_at", Mon, 01 Aug 2011 05:01:26 UTC +00:00]]
|
255
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
256
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
257
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'rC6Fdp' LIMIT 1
|
258
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 05:01:26 UTC +00:00], ["masked_identifier", "rC6Fdp"], ["mid", nil], ["updated_at", Mon, 01 Aug 2011 05:01:26 UTC +00:00]]
|
259
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
260
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
261
|
+
[1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
262
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
263
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
264
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 05:01:26 UTC +00:00], ["masked_identifier", "a"], ["mid", nil], ["updated_at", Mon, 01 Aug 2011 05:01:26 UTC +00:00]]
|
265
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
266
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
267
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."mid" = 'dbzeZBVdWK' LIMIT 1
|
268
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 05:01:26 UTC +00:00], ["masked_identifier", nil], ["mid", "dbzeZBVdWK"], ["updated_at", Mon, 01 Aug 2011 05:01:26 UTC +00:00]]
|
269
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
270
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
271
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'ddbbabcbdd' LIMIT 1
|
272
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 05:01:26 UTC +00:00], ["masked_identifier", "ddbbabcbdd"], ["mid", nil], ["updated_at", Mon, 01 Aug 2011 05:01:26 UTC +00:00]]
|
273
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
274
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
275
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'FYzmv6nlvq' LIMIT 1
|
276
|
+
[1m[36mSQL (14.2ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 05:02:40 UTC +00:00], ["masked_identifier", "FYzmv6nlvq"], ["mid", nil], ["updated_at", Mon, 01 Aug 2011 05:02:40 UTC +00:00]]
|
277
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
278
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
279
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'zUumxc' LIMIT 1
|
280
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 05:02:40 UTC +00:00], ["masked_identifier", "zUumxc"], ["mid", nil], ["updated_at", Mon, 01 Aug 2011 05:02:40 UTC +00:00]]
|
281
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
282
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
283
|
+
[1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
284
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
285
|
+
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
286
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 05:02:40 UTC +00:00], ["masked_identifier", "a"], ["mid", nil], ["updated_at", Mon, 01 Aug 2011 05:02:40 UTC +00:00]]
|
287
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
288
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
289
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
290
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
291
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
292
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
293
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
294
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
295
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
296
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
297
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
298
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
299
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
300
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
301
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
302
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
303
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
304
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
305
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
306
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
307
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
308
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
309
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
310
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
311
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."mid" = 'nKABMM0Ntd' LIMIT 1
|
312
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 05:02:40 UTC +00:00], ["masked_identifier", nil], ["mid", "nKABMM0Ntd"], ["updated_at", Mon, 01 Aug 2011 05:02:40 UTC +00:00]]
|
313
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
314
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
315
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."masked_identifier" = 'ccbaddccdd' LIMIT 1
|
316
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 05:02:40 UTC +00:00], ["masked_identifier", "ccbaddccdd"], ["mid", nil], ["updated_at", Mon, 01 Aug 2011 05:02:40 UTC +00:00]]
|
317
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
318
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
319
|
+
[1m[35m (0.6ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'lgf6z4cJUE' LIMIT 1
|
320
|
+
[1m[36mSQL (14.2ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 06:46:21 UTC +00:00], ["masked_identifier", "lgf6z4cJUE"], ["mid", nil], ["updated_at", Mon, 01 Aug 2011 06:46:21 UTC +00:00]]
|
321
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
322
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
323
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'uEieFy' LIMIT 1
|
324
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 06:46:21 UTC +00:00], ["masked_identifier", "uEieFy"], ["mid", nil], ["updated_at", Mon, 01 Aug 2011 06:46:21 UTC +00:00]]
|
325
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
326
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
327
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
328
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
329
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
330
|
+
[1m[36mSQL (3.0ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 06:46:21 UTC +00:00], ["masked_identifier", "a"], ["mid", nil], ["updated_at", Mon, 01 Aug 2011 06:46:21 UTC +00:00]]
|
331
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
332
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
333
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
334
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
335
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
336
|
+
[1m[36m (0.2ms)[0m [1mSELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
337
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
338
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
339
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
340
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
341
|
+
[1m[35m (0.0ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
342
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
343
|
+
[1m[35m (0.0ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
344
|
+
[1m[36m (0.0ms)[0m [1mSELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
345
|
+
[1m[35m (0.0ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
346
|
+
[1m[36m (0.0ms)[0m [1mSELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
347
|
+
[1m[35m (0.0ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
348
|
+
[1m[36m (0.0ms)[0m [1mSELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
349
|
+
[1m[35m (0.0ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
350
|
+
[1m[36m (0.0ms)[0m [1mSELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
351
|
+
[1m[35m (0.0ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
352
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
353
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
354
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
355
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "users" WHERE "users"."mid" = 'emCkYiHolo' LIMIT 1
|
356
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 06:46:21 UTC +00:00], ["masked_identifier", nil], ["mid", "emCkYiHolo"], ["updated_at", Mon, 01 Aug 2011 06:46:21 UTC +00:00]]
|
357
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
358
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
359
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'cabcdacbdd' LIMIT 1
|
360
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 06:46:21 UTC +00:00], ["masked_identifier", "cabcdacbdd"], ["mid", nil], ["updated_at", Mon, 01 Aug 2011 06:46:21 UTC +00:00]]
|
361
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
362
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
363
|
+
[1m[35m (0.2ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'GoO6aFQRqf' LIMIT 1
|
364
|
+
[1m[36mSQL (13.8ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 07:11:12 UTC +00:00], ["masked_identifier", "GoO6aFQRqf"], ["mid", nil], ["updated_at", Mon, 01 Aug 2011 07:11:12 UTC +00:00]]
|
365
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
366
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
367
|
+
[1m[35m (0.2ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'Qi2VDW' LIMIT 1
|
368
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 07:11:12 UTC +00:00], ["masked_identifier", "Qi2VDW"], ["mid", nil], ["updated_at", Mon, 01 Aug 2011 07:11:12 UTC +00:00]]
|
369
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
370
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
371
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
372
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
373
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
374
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 07:11:12 UTC +00:00], ["masked_identifier", "a"], ["mid", nil], ["updated_at", Mon, 01 Aug 2011 07:11:12 UTC +00:00]]
|
375
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
376
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
377
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
378
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
379
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
380
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
381
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
382
|
+
[1m[36m (0.0ms)[0m [1mSELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
383
|
+
[1m[35m (0.0ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
384
|
+
[1m[36m (0.0ms)[0m [1mSELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
385
|
+
[1m[35m (0.0ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
386
|
+
[1m[36m (0.0ms)[0m [1mSELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
387
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
388
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
389
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
390
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
391
|
+
[1m[35m (0.0ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
392
|
+
[1m[36m (0.0ms)[0m [1mSELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
393
|
+
[1m[35m (0.0ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
394
|
+
[1m[36m (0.0ms)[0m [1mSELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
395
|
+
[1m[35m (0.0ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
|
396
|
+
[1m[36m (0.0ms)[0m [1mSELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1[0m
|
397
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
398
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
399
|
+
[1m[35m (0.2ms)[0m SELECT 1 FROM "users" WHERE "users"."mid" = 'UhvWgt6iJu' LIMIT 1
|
400
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 07:11:12 UTC +00:00], ["masked_identifier", nil], ["mid", "UhvWgt6iJu"], ["updated_at", Mon, 01 Aug 2011 07:11:12 UTC +00:00]]
|
401
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
402
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
403
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'aacdaadacb' LIMIT 1
|
404
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Mon, 01 Aug 2011 07:11:12 UTC +00:00], ["masked_identifier", "aacdaadacb"], ["mid", nil], ["updated_at", Mon, 01 Aug 2011 07:11:12 UTC +00:00]]
|
405
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
@@ -39,7 +39,7 @@ class MaskedIdentifierTest < ActiveSupport::TestCase
|
|
39
39
|
charset = %w{ a }
|
40
40
|
User.has_masked_identifier charset: charset, length: 1
|
41
41
|
User.create!
|
42
|
-
assert_raise CodeGenerator::TooManyFailedAttempts do
|
42
|
+
assert_raise MaskedIdentifier::CodeGenerator::TooManyFailedAttempts do
|
43
43
|
User.create!
|
44
44
|
end
|
45
45
|
end
|
metadata
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: masked-identifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 3
|
10
|
-
version: 0.0.3
|
4
|
+
prerelease:
|
5
|
+
version: 0.0.4
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
8
|
- Matt Hodan
|
@@ -15,8 +10,7 @@ autorequire:
|
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
12
|
|
18
|
-
date: 2011-
|
19
|
-
default_executable:
|
13
|
+
date: 2011-08-01 00:00:00 Z
|
20
14
|
dependencies: []
|
21
15
|
|
22
16
|
description: Automatically adds a masked identifier to an ActiveRecord object on create. View the project GitHub page for more info.
|
@@ -60,6 +54,7 @@ files:
|
|
60
54
|
- test/dummy/db/development.sqlite3
|
61
55
|
- test/dummy/db/migrate/20110731204706_create_users.rb
|
62
56
|
- test/dummy/db/schema.rb
|
57
|
+
- test/dummy/db/seeds.rb
|
63
58
|
- test/dummy/db/test.sqlite3
|
64
59
|
- test/dummy/log/development.log
|
65
60
|
- test/dummy/log/test.log
|
@@ -73,7 +68,6 @@ files:
|
|
73
68
|
- test/dummy/test/unit/user_test.rb
|
74
69
|
- test/masked-identifier_test.rb
|
75
70
|
- test/test_helper.rb
|
76
|
-
has_rdoc: true
|
77
71
|
homepage: http://github.com/matthodan/masked-identifier
|
78
72
|
licenses: []
|
79
73
|
|
@@ -87,23 +81,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
87
81
|
requirements:
|
88
82
|
- - ">="
|
89
83
|
- !ruby/object:Gem::Version
|
90
|
-
hash: 3
|
91
|
-
segments:
|
92
|
-
- 0
|
93
84
|
version: "0"
|
94
85
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
86
|
none: false
|
96
87
|
requirements:
|
97
88
|
- - ">="
|
98
89
|
- !ruby/object:Gem::Version
|
99
|
-
hash: 3
|
100
|
-
segments:
|
101
|
-
- 0
|
102
90
|
version: "0"
|
103
91
|
requirements: []
|
104
92
|
|
105
93
|
rubyforge_project:
|
106
|
-
rubygems_version: 1.
|
94
|
+
rubygems_version: 1.8.6
|
107
95
|
signing_key:
|
108
96
|
specification_version: 3
|
109
97
|
summary: Use a masked identifier as a non-incrementing reference to an ActiveRecord object
|
@@ -133,6 +121,7 @@ test_files:
|
|
133
121
|
- test/dummy/db/development.sqlite3
|
134
122
|
- test/dummy/db/migrate/20110731204706_create_users.rb
|
135
123
|
- test/dummy/db/schema.rb
|
124
|
+
- test/dummy/db/seeds.rb
|
136
125
|
- test/dummy/db/test.sqlite3
|
137
126
|
- test/dummy/log/development.log
|
138
127
|
- test/dummy/log/test.log
|