has_many_booleans 0.9 → 0.9.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.
data/README.rdoc CHANGED
@@ -1,13 +1,13 @@
1
1
  == ActiveRecord plugin: has_many_booleans
2
2
  <em>has_many_booleans creates virtual boolean attributes for a model.
3
- When the object gets saved, the plugin transforms all attributes into a single integer, using a {bitset}[http://en.wikipedia.org/wiki/Bitset]. So you can easily add new attributes without changing the database structure.</em>
3
+ When the object gets saved, the plugin transforms all attributes into a single integer, using a {bitset}[http://rbjl.net/2-storing-an-array-of-indices-in-an-integer]. So you can easily add new attributes without changing the database structure.</em>
4
4
 
5
5
 
6
6
  === Setup
7
7
  Install the plugin with
8
- * Rails 2: <tt>script/plugin install {http://http://github.com/janlelis/has_many_booleans}[http://github.com/janlelis/has_many_booleans]</tt>
9
- * Rails 3: <tt>rails p install {http://http://github.com/janlelis/has_many_booleans}[http://github.com/janlelis/has_many_booleans]</tt>
10
- * Or as a gem: <tt>gem install has_many_booleans</tt>
8
+ * Rails 2: <tt>script/plugin install git://github.com/janlelis/has_many_booleans</tt>
9
+ * Rails 3: <tt>rails plugin install git://github.com/janlelis/has_many_booleans</tt>
10
+ * Or as a gem: <tt>gem install has_many_booleans</tt> (and add it to your environment.rb/Gemfile)
11
11
 
12
12
  Add an integer field with the name +booleans+ to your the model's database table.
13
13
 
@@ -67,8 +67,9 @@ The plugin also generates a <tt>.true</tt> and a <tt>.false</tt> scope for the m
67
67
  Model.true(:name).true(:password) # :name and :password must be true
68
68
 
69
69
  === Further reading
70
- For a more detailed description of the options, see the rdoc for the {has_many_booleans}[link:classes/HasManyBooleans/ClassMethods.html#M000003] method.
70
+ For a more detailed description of the options, see the rdoc for the has_many_booleans method.
71
+
72
+ Code available at http://github.com/janlelis/has_many_booleans
71
73
 
72
74
  Copyright (c) 2010 Jan Lelis, http://rbjl.net, released under the MIT license
73
- available at http://github.com/janlelis/has_many_booleans
74
75
 
data/Rakefile CHANGED
@@ -27,10 +27,10 @@ end
27
27
  PKG_FILES = FileList[ '[a-zA-Z]*', 'lib/**/*', 'rails/**/*', 'test/**/*' ]
28
28
  spec = Gem::Specification.new do |s|
29
29
  s.name = "has_many_booleans"
30
- s.version = "0.9"
30
+ s.version = "0.9.1"
31
31
  s.author = "Jan Lelis"
32
32
  s.email = "mail@janlelis.de"
33
- s.homepage = "http://rbjl.net"
33
+ s.homepage = "http://github.com/janlelis/has_many_booleans"
34
34
  s.platform = Gem::Platform::RUBY
35
35
  s.summary = "This Rails plugin/gem allows you to generate virtual boolean attributes, which get saved in the database as a single bitset integer"
36
36
  s.files = PKG_FILES.to_a
@@ -330,6 +330,7 @@ end
330
330
  # activate instance methods
331
331
  ActiveRecord::Base.send :include, HasManyBooleans
332
332
 
333
- # Copyright (c) 2010 Jan Lelis http://rbjl.net, released under the MIT license
334
- # available at http://github.com/janlelis/has_many_booleans
333
+ #Code available at http://github.com/janlelis/has_many_booleans
334
+ #
335
+ #Copyright (c) 2010 Jan Lelis, http://rbjl.net, released under the MIT license
335
336
 
data/test/debug.log CHANGED
@@ -708,3 +708,244 @@
708
708
  HasManyBooleansTest::Scope Load (0.4ms) SELECT * FROM "scopes" WHERE ((booleans & 4) AND (booleans & 2)) 
709
709
  HasManyBooleansTest::ValidateTest Create (8.3ms) INSERT INTO "validate_tests" ("name", "booleans") VALUES(NULL, 2)
710
710
  HasManyBooleansTest::ValidateTest Create (2.3ms) INSERT INTO "validate_tests" ("name", "booleans") VALUES(NULL, 2)
711
+ SQL (0.9ms) select sqlite_version(*)
712
+ SQL (7.1ms)  SELECT name
713
+ FROM sqlite_master
714
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
715
+ 
716
+ SQL (142.0ms) DROP TABLE "appends"
717
+ SQL (111.4ms) CREATE TABLE "appends" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) 
718
+ SQL (4.1ms)  SELECT name
719
+ FROM sqlite_master
720
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
721
+ 
722
+ SQL (189.7ms) DROP TABLE "append_nils"
723
+ SQL (96.0ms) CREATE TABLE "append_nils" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) 
724
+ SQL (3.9ms)  SELECT name
725
+ FROM sqlite_master
726
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
727
+ 
728
+ SQL (94.2ms) DROP TABLE "defaults"
729
+ SQL (102.0ms) CREATE TABLE "defaults" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) 
730
+ SQL (3.7ms)  SELECT name
731
+ FROM sqlite_master
732
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
733
+ 
734
+ SQL (108.7ms) DROP TABLE "many_options"
735
+ SQL (104.5ms) CREATE TABLE "many_options" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) 
736
+ SQL (4.3ms)  SELECT name
737
+ FROM sqlite_master
738
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
739
+ 
740
+ SQL (107.7ms) DROP TABLE "no_options"
741
+ SQL (104.2ms) CREATE TABLE "no_options" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) 
742
+ SQL (3.7ms)  SELECT name
743
+ FROM sqlite_master
744
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
745
+ 
746
+ SQL (96.8ms) DROP TABLE "hmbs"
747
+ SQL (104.3ms) CREATE TABLE "hmbs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) 
748
+ SQL (4.2ms)  SELECT name
749
+ FROM sqlite_master
750
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
751
+ 
752
+ SQL (107.4ms) DROP TABLE "suffix_nones"
753
+ SQL (105.1ms) CREATE TABLE "suffix_nones" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) 
754
+ SQL (3.9ms)  SELECT name
755
+ FROM sqlite_master
756
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
757
+ 
758
+ SQL (111.9ms) DROP TABLE "suffix_question_onlies"
759
+ SQL (111.7ms) CREATE TABLE "suffix_question_onlies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) 
760
+ SQL (3.9ms)  SELECT name
761
+ FROM sqlite_master
762
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
763
+ 
764
+ SQL (110.3ms) DROP TABLE "suffix_equal_onlies"
765
+ SQL (106.9ms) CREATE TABLE "suffix_equal_onlies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) 
766
+ SQL (4.3ms)  SELECT name
767
+ FROM sqlite_master
768
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
769
+ 
770
+ SQL (95.9ms) DROP TABLE "suffix_exclamation_onlies"
771
+ SQL (100.9ms) CREATE TABLE "suffix_exclamation_onlies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) 
772
+ SQL (3.7ms)  SELECT name
773
+ FROM sqlite_master
774
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
775
+ 
776
+ SQL (107.6ms) DROP TABLE "selves"
777
+ SQL (98.9ms) CREATE TABLE "selves" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) 
778
+ SQL (3.9ms)  SELECT name
779
+ FROM sqlite_master
780
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
781
+ 
782
+ SQL (105.6ms) DROP TABLE "self_append_nils"
783
+ SQL (106.6ms) CREATE TABLE "self_append_nils" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) 
784
+ SQL (4.7ms)  SELECT name
785
+ FROM sqlite_master
786
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
787
+ 
788
+ SQL (103.1ms) DROP TABLE "self_names"
789
+ SQL (98.5ms) CREATE TABLE "self_names" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) 
790
+ SQL (4.1ms)  SELECT name
791
+ FROM sqlite_master
792
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
793
+ 
794
+ SQL (113.9ms) DROP TABLE "ar_callbacks"
795
+ SQL (97.8ms) CREATE TABLE "ar_callbacks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) 
796
+ SQL (3.5ms)  SELECT name
797
+ FROM sqlite_master
798
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
799
+ 
800
+ SQL (103.8ms) DROP TABLE "lazy_falses"
801
+ SQL (109.8ms) CREATE TABLE "lazy_falses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) 
802
+ SQL (3.7ms)  SELECT name
803
+ FROM sqlite_master
804
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
805
+ 
806
+ SQL (113.0ms) DROP TABLE "booleans_as_hashes"
807
+ SQL (109.5ms) CREATE TABLE "booleans_as_hashes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) 
808
+ SQL (3.1ms)  SELECT name
809
+ FROM sqlite_master
810
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
811
+ 
812
+ SQL (104.1ms) DROP TABLE "single_hashes"
813
+ SQL (98.2ms) CREATE TABLE "single_hashes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) 
814
+ SQL (4.0ms)  SELECT name
815
+ FROM sqlite_master
816
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
817
+ 
818
+ SQL (106.6ms) DROP TABLE "validate_tests"
819
+ SQL (94.6ms) CREATE TABLE "validate_tests" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) 
820
+ SQL (3.9ms)  SELECT name
821
+ FROM sqlite_master
822
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
823
+ 
824
+ SQL (105.5ms) DROP TABLE "false_values"
825
+ SQL (100.5ms) CREATE TABLE "false_values" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) 
826
+ SQL (3.9ms)  SELECT name
827
+ FROM sqlite_master
828
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
829
+ 
830
+ SQL (100.7ms) DROP TABLE "scopes"
831
+ SQL (95.4ms) CREATE TABLE "scopes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "booleans" integer) 
832
+ SQL (4.8ms)  SELECT name
833
+ FROM sqlite_master
834
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
835
+ 
836
+ SQL (107.5ms) DROP TABLE "fields"
837
+ SQL (109.2ms) CREATE TABLE "fields" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "bools" integer) 
838
+ SQL (4.3ms)  SELECT name
839
+ FROM sqlite_master
840
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
841
+ 
842
+ SQL (0.8ms) SELECT version FROM "schema_migrations"
843
+ HasManyBooleansTest::ArCallback Create (2.6ms) INSERT INTO "ar_callbacks" ("name", "booleans") VALUES('matz', 0)
844
+ HasManyBooleansTest::AppendNil Create (2.2ms) INSERT INTO "append_nils" ("name", "booleans") VALUES('Yukihiro', 0)
845
+ HasManyBooleansTest::AppendNil Load (0.9ms) SELECT * FROM "append_nils" ORDER BY append_nils.id DESC LIMIT 1
846
+ HasManyBooleansTest::Default Create (2.1ms) INSERT INTO "defaults" ("name", "booleans") VALUES(NULL, 4)
847
+ HasManyBooleansTest::Default Load (1.5ms) SELECT * FROM "defaults" ORDER BY defaults.id DESC LIMIT 1
848
+ HasManyBooleansTest::Default Update (2.9ms) UPDATE "defaults" SET "booleans" = 6 WHERE "id" = 1
849
+ HasManyBooleansTest::Default Load (1.2ms) SELECT * FROM "defaults" ORDER BY defaults.id DESC LIMIT 1
850
+ HasManyBooleansTest::Default Update (1.6ms) UPDATE "defaults" SET "booleans" = 2 WHERE "id" = 1
851
+ HasManyBooleansTest::Default Load (1.2ms) SELECT * FROM "defaults" ORDER BY defaults.id DESC LIMIT 1
852
+ HasManyBooleansTest::Default Update (3.3ms) UPDATE "defaults" SET "booleans" = 6 WHERE "id" = 1
853
+ HasManyBooleansTest::Default Load (1.5ms) SELECT * FROM "defaults" ORDER BY defaults.id DESC LIMIT 1
854
+ HasManyBooleansTest::ManyOption Create (2.1ms) INSERT INTO "many_options" ("name", "booleans") VALUES(NULL, 4)
855
+ HasManyBooleansTest::ManyOption Load (1.1ms) SELECT * FROM "many_options" ORDER BY many_options.id DESC LIMIT 1
856
+ HasManyBooleansTest::ManyOption Update (3.9ms) UPDATE "many_options" SET "booleans" = 20 WHERE "id" = 1
857
+ HasManyBooleansTest::ManyOption Load (2.1ms) SELECT * FROM "many_options" ORDER BY many_options.id DESC LIMIT 1
858
+ HasManyBooleansTest::ManyOption Load (0.8ms) SELECT * FROM "many_options" ORDER BY many_options.id DESC LIMIT 1
859
+ HasManyBooleansTest::ManyOption Update (1.6ms) UPDATE "many_options" SET "booleans" = 52 WHERE "id" = 1
860
+ HasManyBooleansTest::ManyOption Load (1.2ms) SELECT * FROM "many_options" ORDER BY many_options.id DESC LIMIT 1
861
+ HasManyBooleansTest::NoOption Create (4.1ms) INSERT INTO "no_options" ("name", "booleans") VALUES(NULL, 0)
862
+ HasManyBooleansTest::NoOption Load (1.9ms) SELECT * FROM "no_options" ORDER BY no_options.id DESC LIMIT 1
863
+ HasManyBooleansTest::NoOption Update (3.0ms) UPDATE "no_options" SET "booleans" = 2 WHERE "id" = 1
864
+ HasManyBooleansTest::NoOption Load (1.2ms) SELECT * FROM "no_options" ORDER BY no_options.id DESC LIMIT 1
865
+ HasManyBooleansTest::NoOption Load (0.5ms) SELECT * FROM "no_options" ORDER BY no_options.id DESC LIMIT 1
866
+ HasManyBooleansTest::NoOption Update (1.5ms) UPDATE "no_options" SET "booleans" = 6 WHERE "id" = 1
867
+ HasManyBooleansTest::NoOption Load (0.7ms) SELECT * FROM "no_options" ORDER BY no_options.id DESC LIMIT 1
868
+ HasManyBooleansTest::BooleansAsHash Create (3.5ms) INSERT INTO "booleans_as_hashes" ("name", "booleans") VALUES(NULL, 0)
869
+ HasManyBooleansTest::BooleansAsHash Load (1.6ms) SELECT * FROM "booleans_as_hashes" ORDER BY booleans_as_hashes.id DESC LIMIT 1
870
+ HasManyBooleansTest::BooleansAsHash Update (1.6ms) UPDATE "booleans_as_hashes" SET "booleans" = 8388608 WHERE "id" = 1
871
+ HasManyBooleansTest::BooleansAsHash Load (1.4ms) SELECT * FROM "booleans_as_hashes" ORDER BY booleans_as_hashes.id DESC LIMIT 1
872
+ HasManyBooleansTest::BooleansAsHash Load (1.0ms) SELECT * FROM "booleans_as_hashes" ORDER BY booleans_as_hashes.id DESC LIMIT 1
873
+ HasManyBooleansTest::BooleansAsHash Update (1.9ms) UPDATE "booleans_as_hashes" SET "booleans" = 8388672 WHERE "id" = 1
874
+ HasManyBooleansTest::BooleansAsHash Load (0.8ms) SELECT * FROM "booleans_as_hashes" ORDER BY booleans_as_hashes.id DESC LIMIT 1
875
+ HasManyBooleansTest::Hmb Create (3.1ms) INSERT INTO "hmbs" ("name", "booleans") VALUES(NULL, 0)
876
+ HasManyBooleansTest::Hmb Load (1.3ms) SELECT * FROM "hmbs" ORDER BY hmbs.id DESC LIMIT 1
877
+ HasManyBooleansTest::Hmb Update (1.6ms) UPDATE "hmbs" SET "booleans" = 2 WHERE "id" = 1
878
+ HasManyBooleansTest::Hmb Load (1.2ms) SELECT * FROM "hmbs" ORDER BY hmbs.id DESC LIMIT 1
879
+ HasManyBooleansTest::Hmb Load (1.0ms) SELECT * FROM "hmbs" ORDER BY hmbs.id DESC LIMIT 1
880
+ HasManyBooleansTest::Hmb Update (1.6ms) UPDATE "hmbs" SET "booleans" = 6 WHERE "id" = 1
881
+ HasManyBooleansTest::Hmb Load (1.2ms) SELECT * FROM "hmbs" ORDER BY hmbs.id DESC LIMIT 1
882
+ HasManyBooleansTest::Append Create (3.7ms) INSERT INTO "appends" ("name", "booleans") VALUES(NULL, 0)
883
+ HasManyBooleansTest::Append Load (0.7ms) SELECT * FROM "appends" ORDER BY appends.id DESC LIMIT 1
884
+ HasManyBooleansTest::Append Update (1.5ms) UPDATE "appends" SET "booleans" = 2 WHERE "id" = 1
885
+ HasManyBooleansTest::Append Load (1.1ms) SELECT * FROM "appends" ORDER BY appends.id DESC LIMIT 1
886
+ HasManyBooleansTest::Append Load (1.0ms) SELECT * FROM "appends" ORDER BY appends.id DESC LIMIT 1
887
+ HasManyBooleansTest::Append Update (2.9ms) UPDATE "appends" SET "booleans" = 6 WHERE "id" = 1
888
+ HasManyBooleansTest::Append Load (1.5ms) SELECT * FROM "appends" ORDER BY appends.id DESC LIMIT 1
889
+ HasManyBooleansTest::Field Create (4.2ms) INSERT INTO "fields" ("name", "bools") VALUES(NULL, 0)
890
+ HasManyBooleansTest::Field Load (1.1ms) SELECT * FROM "fields" ORDER BY fields.id DESC LIMIT 1
891
+ HasManyBooleansTest::Field Update (1.6ms) UPDATE "fields" SET "bools" = 2 WHERE "id" = 1
892
+ HasManyBooleansTest::Field Load (1.3ms) SELECT * FROM "fields" ORDER BY fields.id DESC LIMIT 1
893
+ HasManyBooleansTest::Field Load (0.9ms) SELECT * FROM "fields" ORDER BY fields.id DESC LIMIT 1
894
+ HasManyBooleansTest::Field Update (1.6ms) UPDATE "fields" SET "bools" = 6 WHERE "id" = 1
895
+ HasManyBooleansTest::Field Load (1.2ms) SELECT * FROM "fields" ORDER BY fields.id DESC LIMIT 1
896
+ HasManyBooleansTest::SuffixEqualOnly Create (2.9ms) INSERT INTO "suffix_equal_onlies" ("name", "booleans") VALUES(NULL, 0)
897
+ HasManyBooleansTest::SuffixEqualOnly Load (1.2ms) SELECT * FROM "suffix_equal_onlies" ORDER BY suffix_equal_onlies.id DESC LIMIT 1
898
+ HasManyBooleansTest::SuffixEqualOnly Update (1.6ms) UPDATE "suffix_equal_onlies" SET "booleans" = 2 WHERE "id" = 1
899
+ HasManyBooleansTest::SuffixEqualOnly Load (1.2ms) SELECT * FROM "suffix_equal_onlies" ORDER BY suffix_equal_onlies.id DESC LIMIT 1
900
+ HasManyBooleansTest::SuffixEqualOnly Load (0.9ms) SELECT * FROM "suffix_equal_onlies" ORDER BY suffix_equal_onlies.id DESC LIMIT 1
901
+ HasManyBooleansTest::SuffixEqualOnly Update (2.1ms) UPDATE "suffix_equal_onlies" SET "booleans" = 6 WHERE "id" = 1
902
+ HasManyBooleansTest::SuffixEqualOnly Load (1.3ms) SELECT * FROM "suffix_equal_onlies" ORDER BY suffix_equal_onlies.id DESC LIMIT 1
903
+ HasManyBooleansTest::Self Create (4.5ms) INSERT INTO "selves" ("name", "booleans") VALUES(NULL, 0)
904
+ HasManyBooleansTest::Self Load (1.3ms) SELECT * FROM "selves" ORDER BY selves.id DESC LIMIT 1
905
+ HasManyBooleansTest::Self Update (1.9ms) UPDATE "selves" SET "booleans" = 2 WHERE "id" = 1
906
+ HasManyBooleansTest::Self Load (1.2ms) SELECT * FROM "selves" ORDER BY selves.id DESC LIMIT 1
907
+ HasManyBooleansTest::Self Load (0.6ms) SELECT * FROM "selves" ORDER BY selves.id DESC LIMIT 1
908
+ HasManyBooleansTest::Self Update (1.7ms) UPDATE "selves" SET "booleans" = 6 WHERE "id" = 1
909
+ HasManyBooleansTest::Self Load (1.2ms) SELECT * FROM "selves" ORDER BY selves.id DESC LIMIT 1
910
+ HasManyBooleansTest::SelfName Create (4.6ms) INSERT INTO "self_names" ("name", "booleans") VALUES(NULL, 1)
911
+ HasManyBooleansTest::SelfName Load (1.3ms) SELECT * FROM "self_names" ORDER BY self_names.id DESC LIMIT 1
912
+ HasManyBooleansTest::SelfName Update (2.9ms) UPDATE "self_names" SET "booleans" = 3 WHERE "id" = 1
913
+ HasManyBooleansTest::SelfName Load (1.2ms) SELECT * FROM "self_names" ORDER BY self_names.id DESC LIMIT 1
914
+ HasManyBooleansTest::SelfName Load (0.9ms) SELECT * FROM "self_names" ORDER BY self_names.id DESC LIMIT 1
915
+ HasManyBooleansTest::SelfName Update (2.9ms) UPDATE "self_names" SET "booleans" = 7 WHERE "id" = 1
916
+ HasManyBooleansTest::SelfName Load (1.1ms) SELECT * FROM "self_names" ORDER BY self_names.id DESC LIMIT 1
917
+ HasManyBooleansTest::ArCallback Create (3.9ms) INSERT INTO "ar_callbacks" ("name", "booleans") VALUES('matz', 0)
918
+ HasManyBooleansTest::ArCallback Load (1.3ms) SELECT * FROM "ar_callbacks" ORDER BY ar_callbacks.id DESC LIMIT 1
919
+ HasManyBooleansTest::ArCallback Update (3.3ms) UPDATE "ar_callbacks" SET "booleans" = 2 WHERE "id" = 2
920
+ HasManyBooleansTest::ArCallback Load (1.1ms) SELECT * FROM "ar_callbacks" ORDER BY ar_callbacks.id DESC LIMIT 1
921
+ HasManyBooleansTest::ArCallback Load (1.1ms) SELECT * FROM "ar_callbacks" ORDER BY ar_callbacks.id DESC LIMIT 1
922
+ HasManyBooleansTest::ArCallback Update (1.6ms) UPDATE "ar_callbacks" SET "booleans" = 6 WHERE "id" = 2
923
+ HasManyBooleansTest::ArCallback Load (1.2ms) SELECT * FROM "ar_callbacks" ORDER BY ar_callbacks.id DESC LIMIT 1
924
+ HasManyBooleansTest::LazyFalse Create (4.2ms) INSERT INTO "lazy_falses" ("name", "booleans") VALUES(NULL, 0)
925
+ HasManyBooleansTest::LazyFalse Load (1.1ms) SELECT * FROM "lazy_falses" ORDER BY lazy_falses.id DESC LIMIT 1
926
+ HasManyBooleansTest::LazyFalse Update (3.1ms) UPDATE "lazy_falses" SET "booleans" = 2 WHERE "id" = 1
927
+ HasManyBooleansTest::LazyFalse Load (1.2ms) SELECT * FROM "lazy_falses" ORDER BY lazy_falses.id DESC LIMIT 1
928
+ HasManyBooleansTest::LazyFalse Load (1.0ms) SELECT * FROM "lazy_falses" ORDER BY lazy_falses.id DESC LIMIT 1
929
+ HasManyBooleansTest::LazyFalse Update (1.7ms) UPDATE "lazy_falses" SET "booleans" = 6 WHERE "id" = 1
930
+ HasManyBooleansTest::LazyFalse Load (1.5ms) SELECT * FROM "lazy_falses" ORDER BY lazy_falses.id DESC LIMIT 1
931
+ HasManyBooleansTest::FalseValue Create (2.9ms) INSERT INTO "false_values" ("name", "booleans") VALUES(NULL, 0)
932
+ HasManyBooleansTest::FalseValue Load (1.1ms) SELECT * FROM "false_values" ORDER BY false_values.id DESC LIMIT 1
933
+ HasManyBooleansTest::FalseValue Update (3.0ms) UPDATE "false_values" SET "booleans" = 2 WHERE "id" = 1
934
+ HasManyBooleansTest::FalseValue Load (1.2ms) SELECT * FROM "false_values" ORDER BY false_values.id DESC LIMIT 1
935
+ HasManyBooleansTest::FalseValue Load (1.1ms) SELECT * FROM "false_values" ORDER BY false_values.id DESC LIMIT 1
936
+ HasManyBooleansTest::FalseValue Update (3.0ms) UPDATE "false_values" SET "booleans" = 6 WHERE "id" = 1
937
+ HasManyBooleansTest::FalseValue Load (1.3ms) SELECT * FROM "false_values" ORDER BY false_values.id DESC LIMIT 1
938
+ HasManyBooleansTest::Scope Create (2.2ms) INSERT INTO "scopes" ("name", "booleans") VALUES(NULL, 0)
939
+ HasManyBooleansTest::Scope Create (2.7ms) INSERT INTO "scopes" ("name", "booleans") VALUES(NULL, 5)
940
+ HasManyBooleansTest::Scope Create (4.3ms) INSERT INTO "scopes" ("name", "booleans") VALUES(NULL, 1)
941
+ HasManyBooleansTest::Scope Create (4.6ms) INSERT INTO "scopes" ("name", "booleans") VALUES(NULL, 4)
942
+ HasManyBooleansTest::Scope Create (3.5ms) INSERT INTO "scopes" ("name", "booleans") VALUES(NULL, 2)
943
+ HasManyBooleansTest::Scope Load (1.3ms) SELECT * FROM "scopes" WHERE ("scopes"."id" = 5) 
944
+ HasManyBooleansTest::Scope Load (1.0ms) SELECT * FROM "scopes" WHERE (booleans & 2) 
945
+ HasManyBooleansTest::Scope Load (0.9ms) SELECT * FROM "scopes" WHERE ("scopes"."id" IN (1,4,5)) 
946
+ HasManyBooleansTest::Scope Load (0.8ms) SELECT * FROM "scopes" WHERE (booleans & 1 < 1) 
947
+ HasManyBooleansTest::Scope Load (0.8ms) SELECT * FROM "scopes" WHERE ("scopes"."id" IN (2,4,5)) 
948
+ HasManyBooleansTest::Scope Load (0.9ms) SELECT * FROM "scopes" WHERE (booleans & 2 or booleans & 4) 
949
+ HasManyBooleansTest::Scope Load (0.4ms) SELECT * FROM "scopes" WHERE ((booleans & 4) AND (booleans & 2)) 
950
+ HasManyBooleansTest::ValidateTest Create (2.1ms) INSERT INTO "validate_tests" ("name", "booleans") VALUES(NULL, 2)
951
+ HasManyBooleansTest::ValidateTest Create (5.8ms) INSERT INTO "validate_tests" ("name", "booleans") VALUES(NULL, 2)
Binary file
metadata CHANGED
@@ -5,7 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 9
8
- version: "0.9"
8
+ - 1
9
+ version: 0.9.1
9
10
  platform: ruby
10
11
  authors:
11
12
  - Jan Lelis
@@ -42,7 +43,7 @@ files:
42
43
  - test/has_many_booleans_plugin.sqlite3
43
44
  - test/database.yml
44
45
  has_rdoc: true
45
- homepage: http://rbjl.net
46
+ homepage: http://github.com/janlelis/has_many_booleans
46
47
  licenses: []
47
48
 
48
49
  post_install_message: