large_text_field 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6010501e761311db4b6507c8febf54b0083266a8
4
- data.tar.gz: f1c2a0f18581ee5d3081d893cb0f42f8f5af3e16
3
+ metadata.gz: 40f3feb2ddeb7499788d2f89e5e5f6d65944c69f
4
+ data.tar.gz: 97fd1b431fc477370eb2822f979ab6409186c821
5
5
  SHA512:
6
- metadata.gz: f506086fd9b28f7844a2503472a825b3abc87abe95b442c0d75834d194419788dabc426304fce3a5384ed7fc5ef04761629b225fa66d951056f39c5ded8213e0
7
- data.tar.gz: ca215d286f0eaf66fd50a82b2065ee63ce08223d6f931eb35101ca895b66897f57228ef19040f51df9bc43d9866d7ba2a46a9c721bef0fb1e8ab95a17beeca24
6
+ metadata.gz: 92550cce241931423df48769f67fb3caf6750c3af8b85445883be0513f346e93b4cae87006fa3054fd589cce4f8036caad17c3373d69850cae196dd02734937a
7
+ data.tar.gz: 24dec0903a9b9100fc3242519f746151d1e57edf7bf4e3c7ab1382ccad0c914c66e179f84968b296bcfbf5896cc5016fd67a2ab8771c9b788e23534b018a0a05
@@ -1,3 +1,3 @@
1
1
  module LargeTextField
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -5031,5 +5031,799 @@ LargeTextField::NamedTextValueTest: test_: unique index should raise a unique co
5031
5031
   (0.0ms) begin transaction
5032
5032
  ------------------------------
5033
5033
  LargeTextFieldTest: test_truth
5034
+ ------------------------------
5035
+  (0.0ms) rollback transaction
5036
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5037
+  (0.1ms) begin transaction
5038
+ ---------------------------------------------------------------------------------------------------
5039
+ LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
5040
+ ---------------------------------------------------------------------------------------------------
5041
+  (0.0ms) SAVEPOINT active_record_1
5042
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
5043
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5044
+  (0.0ms) SAVEPOINT active_record_1
5045
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]
5046
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5047
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5048
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5049
+  (0.9ms) rollback transaction
5050
+  (0.0ms) begin transaction
5051
+ --------------------------------------------------------------------------------------------------------------------------------
5052
+ LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field.
5053
+ --------------------------------------------------------------------------------------------------------------------------------
5054
+  (0.0ms) rollback transaction
5055
+  (0.0ms) begin transaction
5056
+ --------------------------------------------------------------------------------------------------
5057
+ LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
5058
+ --------------------------------------------------------------------------------------------------
5059
+  (0.0ms) rollback transaction
5060
+  (0.0ms) begin transaction
5061
+ -----------------------------------------------------------------------------------------------------------------------
5062
+ LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
5063
+ -----------------------------------------------------------------------------------------------------------------------
5064
+  (0.0ms) SAVEPOINT active_record_1
5065
+ SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5066
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5067
+  (0.0ms) SAVEPOINT active_record_1
5068
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
5069
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5070
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 1]]
5071
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5072
+  (0.6ms) rollback transaction
5073
+  (0.0ms) begin transaction
5074
+ --------------------------------------------------------------------------------------------------------------------------
5075
+ LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
5076
+ --------------------------------------------------------------------------------------------------------------------------
5077
+  (0.0ms) rollback transaction
5078
+  (0.0ms) begin transaction
5079
+ -------------------------------------------------------------------------------------------------------
5080
+ LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names.
5081
+ -------------------------------------------------------------------------------------------------------
5082
+  (0.0ms) SAVEPOINT active_record_1
5083
+ SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5084
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5085
+  (0.0ms) SAVEPOINT active_record_1
5086
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria"]]
5087
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5088
+  (0.1ms) SAVEPOINT active_record_1
5089
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
5090
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5091
+  (0.0ms) SAVEPOINT active_record_1
5092
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
5093
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5094
+  (0.0ms) SAVEPOINT active_record_1
5095
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]
5096
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5097
+  (0.7ms) rollback transaction
5098
+  (0.0ms) begin transaction
5099
+ ------------------------------------------------------------------------------------------------------------------------------------
5100
+ LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
5101
+ ------------------------------------------------------------------------------------------------------------------------------------
5102
+  (0.0ms) SAVEPOINT active_record_1
5103
+ SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5104
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5105
+  (0.0ms) SAVEPOINT active_record_1
5106
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
5107
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5108
+  (0.0ms) SAVEPOINT active_record_1
5109
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
5110
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
5111
+  (0.9ms) rollback transaction
5112
+  (0.0ms) begin transaction
5113
+ ----------------------------------------------------------------------------------------------------------
5114
+ LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
5115
+ ----------------------------------------------------------------------------------------------------------
5116
+  (0.0ms) SAVEPOINT active_record_1
5117
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5118
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5119
+  (1.0ms) rollback transaction
5120
+  (0.0ms) begin transaction
5121
+ ---------------------------------------------------------------------------------------------------
5122
+ LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
5123
+ ---------------------------------------------------------------------------------------------------
5124
+  (0.0ms) SAVEPOINT active_record_1
5125
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5126
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5127
+  (0.0ms) SAVEPOINT active_record_1
5128
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
5129
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
5130
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5131
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5132
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5133
+  (0.0ms) SAVEPOINT active_record_1
5134
+ SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
5135
+ SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]
5136
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5137
+  (1.0ms) rollback transaction
5138
+  (0.0ms) begin transaction
5139
+ ------------------------------------------------------------------------------------------------------
5140
+ LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
5141
+ ------------------------------------------------------------------------------------------------------
5142
+  (0.0ms) SAVEPOINT active_record_1
5143
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5144
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5145
+  (0.0ms) SAVEPOINT active_record_1
5146
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]
5147
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5148
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5149
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5150
+  (0.0ms) SAVEPOINT active_record_1
5151
+ SQL (0.0ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]
5152
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5153
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5154
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5155
+  (0.0ms) SAVEPOINT active_record_1
5156
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
5157
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5158
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5159
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5160
+  (0.9ms) rollback transaction
5161
+  (0.0ms) begin transaction
5162
+ ----------------------------------------------------------------------------------------
5163
+ LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
5164
+ ----------------------------------------------------------------------------------------
5165
+  (0.0ms) SAVEPOINT active_record_1
5166
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5167
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5168
+  (0.0ms) SAVEPOINT active_record_1
5169
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
5170
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
5171
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5172
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5173
+ LargeTextField::NamedTextValue Load (0.2ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)
5174
+  (1.1ms) rollback transaction
5175
+  (0.0ms) begin transaction
5176
+ ----------------------------------------------------------------------------------------------
5177
+ LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
5178
+ ----------------------------------------------------------------------------------------------
5179
+  (0.0ms) SAVEPOINT active_record_1
5180
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5181
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5182
+  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5183
+  (0.0ms) SAVEPOINT active_record_1
5184
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
5185
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5186
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5187
+  (0.0ms) SAVEPOINT active_record_1
5188
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
5189
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5190
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5191
+  (0.0ms) SAVEPOINT active_record_1
5192
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
5193
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5194
+  (0.7ms) rollback transaction
5195
+  (0.0ms) begin transaction
5196
+ ---------------------------------------------------------------------------------------------------
5197
+ LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
5198
+ ---------------------------------------------------------------------------------------------------
5199
+  (0.0ms) SAVEPOINT active_record_1
5200
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5201
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5202
+  (0.0ms) SAVEPOINT active_record_1
5203
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
5204
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
5205
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5206
+  (0.0ms) SAVEPOINT active_record_1
5207
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5208
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
5209
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
5210
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5211
+  (0.0ms) SAVEPOINT active_record_1
5212
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5213
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5214
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5215
+  (0.0ms) SAVEPOINT active_record_1
5216
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
5217
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 4]]
5218
+ SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
5219
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5220
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
5221
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 4]]
5222
+  (1.0ms) rollback transaction
5223
+  (0.0ms) begin transaction
5224
+ -------------------------------------------------------------------------------------------------------------------------------------------------------------
5225
+ LargeTextField::OwnerTest: test_: a large text field should declare the association when it is first described and other meta data when it is first defined.
5226
+ -------------------------------------------------------------------------------------------------------------------------------------------------------------
5227
+  (0.0ms) SAVEPOINT active_record_1
5228
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5229
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5230
+  (1.0ms) rollback transaction
5231
+  (0.0ms) begin transaction
5232
+ ------------------------------------------------------------------------------------------------------
5233
+ LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
5234
+ ------------------------------------------------------------------------------------------------------
5235
+  (0.0ms) SAVEPOINT active_record_1
5236
+ SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5237
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5238
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5239
+  (0.0ms) SAVEPOINT active_record_1
5240
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
5241
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5242
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5243
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5244
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5245
+  (0.0ms) SAVEPOINT active_record_1
5246
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
5247
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5248
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5249
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5250
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5251
+  (0.6ms) rollback transaction
5252
+  (0.0ms) begin transaction
5253
+ ------------------------------------------------------------------------------------------------------------------
5254
+ LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
5255
+ ------------------------------------------------------------------------------------------------------------------
5256
+  (0.0ms) SAVEPOINT active_record_1
5257
+ SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5258
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5259
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
5260
+  (0.0ms) SAVEPOINT active_record_1
5261
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
5262
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
5263
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5264
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
5265
+  (0.0ms) SAVEPOINT active_record_1
5266
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
5267
+ SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
5268
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5269
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
5270
+  (0.9ms) rollback transaction
5271
+  (0.0ms) begin transaction
5272
+ --------------------------------------------------------------------------------------------------------------------
5273
+ LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
5274
+ --------------------------------------------------------------------------------------------------------------------
5275
+  (0.0ms) SAVEPOINT active_record_1
5276
+ SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5277
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5278
+  (0.0ms) SAVEPOINT active_record_1
5279
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5280
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "a new note"], ["owner_id", 2]]
5281
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5282
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
5283
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
5284
+  (0.8ms) rollback transaction
5285
+  (0.0ms) begin transaction
5286
+ --------------------------------------------------------------------------------------------------------
5287
+ LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
5288
+ --------------------------------------------------------------------------------------------------------
5289
+  (0.0ms) SAVEPOINT active_record_1
5290
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5291
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5292
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5293
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5294
+  (0.0ms) SAVEPOINT active_record_1
5295
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
5296
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5297
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5298
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5299
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5300
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5301
+  (0.6ms) rollback transaction
5302
+  (0.0ms) begin transaction
5303
+ ---------------------------------------------------------------------------------------------------
5304
+ LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
5305
+ ---------------------------------------------------------------------------------------------------
5306
+  (0.0ms) SAVEPOINT active_record_1
5307
+ SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5308
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5309
+  (0.0ms) SAVEPOINT active_record_1
5310
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
5311
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
5312
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5313
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
5314
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
5315
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
5316
+  (1.0ms) rollback transaction
5317
+  (0.0ms) begin transaction
5318
+ -------------------------------------------------------------------------------------------------------
5319
+ LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
5320
+ -------------------------------------------------------------------------------------------------------
5321
+  (0.0ms) SAVEPOINT active_record_1
5322
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5323
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5324
+  (1.0ms) rollback transaction
5325
+  (0.0ms) begin transaction
5326
+ -----------------------------------------------------------------------------------------------------------------------------------------------
5327
+ LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range.
5328
+ -----------------------------------------------------------------------------------------------------------------------------------------------
5329
+  (0.0ms) SAVEPOINT active_record_1
5330
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5331
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5332
+  (1.0ms) rollback transaction
5333
+  (0.0ms) begin transaction
5334
+ -----------------------------------------------------------------------------------------------------------------------
5335
+ LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
5336
+ -----------------------------------------------------------------------------------------------------------------------
5337
+  (0.0ms) SAVEPOINT active_record_1
5338
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5339
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5340
+  (0.8ms) rollback transaction
5341
+  (0.0ms) begin transaction
5342
+ ------------------------------------------------------------------------------
5343
+ LargeTextField::OwnerTest: test_: a large text field should read from a file.
5344
+ ------------------------------------------------------------------------------
5345
+  (0.0ms) SAVEPOINT active_record_1
5346
+ SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5347
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5348
+  (0.0ms) SAVEPOINT active_record_1
5349
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5350
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5351
+  (0.0ms) SAVEPOINT active_record_1
5352
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 2], ["owner_type", "Library"], ["field_name", "description"], ["value", "this is a string from the file"]]
5353
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5354
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
5355
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
5356
+  (0.6ms) rollback transaction
5357
+  (0.0ms) begin transaction
5358
+ ------------------------------------------------------------------------------------------------------------------
5359
+ LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
5360
+ ------------------------------------------------------------------------------------------------------------------
5361
+  (0.0ms) SAVEPOINT active_record_1
5362
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5363
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5364
+  (0.0ms) SAVEPOINT active_record_1
5365
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
5366
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
5367
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5368
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
5369
+  (0.0ms) SAVEPOINT active_record_1
5370
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
5371
+ SQL (0.0ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "The main research library of the University of Cambridge in England"], ["id", 1]]
5372
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5373
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
5374
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
5375
+  (0.9ms) rollback transaction
5376
+  (0.0ms) begin transaction
5377
+ -------------------------------------------------------------------------------------------------
5378
+ LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
5379
+ -------------------------------------------------------------------------------------------------
5380
+  (0.0ms) SAVEPOINT active_record_1
5381
+ SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5382
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5383
+  (1.1ms) rollback transaction
5384
+  (0.0ms) begin transaction
5385
+ ------------------------------------------------------------------------------------------------------------
5386
+ LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
5387
+ ------------------------------------------------------------------------------------------------------------
5388
+  (0.0ms) SAVEPOINT active_record_1
5389
+ SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5390
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5391
+  (0.9ms) rollback transaction
5392
+  (0.0ms) begin transaction
5393
+ -----------------------------------------------------------------------------------------
5394
+ LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
5395
+ -----------------------------------------------------------------------------------------
5396
+  (0.0ms) SAVEPOINT active_record_1
5397
+ SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5398
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5399
+  (1.3ms) rollback transaction
5400
+  (0.1ms) begin transaction
5401
+ ----------------------------------------------------------------------------------------------------------------
5402
+ LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
5403
+ ----------------------------------------------------------------------------------------------------------------
5404
+  (0.1ms) SAVEPOINT active_record_1
5405
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5406
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5407
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5408
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5409
+  (1.1ms) rollback transaction
5410
+  (0.0ms) begin transaction
5411
+ --------------------------------------------------------------------------------------------------------------------
5412
+ LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
5413
+ --------------------------------------------------------------------------------------------------------------------
5414
+  (0.0ms) SAVEPOINT active_record_1
5415
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5416
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]
5417
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5418
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5419
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5420
+  (0.8ms) rollback transaction
5421
+  (0.0ms) begin transaction
5422
+ -----------------------------------------------------------------------------------------------------------------
5423
+ LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
5424
+ -----------------------------------------------------------------------------------------------------------------
5425
+  (0.0ms) SAVEPOINT active_record_1
5426
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
5427
+  (0.0ms) rollback transaction
5428
+  (0.0ms) begin transaction
5429
+ ------------------------------
5430
+ LargeTextFieldTest: test_truth
5431
+ ------------------------------
5432
+  (0.0ms) rollback transaction
5433
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5434
+  (0.1ms) begin transaction
5435
+ ---------------------------------------------------------------------------------------------------
5436
+ LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
5437
+ ---------------------------------------------------------------------------------------------------
5438
+  (0.1ms) SAVEPOINT active_record_1
5439
+ SQL (0.9ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
5440
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5441
+  (0.1ms) SAVEPOINT active_record_1
5442
+ SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]
5443
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5444
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5445
+ LargeTextField::NamedTextValue Load (0.2ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5446
+  (1.3ms) rollback transaction
5447
+  (0.1ms) begin transaction
5448
+ --------------------------------------------------------------------------------------------------------------------------------
5449
+ LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field.
5450
+ --------------------------------------------------------------------------------------------------------------------------------
5451
+  (0.0ms) rollback transaction
5452
+  (0.0ms) begin transaction
5453
+ --------------------------------------------------------------------------------------------------
5454
+ LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
5455
+ --------------------------------------------------------------------------------------------------
5456
+  (0.0ms) rollback transaction
5457
+  (0.0ms) begin transaction
5458
+ -----------------------------------------------------------------------------------------------------------------------
5459
+ LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
5460
+ -----------------------------------------------------------------------------------------------------------------------
5461
+  (0.0ms) SAVEPOINT active_record_1
5462
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5463
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5464
+  (0.0ms) SAVEPOINT active_record_1
5465
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
5466
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5467
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 1]]
5468
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5469
+  (0.8ms) rollback transaction
5470
+  (0.0ms) begin transaction
5471
+ --------------------------------------------------------------------------------------------------------------------------
5472
+ LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
5473
+ --------------------------------------------------------------------------------------------------------------------------
5474
+  (0.0ms) rollback transaction
5475
+  (0.0ms) begin transaction
5476
+ -------------------------------------------------------------------------------------------------------
5477
+ LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names.
5478
+ -------------------------------------------------------------------------------------------------------
5479
+  (0.0ms) SAVEPOINT active_record_1
5480
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5481
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5482
+  (0.0ms) SAVEPOINT active_record_1
5483
+ SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria"]]
5484
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5485
+  (0.0ms) SAVEPOINT active_record_1
5486
+ SQL (0.5ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
5487
+  (0.2ms) RELEASE SAVEPOINT active_record_1
5488
+  (0.1ms) SAVEPOINT active_record_1
5489
+ SQL (0.2ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
5490
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5491
+  (0.1ms) SAVEPOINT active_record_1
5492
+ SQL (0.2ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]
5493
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5494
+  (2.1ms) rollback transaction
5495
+  (0.1ms) begin transaction
5496
+ ------------------------------------------------------------------------------------------------------------------------------------
5497
+ LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
5498
+ ------------------------------------------------------------------------------------------------------------------------------------
5499
+  (0.0ms) SAVEPOINT active_record_1
5500
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5501
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5502
+  (0.0ms) SAVEPOINT active_record_1
5503
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
5504
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5505
+  (0.0ms) SAVEPOINT active_record_1
5506
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
5507
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
5508
+  (0.7ms) rollback transaction
5509
+  (0.0ms) begin transaction
5510
+ ----------------------------------------------------------------------------------------------------------
5511
+ LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
5512
+ ----------------------------------------------------------------------------------------------------------
5513
+  (0.0ms) SAVEPOINT active_record_1
5514
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5515
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5516
+  (0.9ms) rollback transaction
5517
+  (0.0ms) begin transaction
5518
+ ---------------------------------------------------------------------------------------------------
5519
+ LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
5520
+ ---------------------------------------------------------------------------------------------------
5521
+  (0.1ms) SAVEPOINT active_record_1
5522
+ SQL (0.6ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5523
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5524
+  (0.1ms) SAVEPOINT active_record_1
5525
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
5526
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
5527
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5528
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5529
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5530
+  (0.1ms) SAVEPOINT active_record_1
5531
+ SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
5532
+ SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]
5533
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5534
+  (0.9ms) rollback transaction
5535
+  (0.1ms) begin transaction
5536
+ ------------------------------------------------------------------------------------------------------
5537
+ LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
5538
+ ------------------------------------------------------------------------------------------------------
5539
+  (0.0ms) SAVEPOINT active_record_1
5540
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5541
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5542
+  (0.0ms) SAVEPOINT active_record_1
5543
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]
5544
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5545
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5546
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5547
+  (0.0ms) SAVEPOINT active_record_1
5548
+ SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]
5549
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5550
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5551
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5552
+  (0.0ms) SAVEPOINT active_record_1
5553
+ SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
5554
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5555
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5556
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5557
+  (1.4ms) rollback transaction
5558
+  (0.1ms) begin transaction
5559
+ ----------------------------------------------------------------------------------------
5560
+ LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
5561
+ ----------------------------------------------------------------------------------------
5562
+  (0.0ms) SAVEPOINT active_record_1
5563
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5564
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5565
+  (0.0ms) SAVEPOINT active_record_1
5566
+ SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
5567
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
5568
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5569
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5570
+ LargeTextField::NamedTextValue Load (0.2ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)
5571
+  (0.8ms) rollback transaction
5572
+  (0.0ms) begin transaction
5573
+ ----------------------------------------------------------------------------------------------
5574
+ LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
5575
+ ----------------------------------------------------------------------------------------------
5576
+  (0.0ms) SAVEPOINT active_record_1
5577
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5578
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5579
+  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5580
+  (0.0ms) SAVEPOINT active_record_1
5581
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
5582
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5583
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5584
+  (0.0ms) SAVEPOINT active_record_1
5585
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
5586
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5587
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5588
+  (0.0ms) SAVEPOINT active_record_1
5589
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
5590
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5591
+  (0.7ms) rollback transaction
5592
+  (0.0ms) begin transaction
5593
+ ---------------------------------------------------------------------------------------------------
5594
+ LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
5595
+ ---------------------------------------------------------------------------------------------------
5596
+  (0.0ms) SAVEPOINT active_record_1
5597
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5598
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5599
+  (0.0ms) SAVEPOINT active_record_1
5600
+ SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
5601
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
5602
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5603
+  (0.0ms) SAVEPOINT active_record_1
5604
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5605
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
5606
+ SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
5607
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5608
+  (0.0ms) SAVEPOINT active_record_1
5609
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5610
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5611
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5612
+  (0.0ms) SAVEPOINT active_record_1
5613
+ SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
5614
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 4]]
5615
+ SQL (0.1ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
5616
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5617
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
5618
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 4]]
5619
+  (1.0ms) rollback transaction
5620
+  (0.0ms) begin transaction
5621
+ -------------------------------------------------------------------------------------------------------------------------------------------------------------
5622
+ LargeTextField::OwnerTest: test_: a large text field should declare the association when it is first described and other meta data when it is first defined.
5623
+ -------------------------------------------------------------------------------------------------------------------------------------------------------------
5624
+  (0.0ms) SAVEPOINT active_record_1
5625
+ SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5626
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5627
+  (1.0ms) rollback transaction
5628
+  (0.1ms) begin transaction
5629
+ ------------------------------------------------------------------------------------------------------
5630
+ LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
5631
+ ------------------------------------------------------------------------------------------------------
5632
+  (0.0ms) SAVEPOINT active_record_1
5633
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5634
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5635
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5636
+  (0.1ms) SAVEPOINT active_record_1
5637
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
5638
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5639
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5640
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5641
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5642
+  (0.0ms) SAVEPOINT active_record_1
5643
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
5644
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5645
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5646
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5647
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5648
+  (0.8ms) rollback transaction
5649
+  (0.0ms) begin transaction
5650
+ ------------------------------------------------------------------------------------------------------------------
5651
+ LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
5652
+ ------------------------------------------------------------------------------------------------------------------
5653
+  (0.0ms) SAVEPOINT active_record_1
5654
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5655
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5656
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
5657
+  (0.0ms) SAVEPOINT active_record_1
5658
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
5659
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
5660
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5661
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
5662
+  (0.0ms) SAVEPOINT active_record_1
5663
+ SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
5664
+ SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
5665
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5666
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
5667
+  (0.8ms) rollback transaction
5668
+  (0.0ms) begin transaction
5669
+ --------------------------------------------------------------------------------------------------------------------
5670
+ LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
5671
+ --------------------------------------------------------------------------------------------------------------------
5672
+  (0.0ms) SAVEPOINT active_record_1
5673
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5674
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5675
+  (0.0ms) SAVEPOINT active_record_1
5676
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5677
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "a new note"], ["owner_id", 2]]
5678
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5679
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
5680
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
5681
+  (0.6ms) rollback transaction
5682
+  (0.0ms) begin transaction
5683
+ --------------------------------------------------------------------------------------------------------
5684
+ LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
5685
+ --------------------------------------------------------------------------------------------------------
5686
+  (0.1ms) SAVEPOINT active_record_1
5687
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5688
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5689
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5690
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5691
+  (0.0ms) SAVEPOINT active_record_1
5692
+ SQL (0.5ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
5693
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5694
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5695
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5696
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5697
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5698
+  (0.7ms) rollback transaction
5699
+  (0.0ms) begin transaction
5700
+ ---------------------------------------------------------------------------------------------------
5701
+ LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
5702
+ ---------------------------------------------------------------------------------------------------
5703
+  (0.0ms) SAVEPOINT active_record_1
5704
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5705
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5706
+  (0.0ms) SAVEPOINT active_record_1
5707
+ SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
5708
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
5709
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5710
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
5711
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
5712
+  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
5713
+  (0.8ms) rollback transaction
5714
+  (0.0ms) begin transaction
5715
+ -------------------------------------------------------------------------------------------------------
5716
+ LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
5717
+ -------------------------------------------------------------------------------------------------------
5718
+  (0.0ms) SAVEPOINT active_record_1
5719
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5720
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5721
+  (0.8ms) rollback transaction
5722
+  (0.0ms) begin transaction
5723
+ -----------------------------------------------------------------------------------------------------------------------------------------------
5724
+ LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range.
5725
+ -----------------------------------------------------------------------------------------------------------------------------------------------
5726
+  (0.0ms) SAVEPOINT active_record_1
5727
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5728
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5729
+  (0.7ms) rollback transaction
5730
+  (0.0ms) begin transaction
5731
+ -----------------------------------------------------------------------------------------------------------------------
5732
+ LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
5733
+ -----------------------------------------------------------------------------------------------------------------------
5734
+  (0.0ms) SAVEPOINT active_record_1
5735
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5736
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5737
+  (0.8ms) rollback transaction
5738
+  (0.0ms) begin transaction
5739
+ ------------------------------------------------------------------------------
5740
+ LargeTextField::OwnerTest: test_: a large text field should read from a file.
5741
+ ------------------------------------------------------------------------------
5742
+  (0.0ms) SAVEPOINT active_record_1
5743
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5744
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5745
+  (0.0ms) SAVEPOINT active_record_1
5746
+ SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5747
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5748
+  (0.1ms) SAVEPOINT active_record_1
5749
+ SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 2], ["owner_type", "Library"], ["field_name", "description"], ["value", "this is a string from the file"]]
5750
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5751
+ Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
5752
+ LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
5753
+  (0.9ms) rollback transaction
5754
+  (0.1ms) begin transaction
5755
+ ------------------------------------------------------------------------------------------------------------------
5756
+ LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
5757
+ ------------------------------------------------------------------------------------------------------------------
5758
+  (0.0ms) SAVEPOINT active_record_1
5759
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5760
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5761
+  (0.0ms) SAVEPOINT active_record_1
5762
+ SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
5763
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
5764
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5765
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
5766
+  (0.0ms) SAVEPOINT active_record_1
5767
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
5768
+ SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "The main research library of the University of Cambridge in England"], ["id", 1]]
5769
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5770
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
5771
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
5772
+  (0.8ms) rollback transaction
5773
+  (0.0ms) begin transaction
5774
+ -------------------------------------------------------------------------------------------------
5775
+ LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
5776
+ -------------------------------------------------------------------------------------------------
5777
+  (0.0ms) SAVEPOINT active_record_1
5778
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5779
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5780
+  (1.0ms) rollback transaction
5781
+  (0.0ms) begin transaction
5782
+ ------------------------------------------------------------------------------------------------------------
5783
+ LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
5784
+ ------------------------------------------------------------------------------------------------------------
5785
+  (0.0ms) SAVEPOINT active_record_1
5786
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5787
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5788
+  (0.8ms) rollback transaction
5789
+  (0.0ms) begin transaction
5790
+ -----------------------------------------------------------------------------------------
5791
+ LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
5792
+ -----------------------------------------------------------------------------------------
5793
+  (0.0ms) SAVEPOINT active_record_1
5794
+ SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5795
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5796
+  (1.8ms) rollback transaction
5797
+  (0.1ms) begin transaction
5798
+ ----------------------------------------------------------------------------------------------------------------
5799
+ LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
5800
+ ----------------------------------------------------------------------------------------------------------------
5801
+  (0.0ms) SAVEPOINT active_record_1
5802
+ SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5803
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5804
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5805
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5806
+  (0.7ms) rollback transaction
5807
+  (0.0ms) begin transaction
5808
+ --------------------------------------------------------------------------------------------------------------------
5809
+ LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
5810
+ --------------------------------------------------------------------------------------------------------------------
5811
+  (0.0ms) SAVEPOINT active_record_1
5812
+ SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
5813
+ SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]
5814
+  (0.0ms) RELEASE SAVEPOINT active_record_1
5815
+ Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
5816
+ LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
5817
+  (0.9ms) rollback transaction
5818
+  (0.0ms) begin transaction
5819
+ -----------------------------------------------------------------------------------------------------------------
5820
+ LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
5821
+ -----------------------------------------------------------------------------------------------------------------
5822
+  (0.1ms) SAVEPOINT active_record_1
5823
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
5824
+  (0.0ms) rollback transaction
5825
+  (0.0ms) begin transaction
5826
+ ------------------------------
5827
+ LargeTextFieldTest: test_truth
5034
5828
  ------------------------------
5035
5829
   (0.0ms) rollback transaction
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: large_text_field
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-06 00:00:00.000000000 Z
11
+ date: 2020-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: protected_attributes
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.2'
47
+ version: '2.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '2.2'
54
+ version: '2.0'
55
55
  description: Large text fields are kept in a central table, and polymorphically associated
56
56
  with your models. Access and assignemnt should behave as if it was a column on
57
57
  the same table.