masked-identifier 0.0.4 → 0.0.5

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.
@@ -35,7 +35,8 @@ module MaskedIdentifier
35
35
  def has_masked_identifier(options = {})
36
36
  options[:property] ||= 'masked_identifier'
37
37
  self._masked_identifier_options = options
38
- before_save :add_masked_identifier, on: :create
38
+ before_create :add_masked_identifier
39
+ # before_save :add_masked_identifier, on: :create
39
40
  send :include, InstanceMethods
40
41
  end
41
42
  end
@@ -141,3 +141,13 @@ Migrating to CreateUsers (20110731204706)
141
141
   (3.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
142
142
   (0.1ms) SELECT version FROM "schema_migrations"
143
143
   (3.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20110731204706')
144
+  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
145
+  (0.2ms) select sqlite_version(*)
146
+  (2.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "masked_identifier" varchar(255), "mid" varchar(255), "created_at" datetime, "updated_at" datetime) 
147
+  (0.2ms) PRAGMA index_list("users")
148
+  (2.4ms) CREATE INDEX "index_users_on_masked_identifier" ON "users" ("masked_identifier")
149
+  (2.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
150
+  (0.1ms) PRAGMA index_list("schema_migrations")
151
+  (3.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
152
+  (0.1ms) SELECT version FROM "schema_migrations"
153
+  (2.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20110731204706')
@@ -403,3 +403,47 @@
403
403
   (0.1ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'aacdaadacb' LIMIT 1
404
404
  SQL (0.6ms) INSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?) [["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
405
   (0.1ms) RELEASE SAVEPOINT active_record_1
406
+  (0.0ms) SAVEPOINT active_record_1
407
+  (0.2ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'AdwfxcimRN' LIMIT 1
408
+ SQL (38.3ms) INSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 25 Aug 2011 03:03:42 UTC +00:00], ["masked_identifier", "AdwfxcimRN"], ["mid", nil], ["updated_at", Thu, 25 Aug 2011 03:03:42 UTC +00:00]]
409
+  (0.1ms) RELEASE SAVEPOINT active_record_1
410
+  (0.0ms) SAVEPOINT active_record_1
411
+  (0.1ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'dcdKdG' LIMIT 1
412
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 25 Aug 2011 03:03:42 UTC +00:00], ["masked_identifier", "dcdKdG"], ["mid", nil], ["updated_at", Thu, 25 Aug 2011 03:03:42 UTC +00:00]]
413
+  (0.1ms) RELEASE SAVEPOINT active_record_1
414
+  (0.0ms) SAVEPOINT active_record_1
415
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
416
+  (0.0ms) SAVEPOINT active_record_1
417
+  (0.2ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
418
+ SQL (0.7ms) INSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 25 Aug 2011 03:03:42 UTC +00:00], ["masked_identifier", "a"], ["mid", nil], ["updated_at", Thu, 25 Aug 2011 03:03:42 UTC +00:00]]
419
+  (0.1ms) RELEASE SAVEPOINT active_record_1
420
+  (0.0ms) SAVEPOINT active_record_1
421
+  (0.1ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
422
+  (0.1ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
423
+  (0.0ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
424
+  (0.0ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
425
+  (0.0ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
426
+  (0.0ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
427
+  (0.0ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
428
+  (0.0ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
429
+  (0.0ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
430
+  (0.1ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
431
+  (0.1ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
432
+  (0.0ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
433
+  (0.0ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
434
+  (0.1ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
435
+  (0.0ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
436
+  (0.1ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
437
+  (0.1ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
438
+  (0.0ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
439
+  (0.1ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
440
+  (0.1ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'a' LIMIT 1
441
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
442
+  (0.0ms) SAVEPOINT active_record_1
443
+  (0.1ms) SELECT 1 FROM "users" WHERE "users"."mid" = 'YO1zOG7QZw' LIMIT 1
444
+ SQL (0.7ms) INSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 25 Aug 2011 03:03:42 UTC +00:00], ["masked_identifier", nil], ["mid", "YO1zOG7QZw"], ["updated_at", Thu, 25 Aug 2011 03:03:42 UTC +00:00]]
445
+  (0.1ms) RELEASE SAVEPOINT active_record_1
446
+  (0.0ms) SAVEPOINT active_record_1
447
+  (0.1ms) SELECT 1 FROM "users" WHERE "users"."masked_identifier" = 'adcbbcaada' LIMIT 1
448
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "masked_identifier", "mid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 25 Aug 2011 03:03:42 UTC +00:00], ["masked_identifier", "adcbbcaada"], ["mid", nil], ["updated_at", Thu, 25 Aug 2011 03:03:42 UTC +00:00]]
449
+  (0.1ms) RELEASE SAVEPOINT active_record_1
metadata CHANGED
@@ -1,28 +1,24 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: masked-identifier
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.5
4
5
  prerelease:
5
- version: 0.0.4
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Matt Hodan
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-08-01 00:00:00 Z
12
+ date: 2011-08-25 00:00:00.000000000Z
14
13
  dependencies: []
15
-
16
- description: Automatically adds a masked identifier to an ActiveRecord object on create. View the project GitHub page for more info.
17
- email:
14
+ description: Automatically adds a masked identifier to an ActiveRecord object on create. View
15
+ the project GitHub page for more info.
16
+ email:
18
17
  - matthew.c.hodan@gmail.com
19
18
  executables: []
20
-
21
19
  extensions: []
22
-
23
20
  extra_rdoc_files: []
24
-
25
- files:
21
+ files:
26
22
  - lib/code-generator.rb
27
23
  - lib/masked-identifier.rb
28
24
  - lib/tasks/masked-identifier_tasks.rake
@@ -70,32 +66,30 @@ files:
70
66
  - test/test_helper.rb
71
67
  homepage: http://github.com/matthodan/masked-identifier
72
68
  licenses: []
73
-
74
69
  post_install_message:
75
70
  rdoc_options: []
76
-
77
- require_paths:
71
+ require_paths:
78
72
  - lib
79
- required_ruby_version: !ruby/object:Gem::Requirement
73
+ required_ruby_version: !ruby/object:Gem::Requirement
80
74
  none: false
81
- requirements:
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- version: "0"
85
- required_rubygems_version: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
80
  none: false
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- version: "0"
81
+ requirements:
82
+ - - ! '>='
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
91
85
  requirements: []
92
-
93
86
  rubyforge_project:
94
87
  rubygems_version: 1.8.6
95
88
  signing_key:
96
89
  specification_version: 3
97
- summary: Use a masked identifier as a non-incrementing reference to an ActiveRecord object
98
- test_files:
90
+ summary: Use a masked identifier as a non-incrementing reference to an ActiveRecord
91
+ object
92
+ test_files:
99
93
  - test/dummy/app/assets/javascripts/application.js
100
94
  - test/dummy/app/assets/stylesheets/application.css
101
95
  - test/dummy/app/controllers/application_controller.rb