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.
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <testsuites>
3
+ <testsuite name="LargeTextField::LibraryTest" filepath="/Users/tstarck/invoca/large_text_field/test/unit/dummy/library_test.rb" skipped="0" failures="0" errors="0" tests="2" assertions="2" time="0.00797699997201562">
4
+ <testcase name="test_: LargeTextField::Library should be able to construct a library. " lineno="7" classname="LargeTextField::LibraryTest" assertions="2" time="0.005172000033780932">
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.002804999938234687">
7
+ </testcase>
8
+ </testsuite>
9
+ </testsuites>
@@ -0,0 +1,15 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <testsuites>
3
+ <testsuite name="LargeTextField::NamedTextValueTest" filepath="/Users/tstarck/.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.06121000007260591">
4
+ <testcase name="test_: LargeTextField::NamedTextValue should belong to owner. " lineno="346" classname="LargeTextField::NamedTextValueTest" assertions="1" time="0.003751999931409955">
5
+ </testcase>
6
+ <testcase name="test_: LargeTextField::NamedTextValue should have field name and value attributes. " lineno="11" classname="LargeTextField::NamedTextValueTest" assertions="6" time="0.0427560000680387">
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.0005510000046342611">
9
+ </testcase>
10
+ <testcase name="test_: unique index should allow different owners and field names. " lineno="36" classname="LargeTextField::NamedTextValueTest" assertions="0" time="0.009568999987095594">
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.004582000081427395">
13
+ </testcase>
14
+ </testsuite>
15
+ </testsuites>
@@ -0,0 +1,53 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <testsuites>
3
+ <testsuite name="LargeTextField::OwnerTest" filepath="/Users/tstarck/invoca/large_text_field/test/unit/large_text_field/owner_test.rb" skipped="0" failures="0" errors="0" tests="24" assertions="99" time="0.18328300002031028">
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.013416999951004982">
5
+ </testcase>
6
+ <testcase name="test_: a large text field should allow a single argument to be passed into reload. " lineno="301" classname="LargeTextField::OwnerTest" assertions="1" time="0.004912999924272299">
7
+ </testcase>
8
+ <testcase name="test_: a large text field should allow for concurrent sets and deletes. " lineno="84" classname="LargeTextField::OwnerTest" assertions="9" time="0.007678000023588538">
9
+ </testcase>
10
+ <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.014948999974876642">
11
+ </testcase>
12
+ <testcase name="test_: a large text field should be able to be eager loaded. " lineno="244" classname="LargeTextField::OwnerTest" assertions="3" time="0.01591099996585399">
13
+ </testcase>
14
+ <testcase name="test_: a large text field should be able to update deleted fields. " lineno="194" classname="LargeTextField::OwnerTest" assertions="7" time="0.008474000031128526">
15
+ </testcase>
16
+ <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.023695999989286065">
17
+ </testcase>
18
+ <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.0033099999418482184">
19
+ </testcase>
20
+ <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.009033999987877905">
21
+ </testcase>
22
+ <testcase name="test_: a large text field should delete large text fields when the owner is destroyed. " lineno="305" classname="LargeTextField::OwnerTest" assertions="4" time="0.006717000040225685">
23
+ </testcase>
24
+ <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.005818000063300133">
25
+ </testcase>
26
+ <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.006125000072643161">
27
+ </testcase>
28
+ <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.007122000097297132">
29
+ </testcase>
30
+ <testcase name="test_: a large text field should only validate_large_text_fields if loaded. " lineno="285" classname="LargeTextField::OwnerTest" assertions="4" time="0.00335600005928427">
31
+ </testcase>
32
+ <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.0030239999759942293">
33
+ </testcase>
34
+ <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.00317799998447299">
35
+ </testcase>
36
+ <testcase name="test_: a large text field should read from a file. " lineno="41" classname="LargeTextField::OwnerTest" assertions="3" time="0.01081999996677041">
37
+ </testcase>
38
+ <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.007147000054828823">
39
+ </testcase>
40
+ <testcase name="test_: a large text field should singularize the errors if requested. " lineno="129" classname="LargeTextField::OwnerTest" assertions="3" time="0.00828499998897314">
41
+ </testcase>
42
+ <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.002863000030629337">
43
+ </testcase>
44
+ <testcase name="test_: a large text field should validate the maximum length. " lineno="123" classname="LargeTextField::OwnerTest" assertions="3" time="0.007084999931976199">
45
+ </testcase>
46
+ <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.004567999974824488">
47
+ </testcase>
48
+ <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.004910999909043312">
49
+ </testcase>
50
+ <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.0008820000803098083">
51
+ </testcase>
52
+ </testsuite>
53
+ </testsuites>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <testsuites>
3
+ <testsuite name="LargeTextFieldTest" filepath="/Users/tstarck/invoca/large_text_field/test/large_text_field_test.rb" skipped="0" failures="0" errors="0" tests="1" assertions="1" time="0.00063699996098876">
4
+ <testcase name="test_truth" lineno="6" classname="LargeTextFieldTest" assertions="1" time="0.00063699996098876">
5
+ </testcase>
6
+ </testsuite>
7
+ </testsuites>
data/test/test_helper.rb CHANGED
@@ -9,7 +9,7 @@ require "shoulda"
9
9
  require "minitest/unit"
10
10
  require 'minitest/reporters'
11
11
 
12
- junit_output_dir = ENV['JUNIT_OUTPUT_DIR'].presence || "test/reports"
12
+ junit_output_dir = ENV['JUNIT_OUTPUT'].presence || "test/reports"
13
13
  Minitest::Reporters.use! [
14
14
  Minitest::Reporters::DefaultReporter.new,
15
15
  Minitest::Reporters::JUnitReporter.new(junit_output_dir)
@@ -298,6 +298,10 @@ module LargeTextField
298
298
  assert_equal "The main research library of the University of Cambridge in England", @library.reload.description
299
299
  end
300
300
 
301
+ should "allow a single argument to be passed into reload" do
302
+ Library.create!(name: "Cambridge University Library", description: "in england").reload(lock: true)
303
+ end
304
+
301
305
  should "delete large text fields when the owner is destroyed" do
302
306
  assert_equal 0, LargeTextField::NamedTextValue.count
303
307
 
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: 1.0.1
4
+ version: 1.0.2.pre.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Invoca
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-16 00:00:00.000000000 Z
11
+ date: 2021-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: invoca-utils
@@ -74,14 +74,20 @@ files:
74
74
  - test/dummy/config/environments/development.rb
75
75
  - test/dummy/config/environments/production.rb
76
76
  - test/dummy/config/environments/test.rb
77
+ - test/dummy/db/development.sqlite3
77
78
  - test/dummy/db/migrate/20160217033529_create_libraries.rb
78
79
  - test/dummy/db/schema.rb
79
80
  - test/dummy/db/test.sqlite3
81
+ - test/dummy/log/development.log
80
82
  - test/dummy/log/test.log
81
83
  - test/dummy/script/rails
82
84
  - test/dummy/test/fixtures/text_field_owners.yml
83
85
  - test/fixtures/large_text_field/named_text_values.yml
84
86
  - test/large_text_field_test.rb
87
+ - test/reports/TEST-LargeTextField-LibraryTest.xml
88
+ - test/reports/TEST-LargeTextField-NamedTextValueTest.xml
89
+ - test/reports/TEST-LargeTextField-OwnerTest.xml
90
+ - test/reports/TEST-LargeTextFieldTest.xml
85
91
  - test/test_helper.rb
86
92
  - test/unit/dummy/library_test.rb
87
93
  - test/unit/large_text_field/name_text_value_test.rb
@@ -90,7 +96,7 @@ homepage: http://github.com/invoca
90
96
  licenses: []
91
97
  metadata:
92
98
  allowed_push_host: https://rubygems.org
93
- post_install_message:
99
+ post_install_message:
94
100
  rdoc_options: []
95
101
  require_paths:
96
102
  - lib
@@ -101,12 +107,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
101
107
  version: '0'
102
108
  required_rubygems_version: !ruby/object:Gem::Requirement
103
109
  requirements:
104
- - - ">="
110
+ - - ">"
105
111
  - !ruby/object:Gem::Version
106
- version: '0'
112
+ version: 1.3.1
107
113
  requirements: []
108
114
  rubygems_version: 3.0.1
109
- signing_key:
115
+ signing_key:
110
116
  specification_version: 4
111
117
  summary: Add large text fields to models without database migrations
112
118
  test_files:
@@ -129,8 +135,14 @@ test_files:
129
135
  - test/dummy/db/schema.rb
130
136
  - test/dummy/db/test.sqlite3
131
137
  - test/dummy/db/migrate/20160217033529_create_libraries.rb
138
+ - test/dummy/db/development.sqlite3
132
139
  - test/dummy/log/test.log
140
+ - test/dummy/log/development.log
133
141
  - test/dummy/README.rdoc
134
142
  - test/large_text_field_test.rb
135
143
  - test/fixtures/large_text_field/named_text_values.yml
136
144
  - test/test_helper.rb
145
+ - test/reports/TEST-LargeTextField-OwnerTest.xml
146
+ - test/reports/TEST-LargeTextField-NamedTextValueTest.xml
147
+ - test/reports/TEST-LargeTextField-LibraryTest.xml
148
+ - test/reports/TEST-LargeTextFieldTest.xml