large_text_field 1.0.1 → 1.0.2.pre.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/large_text_field/owner.rb +2 -2
- data/lib/large_text_field/version.rb +1 -1
- data/test/dummy/config/database.yml +12 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/schema.rb +10 -9
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +39 -0
- data/test/dummy/log/test.log +2893 -0
- data/test/reports/TEST-LargeTextField-LibraryTest.xml +9 -0
- data/test/reports/TEST-LargeTextField-NamedTextValueTest.xml +15 -0
- data/test/reports/TEST-LargeTextField-OwnerTest.xml +53 -0
- data/test/reports/TEST-LargeTextFieldTest.xml +7 -0
- data/test/test_helper.rb +1 -1
- data/test/unit/large_text_field/owner_test.rb +4 -0
- metadata +19 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02daae5b81c9b3ebef6f0e373e74a773df8bbdaa62df75c09b24b5743dc0fe55
|
4
|
+
data.tar.gz: c87ac6a50da96644a853cb70dc976644bc21dd44a8c0d1b8e70fe90a8b459ac8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 413ecb6c2949f64ffb298c9ce35cabd57e4791ad5994cd67b6d26f1092baf90430279910d7b0ac00412753628e4973059ac62df66dfb9f60184c247e81745639
|
7
|
+
data.tar.gz: c809eabe4ee4995de694d5fa41fbaac7e6df37cd36812136389837dc41e58a7310b40b224c1638f682b3be1835fd56a14395199be47d2f3c308a9da964b67322
|
@@ -12,11 +12,23 @@ development:
|
|
12
12
|
# Warning: The database defined as "test" will be erased and
|
13
13
|
# re-generated from your development database when you run "rake".
|
14
14
|
# Do not set this db to the same as development or production.
|
15
|
+
<% if ENV["USE_MYSQL_DB"] %>
|
16
|
+
test:
|
17
|
+
adapter: mysql2
|
18
|
+
encoding: utf8
|
19
|
+
reconnect: false
|
20
|
+
database: large_text_field_test
|
21
|
+
pool: 5
|
22
|
+
username: <%= ENV['DATABASE_MYSQL_USERNAME'] || 'root' %>
|
23
|
+
password: <%= ENV['DATABASE_MYSQL_PASSWORD'] || '' %>
|
24
|
+
host: <%= ENV['DATABASE_MYSQL_HOST'] || 'localhost' %>
|
25
|
+
<% else %>
|
15
26
|
test:
|
16
27
|
adapter: sqlite3
|
17
28
|
database: <%= ENV['TEST_DB'].presence || 'db/test.sqlite3' %>
|
18
29
|
pool: 5
|
19
30
|
timeout: 5000
|
31
|
+
<% end %>
|
20
32
|
|
21
33
|
production:
|
22
34
|
adapter: sqlite3
|
File without changes
|
data/test/dummy/db/schema.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# encoding: UTF-8
|
3
2
|
# This file is auto-generated from the current state of the database. Instead
|
4
3
|
# of editing this file, please use the migrations feature of Active Record to
|
5
4
|
# incrementally modify your database, and then regenerate this schema definition.
|
@@ -12,17 +11,19 @@
|
|
12
11
|
#
|
13
12
|
# It's strongly recommended that you check this file into your version control system.
|
14
13
|
|
15
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20160217033529) do
|
15
|
+
|
16
16
|
create_table "large_text_fields", force: :cascade do |t|
|
17
|
-
t.string "field_name", null: false
|
18
|
-
t.text "value",
|
19
|
-
t.integer "owner_id",
|
20
|
-
t.string "owner_type",
|
17
|
+
t.string "field_name", limit: 255, null: false
|
18
|
+
t.text "value", limit: 16777215
|
19
|
+
t.integer "owner_id", limit: 4, null: false
|
20
|
+
t.string "owner_type", limit: 255, null: false
|
21
21
|
end
|
22
22
|
|
23
|
-
add_index "large_text_fields",
|
23
|
+
add_index "large_text_fields", ["owner_type", "owner_id", "field_name"], name: "large_text_field_by_owner_field", unique: true, using: :btree
|
24
24
|
|
25
25
|
create_table "libraries", force: :cascade do |t|
|
26
|
-
t.string "name", null: false
|
26
|
+
t.string "name", limit: 255, null: false
|
27
27
|
end
|
28
|
+
|
28
29
|
end
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -0,0 +1,39 @@
|
|
1
|
+
[1m[36m (2.3ms)[0m [1mCREATE TABLE "large_text_fields" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "field_name" varchar NOT NULL, "value" text(16777215), "owner_id" integer NOT NULL, "owner_type" varchar NOT NULL) [0m
|
2
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
3
|
+
[1m[36m (1.7ms)[0m [1mCREATE UNIQUE INDEX "large_text_field_by_owner_field" ON "large_text_fields" ("owner_type", "owner_id", "field_name")[0m
|
4
|
+
[1m[35m (1.7ms)[0m CREATE TABLE "libraries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL)
|
5
|
+
[1m[36m (1.5ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
6
|
+
[1m[35m (1.4ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
7
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
8
|
+
[1m[35m (1.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160217033529')
|
9
|
+
[1m[36m (1.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20110217210640')[0m
|
10
|
+
[1m[35m (1.8ms)[0m DROP TABLE "large_text_fields"
|
11
|
+
[1m[36m (1.4ms)[0m [1mCREATE TABLE "large_text_fields" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "field_name" varchar NOT NULL, "value" text(16777215), "owner_id" integer NOT NULL, "owner_type" varchar NOT NULL) [0m
|
12
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
13
|
+
[1m[36m (6.1ms)[0m [1mCREATE UNIQUE INDEX "large_text_field_by_owner_field" ON "large_text_fields" ("owner_type", "owner_id", "field_name")[0m
|
14
|
+
[1m[35m (1.3ms)[0m DROP TABLE "libraries"
|
15
|
+
[1m[36m (1.6ms)[0m [1mCREATE TABLE "libraries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL) [0m
|
16
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
17
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
18
|
+
[1m[36m (1.6ms)[0m [1mDROP TABLE "large_text_fields"[0m
|
19
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "large_text_fields" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "field_name" varchar NOT NULL, "value" text(16777215), "owner_id" integer NOT NULL, "owner_type" varchar NOT NULL)
|
20
|
+
[1m[36m (0.0ms)[0m [1mselect sqlite_version(*)[0m
|
21
|
+
[1m[35m (1.2ms)[0m CREATE UNIQUE INDEX "large_text_field_by_owner_field" ON "large_text_fields" ("owner_type", "owner_id", "field_name")
|
22
|
+
[1m[36m (1.2ms)[0m [1mDROP TABLE "libraries"[0m
|
23
|
+
[1m[35m (1.0ms)[0m CREATE TABLE "libraries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL)
|
24
|
+
[1m[36m (0.3ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
25
|
+
[1m[35m (1.2ms)[0m DROP TABLE "large_text_fields"
|
26
|
+
[1m[36m (1.2ms)[0m [1mCREATE TABLE "large_text_fields" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "field_name" varchar NOT NULL, "value" text(16777215), "owner_id" integer NOT NULL, "owner_type" varchar NOT NULL) [0m
|
27
|
+
[1m[35m (0.0ms)[0m select sqlite_version(*)
|
28
|
+
[1m[36m (1.1ms)[0m [1mCREATE UNIQUE INDEX "large_text_field_by_owner_field" ON "large_text_fields" ("owner_type", "owner_id", "field_name")[0m
|
29
|
+
[1m[35m (1.1ms)[0m DROP TABLE "libraries"
|
30
|
+
[1m[36m (1.2ms)[0m [1mCREATE TABLE "libraries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL) [0m
|
31
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
32
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
33
|
+
[1m[36m (1.4ms)[0m [1mDROP TABLE "large_text_fields"[0m
|
34
|
+
[1m[35m (1.2ms)[0m CREATE TABLE "large_text_fields" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "field_name" varchar NOT NULL, "value" text(16777215), "owner_id" integer NOT NULL, "owner_type" varchar NOT NULL)
|
35
|
+
[1m[36m (0.0ms)[0m [1mselect sqlite_version(*)[0m
|
36
|
+
[1m[35m (1.1ms)[0m CREATE UNIQUE INDEX "large_text_field_by_owner_field" ON "large_text_fields" ("owner_type", "owner_id", "field_name")
|
37
|
+
[1m[36m (1.1ms)[0m [1mDROP TABLE "libraries"[0m
|
38
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "libraries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL)
|
39
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|