rails_attr_enum 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 3bb8000f3dc7b7ea0f1cf0c782cb0e7b1494070d
4
- data.tar.gz: 840eb22350179ec480a12db0964c937067963632
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NTgzOWNhOTk5YmVmYzU1NGNhMzc0OTUyNDhhZGMwODU0ODhmMjdlZg==
5
+ data.tar.gz: !binary |-
6
+ MGI3ZmI5M2ZkZjRhMTc4MzE5ZTdiZmNmZGQ5OTAwYTFhOTBjODg5NA==
5
7
  SHA512:
6
- metadata.gz: 260ffdeda4eb00489b5701444c3a21e88b1fe962f69b5cf0d3c220797ec2c6f5221835c1cc1cf6625119addd3c98ccd0ffab82a53d52d9f779886b2dba35f743
7
- data.tar.gz: 6b19aabcad242e31ed1960e140d34b16d6d312c4ac64628abb7b3df7d8e59d59b6a3d5354e69b14f2ba193246784734e084045428265219733c7f6fc4e7b6be7
8
+ metadata.gz: !binary |-
9
+ ZTM3MjIxZDY5NzgxNzc0ODI5Y2FkNDhiNDY1NzVmNmQ2N2YwNDdhODg2MDA0
10
+ MjU4NGRkMjM0NmUyMDQxNjJhZTIyZmY4Y2I1ZTg2M2Y0NWEyMzM0YjE4OGM5
11
+ NGE1MjhhOTViNjA1ZGM1NTNiZTNhN2Y0NTBkYzkzZjc5YmUxYWY=
12
+ data.tar.gz: !binary |-
13
+ N2FhZDdkOTRjOGNhMjdmOTdmMmU1ODM2NzU0NGRlMDIxNjQ2OGJkOTBkYjFh
14
+ ZWM5MzQ5MTRiNTk4NzAxNDk4MTJjYjNkMTk3MTE4OWI3MWM4ZTVkYWM1NjQz
15
+ ZDZlZWI4YmY2NTU1MjVmYTUzNTQ5NDZjN2M3YzkwZTFmZTcxMTk=
@@ -1,3 +1,8 @@
1
+ ### v0.2.0
2
+ * No longer raise an error when `attr_enum` is called on an attribute
3
+ that does not exist. Instead, a warning is sent via `puts` and the
4
+ enum is not set up.
5
+
1
6
  ### v0.1.1
2
7
  * Added support for filtering results from `Enum.label_value_pairs` by
3
8
  passinging in enum value keys as symbol arguments.
@@ -33,7 +33,8 @@ module RailsAttrEnum
33
33
  @_attr_enums ||= {}
34
34
 
35
35
  if table_exists? && !column_names.include?(attr.name)
36
- raise "Invalid attribute name #{attr.name}"
36
+ puts "Warning: Cannot create enum for '#{attr.name}' because that attribute does not exist for '#{self.name}'"
37
+ return
37
38
  end
38
39
 
39
40
  if @_attr_enums.any? { |(_, enm)| enm.attr_name == attr.name }
@@ -1,3 +1,3 @@
1
1
  module RailsAttrEnum
2
- VERSION = '0.1.1'
2
+ VERSION = '0.2.0'
3
3
  end
File without changes
File without changes
File without changes
Binary file
@@ -130,3 +130,6 @@ DEPRECATION WARNING: Model.scoped is deprecated. Please use Model.all instead. (
130
130
   (0.2ms) SELECT version FROM "schema_migrations"
131
131
   (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20131023212242')
132
132
  ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
133
+  (0.0ms) SELECT COUNT(*) FROM "users"
134
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
135
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
@@ -13352,3 +13352,494 @@ Migrating to CreateUsers (20131023212242)
13352
13352
   (0.1ms) ROLLBACK TO SAVEPOINT active_record_2
13353
13353
   (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13354
13354
   (0.0ms) rollback transaction
13355
+  (12.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "role" integer, "created_at" datetime, "updated_at" datetime) 
13356
+  (4.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
13357
+  (4.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
13358
+  (0.0ms) SELECT version FROM "schema_migrations"
13359
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20131023212242')
13360
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
13361
+  (8.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "role" integer, "created_at" datetime, "updated_at" datetime) 
13362
+  (4.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
13363
+  (4.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
13364
+  (0.0ms) SELECT version FROM "schema_migrations"
13365
+  (0.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20131023212242')
13366
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
13367
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
13368
+  (4.0ms) DELETE FROM "users";
13369
+  (0.0ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
13370
+  (0.0ms) DELETE FROM sqlite_sequence where name = 'users';
13371
+  (0.0ms) begin transaction
13372
+  (0.0ms) SAVEPOINT active_record_1
13373
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13374
+  (0.0ms) SAVEPOINT active_record_1
13375
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13376
+  (0.0ms) rollback transaction
13377
+  (0.0ms) begin transaction
13378
+  (0.0ms) SAVEPOINT active_record_1
13379
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13380
+  (0.0ms) SAVEPOINT active_record_1
13381
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13382
+  (0.0ms) rollback transaction
13383
+  (0.0ms) begin transaction
13384
+  (0.0ms) SAVEPOINT active_record_1
13385
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13386
+  (0.0ms) SAVEPOINT active_record_1
13387
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13388
+  (0.0ms) rollback transaction
13389
+  (4.0ms) begin transaction
13390
+  (0.0ms) SAVEPOINT active_record_1
13391
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13392
+  (0.0ms) SAVEPOINT active_record_1
13393
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13394
+  (0.0ms) rollback transaction
13395
+  (0.0ms) begin transaction
13396
+  (0.0ms) SAVEPOINT active_record_1
13397
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13398
+  (0.0ms) SAVEPOINT active_record_1
13399
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13400
+  (0.0ms) rollback transaction
13401
+  (0.0ms) begin transaction
13402
+  (0.0ms) SAVEPOINT active_record_1
13403
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13404
+  (0.0ms) SAVEPOINT active_record_1
13405
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13406
+  (0.0ms) rollback transaction
13407
+ ActiveRecord::SchemaMigration Load (4.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
13408
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
13409
+  (20.0ms) DELETE FROM "users";
13410
+  (0.0ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
13411
+  (0.0ms) DELETE FROM sqlite_sequence where name = 'users';
13412
+  (0.0ms) begin transaction
13413
+  (0.0ms) SAVEPOINT active_record_1
13414
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13415
+  (0.0ms) SAVEPOINT active_record_1
13416
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13417
+  (0.0ms) rollback transaction
13418
+  (0.0ms) begin transaction
13419
+  (0.0ms) SAVEPOINT active_record_1
13420
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13421
+  (0.0ms) SAVEPOINT active_record_1
13422
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13423
+  (0.0ms) rollback transaction
13424
+  (0.0ms) begin transaction
13425
+  (0.0ms) SAVEPOINT active_record_1
13426
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13427
+  (0.0ms) SAVEPOINT active_record_1
13428
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13429
+  (0.0ms) rollback transaction
13430
+  (0.0ms) begin transaction
13431
+  (0.0ms) SAVEPOINT active_record_1
13432
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13433
+  (0.0ms) SAVEPOINT active_record_1
13434
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13435
+  (0.0ms) rollback transaction
13436
+  (0.0ms) begin transaction
13437
+  (0.0ms) SAVEPOINT active_record_1
13438
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13439
+  (0.0ms) SAVEPOINT active_record_1
13440
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13441
+  (0.0ms) rollback transaction
13442
+  (0.0ms) begin transaction
13443
+  (0.0ms) SAVEPOINT active_record_1
13444
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13445
+  (0.0ms) SAVEPOINT active_record_1
13446
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13447
+  (0.0ms) rollback transaction
13448
+  (0.0ms) begin transaction
13449
+  (0.0ms) SAVEPOINT active_record_1
13450
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13451
+  (0.0ms) SAVEPOINT active_record_1
13452
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13453
+  (0.0ms) rollback transaction
13454
+  (0.0ms) begin transaction
13455
+  (0.0ms) SAVEPOINT active_record_1
13456
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13457
+  (0.0ms) SAVEPOINT active_record_1
13458
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13459
+  (0.0ms) rollback transaction
13460
+  (0.0ms) begin transaction
13461
+  (0.0ms) SAVEPOINT active_record_1
13462
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13463
+  (0.0ms) SAVEPOINT active_record_1
13464
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13465
+  (0.0ms) rollback transaction
13466
+  (0.0ms) begin transaction
13467
+  (0.0ms) SAVEPOINT active_record_1
13468
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13469
+  (0.0ms) SAVEPOINT active_record_1
13470
+  (4.0ms) ROLLBACK TO SAVEPOINT active_record_1
13471
+  (0.0ms) rollback transaction
13472
+  (0.0ms) begin transaction
13473
+  (0.0ms) SAVEPOINT active_record_1
13474
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13475
+  (0.0ms) SAVEPOINT active_record_1
13476
+  (4.0ms) ROLLBACK TO SAVEPOINT active_record_1
13477
+  (0.0ms) rollback transaction
13478
+  (0.0ms) begin transaction
13479
+  (0.0ms) SAVEPOINT active_record_1
13480
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13481
+  (0.0ms) SAVEPOINT active_record_1
13482
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13483
+  (0.0ms) rollback transaction
13484
+  (0.0ms) begin transaction
13485
+  (0.0ms) SAVEPOINT active_record_1
13486
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13487
+  (0.0ms) SAVEPOINT active_record_1
13488
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13489
+  (0.0ms) rollback transaction
13490
+  (0.0ms) begin transaction
13491
+  (0.0ms) SAVEPOINT active_record_1
13492
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13493
+  (0.0ms) SAVEPOINT active_record_1
13494
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13495
+  (0.0ms) rollback transaction
13496
+  (0.0ms) begin transaction
13497
+  (0.0ms) SAVEPOINT active_record_1
13498
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13499
+  (0.0ms) SAVEPOINT active_record_1
13500
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13501
+  (0.0ms) rollback transaction
13502
+  (0.0ms) begin transaction
13503
+  (0.0ms) SAVEPOINT active_record_1
13504
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13505
+  (0.0ms) SAVEPOINT active_record_1
13506
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13507
+  (0.0ms) rollback transaction
13508
+  (0.0ms) begin transaction
13509
+  (0.0ms) SAVEPOINT active_record_1
13510
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13511
+  (0.0ms) SAVEPOINT active_record_1
13512
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13513
+  (0.0ms) rollback transaction
13514
+  (0.0ms) begin transaction
13515
+  (0.0ms) SAVEPOINT active_record_1
13516
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13517
+  (0.0ms) SAVEPOINT active_record_1
13518
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13519
+  (0.0ms) rollback transaction
13520
+  (0.0ms) begin transaction
13521
+  (0.0ms) SAVEPOINT active_record_1
13522
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13523
+  (0.0ms) SAVEPOINT active_record_1
13524
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13525
+  (0.0ms) rollback transaction
13526
+  (0.0ms) begin transaction
13527
+  (0.0ms) SAVEPOINT active_record_1
13528
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13529
+  (0.0ms) SAVEPOINT active_record_1
13530
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13531
+  (0.0ms) rollback transaction
13532
+  (0.0ms) begin transaction
13533
+  (0.0ms) SAVEPOINT active_record_1
13534
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13535
+  (0.0ms) SAVEPOINT active_record_1
13536
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13537
+  (0.0ms) rollback transaction
13538
+  (0.0ms) begin transaction
13539
+  (0.0ms) SAVEPOINT active_record_1
13540
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13541
+  (0.0ms) SAVEPOINT active_record_1
13542
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13543
+  (0.0ms) rollback transaction
13544
+  (0.0ms) begin transaction
13545
+  (0.0ms) SAVEPOINT active_record_1
13546
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13547
+  (0.0ms) SAVEPOINT active_record_1
13548
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13549
+  (0.0ms) rollback transaction
13550
+  (0.0ms) begin transaction
13551
+  (0.0ms) SAVEPOINT active_record_1
13552
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13553
+  (0.0ms) SAVEPOINT active_record_1
13554
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13555
+  (0.0ms) rollback transaction
13556
+  (0.0ms) begin transaction
13557
+  (0.0ms) SAVEPOINT active_record_1
13558
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13559
+  (0.0ms) SAVEPOINT active_record_1
13560
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13561
+  (0.0ms) rollback transaction
13562
+  (0.0ms) begin transaction
13563
+  (0.0ms) SAVEPOINT active_record_1
13564
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13565
+  (0.0ms) SAVEPOINT active_record_1
13566
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13567
+  (0.0ms) rollback transaction
13568
+  (0.0ms) begin transaction
13569
+  (0.0ms) SAVEPOINT active_record_1
13570
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13571
+  (0.0ms) SAVEPOINT active_record_1
13572
+ SQL (36.0ms) INSERT INTO "users" ("created_at", "role", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 21 Jan 2014 20:39:39 UTC +00:00], ["role", 1], ["updated_at", Tue, 21 Jan 2014 20:39:39 UTC +00:00]]
13573
+ SQL (0.0ms) INSERT INTO "users" ("created_at", "role", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 21 Jan 2014 20:39:39 UTC +00:00], ["role", 1], ["updated_at", Tue, 21 Jan 2014 20:39:39 UTC +00:00]]
13574
+  (4.0ms) ROLLBACK TO SAVEPOINT active_record_1
13575
+  (0.0ms) rollback transaction
13576
+  (0.0ms) begin transaction
13577
+  (0.0ms) SAVEPOINT active_record_1
13578
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13579
+  (0.0ms) SAVEPOINT active_record_1
13580
+ SQL (0.0ms) INSERT INTO "users" ("created_at", "role", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 21 Jan 2014 20:39:40 UTC +00:00], ["role", 1], ["updated_at", Tue, 21 Jan 2014 20:39:40 UTC +00:00]]
13581
+ SQL (0.0ms) INSERT INTO "users" ("created_at", "role", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 21 Jan 2014 20:39:40 UTC +00:00], ["role", 1], ["updated_at", Tue, 21 Jan 2014 20:39:40 UTC +00:00]]
13582
+  (0.0ms) SELECT COUNT(*) FROM "users" WHERE "users"."role" = 0
13583
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13584
+  (0.0ms) rollback transaction
13585
+  (0.0ms) begin transaction
13586
+  (0.0ms) SAVEPOINT active_record_1
13587
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13588
+  (0.0ms) SAVEPOINT active_record_1
13589
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13590
+  (0.0ms) rollback transaction
13591
+  (0.0ms) begin transaction
13592
+  (0.0ms) SAVEPOINT active_record_1
13593
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13594
+  (0.0ms) SAVEPOINT active_record_1
13595
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13596
+  (0.0ms) rollback transaction
13597
+  (0.0ms) begin transaction
13598
+  (0.0ms) SAVEPOINT active_record_1
13599
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13600
+  (0.0ms) SAVEPOINT active_record_1
13601
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13602
+  (0.0ms) rollback transaction
13603
+  (0.0ms) begin transaction
13604
+  (0.0ms) SAVEPOINT active_record_1
13605
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13606
+  (0.0ms) SAVEPOINT active_record_1
13607
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13608
+  (0.0ms) rollback transaction
13609
+  (0.0ms) begin transaction
13610
+  (0.0ms) SAVEPOINT active_record_1
13611
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13612
+  (0.0ms) SAVEPOINT active_record_1
13613
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13614
+  (0.0ms) rollback transaction
13615
+  (0.0ms) begin transaction
13616
+  (0.0ms) SAVEPOINT active_record_1
13617
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13618
+  (0.0ms) SAVEPOINT active_record_1
13619
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13620
+  (0.0ms) rollback transaction
13621
+  (0.0ms) begin transaction
13622
+  (0.0ms) SAVEPOINT active_record_1
13623
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13624
+  (0.0ms) SAVEPOINT active_record_1
13625
+  (4.0ms) ROLLBACK TO SAVEPOINT active_record_1
13626
+  (0.0ms) rollback transaction
13627
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
13628
+  (4.0ms) DELETE FROM "users";
13629
+  (0.0ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
13630
+  (0.0ms) DELETE FROM sqlite_sequence where name = 'users';
13631
+  (0.0ms) begin transaction
13632
+  (0.0ms) SAVEPOINT active_record_1
13633
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13634
+  (0.0ms) SAVEPOINT active_record_1
13635
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13636
+  (0.0ms) rollback transaction
13637
+  (0.0ms) begin transaction
13638
+  (0.0ms) SAVEPOINT active_record_1
13639
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13640
+  (0.0ms) SAVEPOINT active_record_1
13641
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13642
+  (0.0ms) rollback transaction
13643
+  (0.0ms) begin transaction
13644
+  (0.0ms) SAVEPOINT active_record_1
13645
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13646
+  (0.0ms) SAVEPOINT active_record_1
13647
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13648
+  (0.0ms) rollback transaction
13649
+  (0.0ms) begin transaction
13650
+  (0.0ms) SAVEPOINT active_record_1
13651
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13652
+  (0.0ms) SAVEPOINT active_record_1
13653
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13654
+  (0.0ms) rollback transaction
13655
+  (0.0ms) begin transaction
13656
+  (0.0ms) SAVEPOINT active_record_1
13657
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13658
+  (0.0ms) SAVEPOINT active_record_1
13659
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13660
+  (0.0ms) rollback transaction
13661
+  (0.0ms) begin transaction
13662
+  (0.0ms) SAVEPOINT active_record_1
13663
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13664
+  (0.0ms) SAVEPOINT active_record_1
13665
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13666
+  (0.0ms) rollback transaction
13667
+  (0.0ms) begin transaction
13668
+  (0.0ms) SAVEPOINT active_record_1
13669
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13670
+  (0.0ms) SAVEPOINT active_record_1
13671
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13672
+  (0.0ms) rollback transaction
13673
+  (0.0ms) begin transaction
13674
+  (0.0ms) SAVEPOINT active_record_1
13675
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13676
+  (0.0ms) SAVEPOINT active_record_1
13677
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13678
+  (0.0ms) rollback transaction
13679
+  (0.0ms) begin transaction
13680
+  (0.0ms) SAVEPOINT active_record_1
13681
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13682
+  (0.0ms) SAVEPOINT active_record_1
13683
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13684
+  (0.0ms) rollback transaction
13685
+  (0.0ms) begin transaction
13686
+  (0.0ms) SAVEPOINT active_record_1
13687
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13688
+  (0.0ms) SAVEPOINT active_record_1
13689
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13690
+  (0.0ms) rollback transaction
13691
+  (0.0ms) begin transaction
13692
+  (0.0ms) SAVEPOINT active_record_1
13693
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13694
+  (0.0ms) SAVEPOINT active_record_1
13695
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13696
+  (0.0ms) rollback transaction
13697
+  (0.0ms) begin transaction
13698
+  (0.0ms) SAVEPOINT active_record_1
13699
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13700
+  (0.0ms) SAVEPOINT active_record_1
13701
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13702
+  (0.0ms) rollback transaction
13703
+  (0.0ms) begin transaction
13704
+  (0.0ms) SAVEPOINT active_record_1
13705
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13706
+  (0.0ms) SAVEPOINT active_record_1
13707
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13708
+  (0.0ms) rollback transaction
13709
+  (0.0ms) begin transaction
13710
+  (0.0ms) SAVEPOINT active_record_1
13711
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13712
+  (0.0ms) SAVEPOINT active_record_1
13713
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13714
+  (0.0ms) rollback transaction
13715
+  (0.0ms) begin transaction
13716
+  (0.0ms) SAVEPOINT active_record_1
13717
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13718
+  (0.0ms) SAVEPOINT active_record_1
13719
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13720
+  (0.0ms) rollback transaction
13721
+  (0.0ms) begin transaction
13722
+  (0.0ms) SAVEPOINT active_record_1
13723
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13724
+  (0.0ms) SAVEPOINT active_record_1
13725
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13726
+  (0.0ms) rollback transaction
13727
+  (0.0ms) begin transaction
13728
+  (0.0ms) SAVEPOINT active_record_1
13729
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13730
+  (0.0ms) SAVEPOINT active_record_1
13731
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13732
+  (0.0ms) rollback transaction
13733
+  (0.0ms) begin transaction
13734
+  (0.0ms) SAVEPOINT active_record_1
13735
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13736
+  (0.0ms) SAVEPOINT active_record_1
13737
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13738
+  (0.0ms) rollback transaction
13739
+  (0.0ms) begin transaction
13740
+  (0.0ms) SAVEPOINT active_record_1
13741
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13742
+  (0.0ms) SAVEPOINT active_record_1
13743
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13744
+  (0.0ms) rollback transaction
13745
+  (0.0ms) begin transaction
13746
+  (0.0ms) SAVEPOINT active_record_1
13747
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13748
+  (0.0ms) SAVEPOINT active_record_1
13749
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13750
+  (0.0ms) rollback transaction
13751
+  (0.0ms) begin transaction
13752
+  (0.0ms) SAVEPOINT active_record_1
13753
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13754
+  (0.0ms) SAVEPOINT active_record_1
13755
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13756
+  (0.0ms) rollback transaction
13757
+  (0.0ms) begin transaction
13758
+  (0.0ms) SAVEPOINT active_record_1
13759
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13760
+  (0.0ms) SAVEPOINT active_record_1
13761
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13762
+  (0.0ms) rollback transaction
13763
+  (0.0ms) begin transaction
13764
+  (0.0ms) SAVEPOINT active_record_1
13765
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13766
+  (0.0ms) SAVEPOINT active_record_1
13767
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13768
+  (0.0ms) rollback transaction
13769
+  (0.0ms) begin transaction
13770
+  (0.0ms) SAVEPOINT active_record_1
13771
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13772
+  (0.0ms) SAVEPOINT active_record_1
13773
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13774
+  (0.0ms) rollback transaction
13775
+  (0.0ms) begin transaction
13776
+  (0.0ms) SAVEPOINT active_record_1
13777
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13778
+  (0.0ms) SAVEPOINT active_record_1
13779
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13780
+  (0.0ms) rollback transaction
13781
+  (0.0ms) begin transaction
13782
+  (0.0ms) SAVEPOINT active_record_1
13783
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13784
+  (0.0ms) SAVEPOINT active_record_1
13785
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13786
+  (0.0ms) rollback transaction
13787
+  (0.0ms) begin transaction
13788
+  (0.0ms) SAVEPOINT active_record_1
13789
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13790
+  (0.0ms) SAVEPOINT active_record_1
13791
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13792
+  (0.0ms) rollback transaction
13793
+  (0.0ms) begin transaction
13794
+  (0.0ms) SAVEPOINT active_record_1
13795
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13796
+  (0.0ms) SAVEPOINT active_record_1
13797
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13798
+  (0.0ms) rollback transaction
13799
+  (0.0ms) begin transaction
13800
+  (0.0ms) SAVEPOINT active_record_1
13801
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13802
+  (0.0ms) SAVEPOINT active_record_1
13803
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13804
+  (0.0ms) rollback transaction
13805
+  (0.0ms) begin transaction
13806
+  (0.0ms) SAVEPOINT active_record_1
13807
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13808
+  (0.0ms) SAVEPOINT active_record_1
13809
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13810
+  (0.0ms) rollback transaction
13811
+  (0.0ms) begin transaction
13812
+  (0.0ms) SAVEPOINT active_record_1
13813
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13814
+  (0.0ms) SAVEPOINT active_record_1
13815
+ SQL (8.0ms) INSERT INTO "users" ("created_at", "role", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 21 Jan 2014 20:39:54 UTC +00:00], ["role", 1], ["updated_at", Tue, 21 Jan 2014 20:39:54 UTC +00:00]]
13816
+ SQL (0.0ms) INSERT INTO "users" ("created_at", "role", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 21 Jan 2014 20:39:54 UTC +00:00], ["role", 1], ["updated_at", Tue, 21 Jan 2014 20:39:54 UTC +00:00]]
13817
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13818
+  (0.0ms) rollback transaction
13819
+  (0.0ms) begin transaction
13820
+  (0.0ms) SAVEPOINT active_record_1
13821
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13822
+  (0.0ms) SAVEPOINT active_record_1
13823
+ SQL (0.0ms) INSERT INTO "users" ("created_at", "role", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 21 Jan 2014 20:39:54 UTC +00:00], ["role", 1], ["updated_at", Tue, 21 Jan 2014 20:39:54 UTC +00:00]]
13824
+ SQL (0.0ms) INSERT INTO "users" ("created_at", "role", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 21 Jan 2014 20:39:54 UTC +00:00], ["role", 1], ["updated_at", Tue, 21 Jan 2014 20:39:54 UTC +00:00]]
13825
+  (0.0ms) SELECT COUNT(*) FROM "users" WHERE "users"."role" = 0
13826
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13827
+  (0.0ms) rollback transaction
13828
+  (0.0ms) begin transaction
13829
+  (0.0ms) SAVEPOINT active_record_1
13830
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13831
+  (0.0ms) SAVEPOINT active_record_1
13832
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13833
+  (0.0ms) rollback transaction
13834
+  (0.0ms) begin transaction
13835
+  (0.0ms) SAVEPOINT active_record_1
13836
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13837
+  (0.0ms) SAVEPOINT active_record_1
13838
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13839
+  (0.0ms) rollback transaction
13840
+  (0.0ms) begin transaction
13841
+  (0.0ms) SAVEPOINT active_record_1
13842
+  (0.0ms) RELEASE SAVEPOINT active_record_1
13843
+  (0.0ms) SAVEPOINT active_record_1
13844
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
13845
+  (0.0ms) rollback transaction
File without changes
File without changes
File without changes
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_attr_enum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Fairbank
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-08 00:00:00.000000000 Z
11
+ date: 2014-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 3.2.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 3.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: sqlite3
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  description: Create enums for Rails model attributes like enums in C languages
@@ -116,17 +116,17 @@ require_paths:
116
116
  - lib
117
117
  required_ruby_version: !ruby/object:Gem::Requirement
118
118
  requirements:
119
- - - '>='
119
+ - - ! '>='
120
120
  - !ruby/object:Gem::Version
121
121
  version: '0'
122
122
  required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  requirements:
124
- - - '>='
124
+ - - ! '>='
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  requirements: []
128
128
  rubyforge_project:
129
- rubygems_version: 2.1.9
129
+ rubygems_version: 2.1.10
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: Create enum values for a Rails model's attribute