large_text_field 0.3.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -2
- data/lib/large_text_field.rb +0 -2
- data/lib/large_text_field/named_text_value.rb +0 -4
- data/lib/large_text_field/version.rb +1 -1
- data/test/dummy/app/models/library.rb +0 -1
- data/test/dummy/config/database.yml +1 -1
- data/test/dummy/config/environments/development.rb +0 -3
- data/test/dummy/config/environments/test.rb +0 -3
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/test.current.sqlite3 +0 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +23 -18
- data/test/dummy/log/test.log +4271 -1109
- data/test/reports/{TEST-LargeTextField-LibraryTest.xml → current/TEST-LargeTextField-LibraryTest.xml} +3 -3
- data/test/reports/{TEST-LargeTextField-NamedTextValueTest.xml → current/TEST-LargeTextField-NamedTextValueTest.xml} +6 -6
- data/test/reports/{TEST-LargeTextField-OwnerTest.xml → current/TEST-LargeTextField-OwnerTest.xml} +24 -24
- data/test/reports/current/TEST-LargeTextFieldTest.xml +7 -0
- data/test/test_helper.rb +3 -1
- metadata +20 -26
- data/test/reports/TEST-LargeTextFieldTest.xml +0 -7
@@ -1,9 +1,9 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<testsuites>
|
3
|
-
<testsuite name="LargeTextField::LibraryTest" filepath="/Users/
|
4
|
-
<testcase name="test_: LargeTextField::Library should be able to construct a library. " lineno="7" classname="LargeTextField::LibraryTest" assertions="2" time="0.
|
3
|
+
<testsuite name="LargeTextField::LibraryTest" filepath="/Users/jebentier/invoca/large_text_field/test/unit/dummy/library_test.rb" skipped="0" failures="0" errors="0" tests="2" assertions="2" time="0.01392800034955144">
|
4
|
+
<testcase name="test_: LargeTextField::Library should be able to construct a library. " lineno="7" classname="LargeTextField::LibraryTest" assertions="2" time="0.011233000084757805">
|
5
5
|
</testcase>
|
6
|
-
<testcase name="test_: LargeTextField::Library should be able to dup a class that has no current large text field. " lineno="20" classname="LargeTextField::LibraryTest" assertions="0" time="0.
|
6
|
+
<testcase name="test_: LargeTextField::Library should be able to dup a class that has no current large text field. " lineno="20" classname="LargeTextField::LibraryTest" assertions="0" time="0.0026950002647936344">
|
7
7
|
</testcase>
|
8
8
|
</testsuite>
|
9
9
|
</testsuites>
|
@@ -1,15 +1,15 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<testsuites>
|
3
|
-
<testsuite name="LargeTextField::NamedTextValueTest" filepath="/Users/
|
4
|
-
<testcase name="test_: LargeTextField::NamedTextValue should belong to owner. " lineno="346" classname="LargeTextField::NamedTextValueTest" assertions="1" time="0.
|
3
|
+
<testsuite name="LargeTextField::NamedTextValueTest" filepath="/Users/jebentier/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/shoulda-context-1.2.2/lib/shoulda/context/context.rb" skipped="0" failures="0" errors="0" tests="5" assertions="9" time="0.04323700023815036">
|
4
|
+
<testcase name="test_: LargeTextField::NamedTextValue should belong to owner. " lineno="346" classname="LargeTextField::NamedTextValueTest" assertions="1" time="0.002053000032901764">
|
5
5
|
</testcase>
|
6
|
-
<testcase name="test_: LargeTextField::NamedTextValue should have field name and value attributes. " lineno="11" classname="LargeTextField::NamedTextValueTest" assertions="6" time="0.
|
6
|
+
<testcase name="test_: LargeTextField::NamedTextValue should have field name and value attributes. " lineno="11" classname="LargeTextField::NamedTextValueTest" assertions="6" time="0.013486000243574381">
|
7
7
|
</testcase>
|
8
|
-
<testcase name="test_: LargeTextField::NamedTextValue should use large_text_fields as the table name. " lineno="7" classname="LargeTextField::NamedTextValueTest" assertions="1" time="0.
|
8
|
+
<testcase name="test_: LargeTextField::NamedTextValue should use large_text_fields as the table name. " lineno="7" classname="LargeTextField::NamedTextValueTest" assertions="1" time="0.0011599999852478504">
|
9
9
|
</testcase>
|
10
|
-
<testcase name="test_: unique index should allow different owners and field names. " lineno="36" classname="LargeTextField::NamedTextValueTest" assertions="0" time="0.
|
10
|
+
<testcase name="test_: unique index should allow different owners and field names. " lineno="36" classname="LargeTextField::NamedTextValueTest" assertions="0" time="0.01757899997755885">
|
11
11
|
</testcase>
|
12
|
-
<testcase name="test_: unique index should raise a unique constraint failure on the same owner, and field name. " lineno="27" classname="LargeTextField::NamedTextValueTest" assertions="1" time="0.
|
12
|
+
<testcase name="test_: unique index should raise a unique constraint failure on the same owner, and field name. " lineno="27" classname="LargeTextField::NamedTextValueTest" assertions="1" time="0.008958999998867512">
|
13
13
|
</testcase>
|
14
14
|
</testsuite>
|
15
15
|
</testsuites>
|
data/test/reports/{TEST-LargeTextField-OwnerTest.xml → current/TEST-LargeTextField-OwnerTest.xml}
RENAMED
@@ -1,51 +1,51 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<testsuites>
|
3
|
-
<testsuite name="LargeTextField::OwnerTest" filepath="/Users/
|
4
|
-
<testcase name="test_: a large text field should allow a custom maximum length to be provided. " lineno="135" classname="LargeTextField::OwnerTest" assertions="3" time="0.
|
3
|
+
<testsuite name="LargeTextField::OwnerTest" filepath="/Users/jebentier/invoca/large_text_field/test/unit/large_text_field/owner_test.rb" skipped="0" failures="0" errors="0" tests="23" assertions="98" time="0.26905300142243505">
|
4
|
+
<testcase name="test_: a large text field should allow a custom maximum length to be provided. " lineno="135" classname="LargeTextField::OwnerTest" assertions="3" time="0.032752000261098146">
|
5
5
|
</testcase>
|
6
|
-
<testcase name="test_: a large text field should allow for concurrent sets and deletes. " lineno="84" classname="LargeTextField::OwnerTest" assertions="9" time="0.
|
6
|
+
<testcase name="test_: a large text field should allow for concurrent sets and deletes. " lineno="84" classname="LargeTextField::OwnerTest" assertions="9" time="0.013085000216960907">
|
7
7
|
</testcase>
|
8
|
-
<testcase name="test_: a large text field should allow get and set with saves and deletes. " lineno="61" classname="LargeTextField::OwnerTest" assertions="7" time="0.
|
8
|
+
<testcase name="test_: a large text field should allow get and set with saves and deletes. " lineno="61" classname="LargeTextField::OwnerTest" assertions="7" time="0.014650000259280205">
|
9
9
|
</testcase>
|
10
|
-
<testcase name="test_: a large text field should be able to be eager loaded. " lineno="244" classname="LargeTextField::OwnerTest" assertions="3" time="0.
|
10
|
+
<testcase name="test_: a large text field should be able to be eager loaded. " lineno="244" classname="LargeTextField::OwnerTest" assertions="3" time="0.015831999946385622">
|
11
11
|
</testcase>
|
12
|
-
<testcase name="test_: a large text field should be able to update deleted fields. " lineno="194" classname="LargeTextField::OwnerTest" assertions="7" time="0.
|
12
|
+
<testcase name="test_: a large text field should be able to update deleted fields. " lineno="194" classname="LargeTextField::OwnerTest" assertions="7" time="0.015867999754846096">
|
13
13
|
</testcase>
|
14
|
-
<testcase name="test_: a large text field should be cloned with the rest of the record. " lineno="218" classname="LargeTextField::OwnerTest" assertions="9" time="0.
|
14
|
+
<testcase name="test_: a large text field should be cloned with the rest of the record. " lineno="218" classname="LargeTextField::OwnerTest" assertions="9" time="0.018189999740570784">
|
15
15
|
</testcase>
|
16
|
-
<testcase name="test_: a large text field should declare the association when it is first described and other meta data when it is first defined. " lineno="35" classname="LargeTextField::OwnerTest" assertions="3" time="0.
|
16
|
+
<testcase name="test_: a large text field should declare the association when it is first described and other meta data when it is first defined. " lineno="35" classname="LargeTextField::OwnerTest" assertions="3" time="0.004155999980866909">
|
17
17
|
</testcase>
|
18
|
-
<testcase name="test_: a large text field should delete fields when they are set to blank. " lineno="173" classname="LargeTextField::OwnerTest" assertions="6" time="0.
|
18
|
+
<testcase name="test_: a large text field should delete fields when they are set to blank. " lineno="173" classname="LargeTextField::OwnerTest" assertions="6" time="0.014672000426799059">
|
19
19
|
</testcase>
|
20
|
-
<testcase name="test_: a large text field should delete large text fields when the owner is destroyed. " lineno="301" classname="LargeTextField::OwnerTest" assertions="4" time="0.
|
20
|
+
<testcase name="test_: a large text field should delete large text fields when the owner is destroyed. " lineno="301" classname="LargeTextField::OwnerTest" assertions="4" time="0.01027100021019578">
|
21
21
|
</testcase>
|
22
|
-
<testcase name="test_: a large text field should detect changes when @text_field_hash hash is/not empty. " lineno="268" classname="LargeTextField::OwnerTest" assertions="7" time="0.
|
22
|
+
<testcase name="test_: a large text field should detect changes when @text_field_hash hash is/not empty. " lineno="268" classname="LargeTextField::OwnerTest" assertions="7" time="0.008167000021785498">
|
23
23
|
</testcase>
|
24
|
-
<testcase name="test_: a large text field should forget about changes if they are not saved. " lineno="109" classname="LargeTextField::OwnerTest" assertions="3" time="0.
|
24
|
+
<testcase name="test_: a large text field should forget about changes if they are not saved. " lineno="109" classname="LargeTextField::OwnerTest" assertions="3" time="0.011673000175505877">
|
25
25
|
</testcase>
|
26
|
-
<testcase name="test_: a large text field should not save fields that are set to blank. " lineno="157" classname="LargeTextField::OwnerTest" assertions="5" time="0.
|
26
|
+
<testcase name="test_: a large text field should not save fields that are set to blank. " lineno="157" classname="LargeTextField::OwnerTest" assertions="5" time="0.009471999946981668">
|
27
27
|
</testcase>
|
28
|
-
<testcase name="test_: a large text field should only validate_large_text_fields if loaded. " lineno="285" classname="LargeTextField::OwnerTest" assertions="4" time="0.
|
28
|
+
<testcase name="test_: a large text field should only validate_large_text_fields if loaded. " lineno="285" classname="LargeTextField::OwnerTest" assertions="4" time="0.005114000290632248">
|
29
29
|
</testcase>
|
30
|
-
<testcase name="test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range. " lineno="147" classname="LargeTextField::OwnerTest" assertions="3" time="0.
|
30
|
+
<testcase name="test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range. " lineno="147" classname="LargeTextField::OwnerTest" assertions="3" time="0.004856999963521957">
|
31
31
|
</testcase>
|
32
|
-
<testcase name="test_: a large text field should prevent a non-Integer to be provided for a custom maximum. " lineno="141" classname="LargeTextField::OwnerTest" assertions="2" time="0.
|
32
|
+
<testcase name="test_: a large text field should prevent a non-Integer to be provided for a custom maximum. " lineno="141" classname="LargeTextField::OwnerTest" assertions="2" time="0.003192999865859747">
|
33
33
|
</testcase>
|
34
|
-
<testcase name="test_: a large text field should read from a file. " lineno="41" classname="LargeTextField::OwnerTest" assertions="3" time="0.
|
34
|
+
<testcase name="test_: a large text field should read from a file. " lineno="41" classname="LargeTextField::OwnerTest" assertions="3" time="0.015109000261873007">
|
35
35
|
</testcase>
|
36
|
-
<testcase name="test_: a large text field should reload changes when they come from a different model. " lineno="292" classname="LargeTextField::OwnerTest" assertions="2" time="0.
|
36
|
+
<testcase name="test_: a large text field should reload changes when they come from a different model. " lineno="292" classname="LargeTextField::OwnerTest" assertions="2" time="0.012649000156670809">
|
37
37
|
</testcase>
|
38
|
-
<testcase name="test_: a large text field should singularize the errors if requested. " lineno="129" classname="LargeTextField::OwnerTest" assertions="3" time="0.
|
38
|
+
<testcase name="test_: a large text field should singularize the errors if requested. " lineno="129" classname="LargeTextField::OwnerTest" assertions="3" time="0.013137999922037125">
|
39
39
|
</testcase>
|
40
|
-
<testcase name="test_: a large text field should support strings or symbols for get/set methods. " lineno="256" classname="LargeTextField::OwnerTest" assertions="7" time="0.
|
40
|
+
<testcase name="test_: a large text field should support strings or symbols for get/set methods. " lineno="256" classname="LargeTextField::OwnerTest" assertions="7" time="0.006538000423461199">
|
41
41
|
</testcase>
|
42
|
-
<testcase name="test_: a large text field should validate the maximum length. " lineno="123" classname="LargeTextField::OwnerTest" assertions="3" time="0.
|
42
|
+
<testcase name="test_: a large text field should validate the maximum length. " lineno="123" classname="LargeTextField::OwnerTest" assertions="3" time="0.011657999828457832">
|
43
43
|
</testcase>
|
44
|
-
<testcase name="test_: updating in large_text_field_save hook should be able to assign empty string. " lineno="9" classname="LargeTextField::OwnerTest" assertions="2" time="0.
|
44
|
+
<testcase name="test_: updating in large_text_field_save hook should be able to assign empty string. " lineno="9" classname="LargeTextField::OwnerTest" assertions="2" time="0.0056409998796880245">
|
45
45
|
</testcase>
|
46
|
-
<testcase name="test_: updating in large_text_field_save hook should be able to assign non empty string. " lineno="9" classname="LargeTextField::OwnerTest" assertions="2" time="0.
|
46
|
+
<testcase name="test_: updating in large_text_field_save hook should be able to assign non empty string. " lineno="9" classname="LargeTextField::OwnerTest" assertions="2" time="0.0075889998115599155">
|
47
47
|
</testcase>
|
48
|
-
<testcase name="test_: updating in large_text_field_save hook should raise error on saving nil value. " lineno="19" classname="LargeTextField::OwnerTest" assertions="1" time="0.
|
48
|
+
<testcase name="test_: updating in large_text_field_save hook should raise error on saving nil value. " lineno="19" classname="LargeTextField::OwnerTest" assertions="1" time="0.014779000077396631">
|
49
49
|
</testcase>
|
50
50
|
</testsuite>
|
51
51
|
</testsuites>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<testsuites>
|
3
|
+
<testsuite name="LargeTextFieldTest" filepath="/Users/jebentier/invoca/large_text_field/test/large_text_field_test.rb" skipped="0" failures="0" errors="0" tests="1" assertions="1" time="0.0006389999762177467">
|
4
|
+
<testcase name="test_truth" lineno="6" classname="LargeTextFieldTest" assertions="1" time="0.0006389999762177467">
|
5
|
+
</testcase>
|
6
|
+
</testsuite>
|
7
|
+
</testsuites>
|
data/test/test_helper.rb
CHANGED
@@ -8,9 +8,11 @@ require "rr"
|
|
8
8
|
require "shoulda"
|
9
9
|
require "minitest/unit"
|
10
10
|
require 'minitest/reporters'
|
11
|
+
|
12
|
+
junit_output_dir = ENV['JUNIT_OUTPUT_DIR'].presence || "test/reports"
|
11
13
|
Minitest::Reporters.use! [
|
12
14
|
Minitest::Reporters::DefaultReporter.new,
|
13
|
-
Minitest::Reporters::JUnitReporter.new
|
15
|
+
Minitest::Reporters::JUnitReporter.new(junit_output_dir)
|
14
16
|
]
|
15
17
|
|
16
18
|
require "pry"
|
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.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Invoca
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: invoca-utils
|
@@ -24,34 +24,26 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.3'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: protected_attributes
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '1.1'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '1.1'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: rails
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
44
30
|
requirements:
|
45
|
-
- - "
|
31
|
+
- - ">="
|
46
32
|
- !ruby/object:Gem::Version
|
47
33
|
version: '4.2'
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '7'
|
48
37
|
type: :runtime
|
49
38
|
prerelease: false
|
50
39
|
version_requirements: !ruby/object:Gem::Requirement
|
51
40
|
requirements:
|
52
|
-
- - "
|
41
|
+
- - ">="
|
53
42
|
- !ruby/object:Gem::Version
|
54
43
|
version: '4.2'
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '7'
|
55
47
|
description: Large text fields are kept in a central table, and polymorphically associated
|
56
48
|
with your models. Access and assignment should behave as if it was a column on
|
57
49
|
the same table.
|
@@ -85,6 +77,7 @@ files:
|
|
85
77
|
- test/dummy/db/development.sqlite3
|
86
78
|
- test/dummy/db/migrate/20160217033529_create_libraries.rb
|
87
79
|
- test/dummy/db/schema.rb
|
80
|
+
- test/dummy/db/test.current.sqlite3
|
88
81
|
- test/dummy/db/test.sqlite3
|
89
82
|
- test/dummy/log/development.log
|
90
83
|
- test/dummy/log/test.log
|
@@ -92,10 +85,10 @@ files:
|
|
92
85
|
- test/dummy/test/fixtures/text_field_owners.yml
|
93
86
|
- test/fixtures/large_text_field/named_text_values.yml
|
94
87
|
- test/large_text_field_test.rb
|
95
|
-
- test/reports/TEST-LargeTextField-LibraryTest.xml
|
96
|
-
- test/reports/TEST-LargeTextField-NamedTextValueTest.xml
|
97
|
-
- test/reports/TEST-LargeTextField-OwnerTest.xml
|
98
|
-
- test/reports/TEST-LargeTextFieldTest.xml
|
88
|
+
- test/reports/current/TEST-LargeTextField-LibraryTest.xml
|
89
|
+
- test/reports/current/TEST-LargeTextField-NamedTextValueTest.xml
|
90
|
+
- test/reports/current/TEST-LargeTextField-OwnerTest.xml
|
91
|
+
- test/reports/current/TEST-LargeTextFieldTest.xml
|
99
92
|
- test/test_helper.rb
|
100
93
|
- test/unit/dummy/library_test.rb
|
101
94
|
- test/unit/large_text_field/name_text_value_test.rb
|
@@ -142,6 +135,7 @@ test_files:
|
|
142
135
|
- test/dummy/Rakefile
|
143
136
|
- test/dummy/db/schema.rb
|
144
137
|
- test/dummy/db/test.sqlite3
|
138
|
+
- test/dummy/db/test.current.sqlite3
|
145
139
|
- test/dummy/db/migrate/20160217033529_create_libraries.rb
|
146
140
|
- test/dummy/db/development.sqlite3
|
147
141
|
- test/dummy/log/test.log
|
@@ -150,7 +144,7 @@ test_files:
|
|
150
144
|
- test/large_text_field_test.rb
|
151
145
|
- test/fixtures/large_text_field/named_text_values.yml
|
152
146
|
- test/test_helper.rb
|
153
|
-
- test/reports/TEST-LargeTextField-OwnerTest.xml
|
154
|
-
- test/reports/TEST-LargeTextField-NamedTextValueTest.xml
|
155
|
-
- test/reports/TEST-LargeTextField-LibraryTest.xml
|
156
|
-
- test/reports/TEST-LargeTextFieldTest.xml
|
147
|
+
- test/reports/current/TEST-LargeTextField-OwnerTest.xml
|
148
|
+
- test/reports/current/TEST-LargeTextField-NamedTextValueTest.xml
|
149
|
+
- test/reports/current/TEST-LargeTextField-LibraryTest.xml
|
150
|
+
- test/reports/current/TEST-LargeTextFieldTest.xml
|
@@ -1,7 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<testsuites>
|
3
|
-
<testsuite name="LargeTextFieldTest" filepath="/Users/mikeweaver/invoca/large_text_field/test/large_text_field_test.rb" skipped="0" failures="0" errors="0" tests="1" assertions="1" time="0.00060299999313429">
|
4
|
-
<testcase name="test_truth" lineno="6" classname="LargeTextFieldTest" assertions="1" time="0.00060299999313429">
|
5
|
-
</testcase>
|
6
|
-
</testsuite>
|
7
|
-
</testsuites>
|