temporal_tables 1.1.0 → 3.0.0.pre.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +15 -11
  3. data/.rubocop.yml +30 -146
  4. data/.ruby-version +1 -1
  5. data/gemfiles/Gemfile.6.1.mysql +3 -0
  6. data/gemfiles/Gemfile.6.1.mysql.lock +147 -87
  7. data/gemfiles/Gemfile.6.1.pg +3 -0
  8. data/gemfiles/Gemfile.6.1.pg.lock +148 -88
  9. data/gemfiles/Gemfile.7.0.mysql +3 -0
  10. data/gemfiles/Gemfile.7.0.mysql.lock +150 -84
  11. data/gemfiles/Gemfile.7.0.pg +3 -0
  12. data/gemfiles/Gemfile.7.0.pg.lock +151 -85
  13. data/gemfiles/{Gemfile.6.0.mysql → Gemfile.7.1.mysql} +4 -1
  14. data/gemfiles/Gemfile.7.1.mysql.lock +266 -0
  15. data/gemfiles/{Gemfile.6.0.pg → Gemfile.7.1.pg} +4 -1
  16. data/gemfiles/Gemfile.7.1.pg.lock +266 -0
  17. data/lib/temporal_tables/arel_table.rb +1 -1
  18. data/lib/temporal_tables/association_extensions.rb +8 -0
  19. data/lib/temporal_tables/connection_adapters/mysql_adapter.rb +2 -2
  20. data/lib/temporal_tables/connection_adapters/postgresql_adapter.rb +2 -2
  21. data/lib/temporal_tables/constants.rb +5 -0
  22. data/lib/temporal_tables/temporal_adapter.rb +4 -3
  23. data/lib/temporal_tables/temporal_class.rb +4 -2
  24. data/lib/temporal_tables/version.rb +1 -1
  25. data/lib/temporal_tables.rb +2 -6
  26. data/spec/basic_history_spec.rb +39 -4
  27. data/spec/internal/app/models/bird/nest.rb +6 -0
  28. data/spec/internal/app/models/bird.rb +5 -0
  29. data/spec/internal/db/schema.rb +9 -0
  30. data/spec/spec_helper.rb +1 -1
  31. data/temporal_tables.gemspec +6 -4
  32. metadata +50 -19
  33. data/.travis.yml +0 -11
  34. data/gemfiles/Gemfile.6.0.mysql.lock +0 -171
  35. data/gemfiles/Gemfile.6.0.pg.lock +0 -176
  36. data/lib/temporal_tables/temporal_adapter_six_oh.rb +0 -207
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: temporal_tables
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 3.0.0.pre.rc.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brent Kroeker
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-14 00:00:00.000000000 Z
11
+ date: 2024-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '6.0'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '7.1'
22
+ version: '7.2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '6.0'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '7.1'
32
+ version: '7.2'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: combustion
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -64,14 +64,14 @@ dependencies:
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '0.6'
67
+ version: '0.8'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '0.6'
74
+ version: '0.8'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: mysql2
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -142,6 +142,34 @@ dependencies:
142
142
  - - ">="
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
+ - !ruby/object:Gem::Dependency
146
+ name: rubocop-rails
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ type: :development
153
+ prerelease: false
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
159
+ - !ruby/object:Gem::Dependency
160
+ name: rubocop-rspec
161
+ requirement: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - ">="
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: '0'
145
173
  description: |2
146
174
  Easily recall what your data looked like at any point in the past!
147
175
  TemporalTables sets up and maintains history tables to track all temporal changes to to your data.
@@ -156,16 +184,11 @@ files:
156
184
  - ".gitignore"
157
185
  - ".rubocop.yml"
158
186
  - ".ruby-version"
159
- - ".travis.yml"
160
187
  - Gemfile
161
188
  - LICENSE.txt
162
189
  - README.md
163
190
  - Rakefile
164
191
  - config.ru
165
- - gemfiles/Gemfile.6.0.mysql
166
- - gemfiles/Gemfile.6.0.mysql.lock
167
- - gemfiles/Gemfile.6.0.pg
168
- - gemfiles/Gemfile.6.0.pg.lock
169
192
  - gemfiles/Gemfile.6.1.mysql
170
193
  - gemfiles/Gemfile.6.1.mysql.lock
171
194
  - gemfiles/Gemfile.6.1.pg
@@ -174,21 +197,27 @@ files:
174
197
  - gemfiles/Gemfile.7.0.mysql.lock
175
198
  - gemfiles/Gemfile.7.0.pg
176
199
  - gemfiles/Gemfile.7.0.pg.lock
200
+ - gemfiles/Gemfile.7.1.mysql
201
+ - gemfiles/Gemfile.7.1.mysql.lock
202
+ - gemfiles/Gemfile.7.1.pg
203
+ - gemfiles/Gemfile.7.1.pg.lock
177
204
  - lib/temporal_tables.rb
178
205
  - lib/temporal_tables/arel_table.rb
179
206
  - lib/temporal_tables/association_extensions.rb
180
207
  - lib/temporal_tables/connection_adapters/mysql_adapter.rb
181
208
  - lib/temporal_tables/connection_adapters/postgresql_adapter.rb
209
+ - lib/temporal_tables/constants.rb
182
210
  - lib/temporal_tables/history_hook.rb
183
211
  - lib/temporal_tables/preloader_extensions.rb
184
212
  - lib/temporal_tables/reflection_extensions.rb
185
213
  - lib/temporal_tables/relation_extensions.rb
186
214
  - lib/temporal_tables/temporal_adapter.rb
187
- - lib/temporal_tables/temporal_adapter_six_oh.rb
188
215
  - lib/temporal_tables/temporal_class.rb
189
216
  - lib/temporal_tables/version.rb
190
217
  - lib/temporal_tables/whodunnit.rb
191
218
  - spec/basic_history_spec.rb
219
+ - spec/internal/app/models/bird.rb
220
+ - spec/internal/app/models/bird/nest.rb
192
221
  - spec/internal/app/models/broom.rb
193
222
  - spec/internal/app/models/cat.rb
194
223
  - spec/internal/app/models/cat_life.rb
@@ -210,7 +239,7 @@ homepage: ''
210
239
  licenses: []
211
240
  metadata:
212
241
  rubygems_mfa_required: 'true'
213
- post_install_message:
242
+ post_install_message:
214
243
  rdoc_options: []
215
244
  require_paths:
216
245
  - lib
@@ -218,19 +247,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
218
247
  requirements:
219
248
  - - ">="
220
249
  - !ruby/object:Gem::Version
221
- version: 2.5.0
250
+ version: 3.0.0
222
251
  required_rubygems_version: !ruby/object:Gem::Requirement
223
252
  requirements:
224
- - - ">="
253
+ - - ">"
225
254
  - !ruby/object:Gem::Version
226
- version: '0'
255
+ version: 1.3.1
227
256
  requirements: []
228
- rubygems_version: 3.2.3
229
- signing_key:
257
+ rubygems_version: 3.4.10
258
+ signing_key:
230
259
  specification_version: 4
231
260
  summary: Tracks all history of changes to a table automatically in a history table.
232
261
  test_files:
233
262
  - spec/basic_history_spec.rb
263
+ - spec/internal/app/models/bird.rb
264
+ - spec/internal/app/models/bird/nest.rb
234
265
  - spec/internal/app/models/broom.rb
235
266
  - spec/internal/app/models/cat.rb
236
267
  - spec/internal/app/models/cat_life.rb
data/.travis.yml DELETED
@@ -1,11 +0,0 @@
1
- rvm:
2
- - 3.0.0
3
-
4
- gemfile:
5
- - gemfiles/Gemfile.6.0.pg
6
- - gemfiles/Gemfile.6.1.pg
7
- - gemfiles/Gemfile.7.0.pg
8
-
9
- - gemfiles/Gemfile.6.0.mysql
10
- - gemfiles/Gemfile.6.1.mysql
11
- - gemfiles/Gemfile.7.0.mysql
@@ -1,171 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- temporal_tables (1.0.3)
5
- rails (>= 6.0, < 7.1)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- actioncable (6.0.4.4)
11
- actionpack (= 6.0.4.4)
12
- nio4r (~> 2.0)
13
- websocket-driver (>= 0.6.1)
14
- actionmailbox (6.0.4.4)
15
- actionpack (= 6.0.4.4)
16
- activejob (= 6.0.4.4)
17
- activerecord (= 6.0.4.4)
18
- activestorage (= 6.0.4.4)
19
- activesupport (= 6.0.4.4)
20
- mail (>= 2.7.1)
21
- actionmailer (6.0.4.4)
22
- actionpack (= 6.0.4.4)
23
- actionview (= 6.0.4.4)
24
- activejob (= 6.0.4.4)
25
- mail (~> 2.5, >= 2.5.4)
26
- rails-dom-testing (~> 2.0)
27
- actionpack (6.0.4.4)
28
- actionview (= 6.0.4.4)
29
- activesupport (= 6.0.4.4)
30
- rack (~> 2.0, >= 2.0.8)
31
- rack-test (>= 0.6.3)
32
- rails-dom-testing (~> 2.0)
33
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
34
- actiontext (6.0.4.4)
35
- actionpack (= 6.0.4.4)
36
- activerecord (= 6.0.4.4)
37
- activestorage (= 6.0.4.4)
38
- activesupport (= 6.0.4.4)
39
- nokogiri (>= 1.8.5)
40
- actionview (6.0.4.4)
41
- activesupport (= 6.0.4.4)
42
- builder (~> 3.1)
43
- erubi (~> 1.4)
44
- rails-dom-testing (~> 2.0)
45
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
46
- activejob (6.0.4.4)
47
- activesupport (= 6.0.4.4)
48
- globalid (>= 0.3.6)
49
- activemodel (6.0.4.4)
50
- activesupport (= 6.0.4.4)
51
- activerecord (6.0.4.4)
52
- activemodel (= 6.0.4.4)
53
- activesupport (= 6.0.4.4)
54
- activestorage (6.0.4.4)
55
- actionpack (= 6.0.4.4)
56
- activejob (= 6.0.4.4)
57
- activerecord (= 6.0.4.4)
58
- marcel (~> 1.0.0)
59
- activesupport (6.0.4.4)
60
- concurrent-ruby (~> 1.0, >= 1.0.2)
61
- i18n (>= 0.7, < 2)
62
- minitest (~> 5.1)
63
- tzinfo (~> 1.1)
64
- zeitwerk (~> 2.2, >= 2.2.2)
65
- builder (3.2.4)
66
- byebug (11.1.1)
67
- combustion (1.3.5)
68
- activesupport (>= 3.0.0)
69
- railties (>= 3.0.0)
70
- thor (>= 0.14.6)
71
- concurrent-ruby (1.1.9)
72
- crass (1.0.6)
73
- database_cleaner (1.8.3)
74
- diff-lcs (1.3)
75
- erubi (1.10.0)
76
- gemika (0.6.1)
77
- globalid (1.0.0)
78
- activesupport (>= 5.0)
79
- i18n (1.8.11)
80
- concurrent-ruby (~> 1.0)
81
- loofah (2.13.0)
82
- crass (~> 1.0.2)
83
- nokogiri (>= 1.5.9)
84
- mail (2.7.1)
85
- mini_mime (>= 0.1.1)
86
- marcel (1.0.2)
87
- method_source (1.0.0)
88
- mini_mime (1.1.2)
89
- mini_portile2 (2.6.1)
90
- minitest (5.15.0)
91
- mysql2 (0.5.3)
92
- nio4r (2.5.8)
93
- nokogiri (1.12.5)
94
- mini_portile2 (~> 2.6.1)
95
- racc (~> 1.4)
96
- racc (1.6.0)
97
- rack (2.2.3)
98
- rack-test (1.1.0)
99
- rack (>= 1.0, < 3)
100
- rails (6.0.4.4)
101
- actioncable (= 6.0.4.4)
102
- actionmailbox (= 6.0.4.4)
103
- actionmailer (= 6.0.4.4)
104
- actionpack (= 6.0.4.4)
105
- actiontext (= 6.0.4.4)
106
- actionview (= 6.0.4.4)
107
- activejob (= 6.0.4.4)
108
- activemodel (= 6.0.4.4)
109
- activerecord (= 6.0.4.4)
110
- activestorage (= 6.0.4.4)
111
- activesupport (= 6.0.4.4)
112
- bundler (>= 1.3.0)
113
- railties (= 6.0.4.4)
114
- sprockets-rails (>= 2.0.0)
115
- rails-dom-testing (2.0.3)
116
- activesupport (>= 4.2.0)
117
- nokogiri (>= 1.6)
118
- rails-html-sanitizer (1.4.2)
119
- loofah (~> 2.3)
120
- railties (6.0.4.4)
121
- actionpack (= 6.0.4.4)
122
- activesupport (= 6.0.4.4)
123
- method_source
124
- rake (>= 0.8.7)
125
- thor (>= 0.20.3, < 2.0)
126
- rake (13.0.6)
127
- rspec (3.9.0)
128
- rspec-core (~> 3.9.0)
129
- rspec-expectations (~> 3.9.0)
130
- rspec-mocks (~> 3.9.0)
131
- rspec-core (3.9.1)
132
- rspec-support (~> 3.9.1)
133
- rspec-expectations (3.9.1)
134
- diff-lcs (>= 1.2.0, < 2.0)
135
- rspec-support (~> 3.9.0)
136
- rspec-mocks (3.9.1)
137
- diff-lcs (>= 1.2.0, < 2.0)
138
- rspec-support (~> 3.9.0)
139
- rspec-support (3.9.2)
140
- sprockets (4.0.2)
141
- concurrent-ruby (~> 1.0)
142
- rack (> 1, < 3)
143
- sprockets-rails (3.4.2)
144
- actionpack (>= 5.2)
145
- activesupport (>= 5.2)
146
- sprockets (>= 3.0.0)
147
- thor (1.1.0)
148
- thread_safe (0.3.6)
149
- tzinfo (1.2.9)
150
- thread_safe (~> 0.1)
151
- websocket-driver (0.7.5)
152
- websocket-extensions (>= 0.1.0)
153
- websocket-extensions (0.1.5)
154
- zeitwerk (2.5.3)
155
-
156
- PLATFORMS
157
- ruby
158
-
159
- DEPENDENCIES
160
- byebug
161
- combustion
162
- database_cleaner
163
- gemika
164
- mysql2
165
- rails (~> 6.0.2)
166
- rake
167
- rspec (~> 3.4)
168
- temporal_tables!
169
-
170
- BUNDLED WITH
171
- 2.3.4
@@ -1,176 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- temporal_tables (1.0.3)
5
- rails (>= 6.0, < 7.1)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- actioncable (6.0.4.4)
11
- actionpack (= 6.0.4.4)
12
- nio4r (~> 2.0)
13
- websocket-driver (>= 0.6.1)
14
- actionmailbox (6.0.4.4)
15
- actionpack (= 6.0.4.4)
16
- activejob (= 6.0.4.4)
17
- activerecord (= 6.0.4.4)
18
- activestorage (= 6.0.4.4)
19
- activesupport (= 6.0.4.4)
20
- mail (>= 2.7.1)
21
- actionmailer (6.0.4.4)
22
- actionpack (= 6.0.4.4)
23
- actionview (= 6.0.4.4)
24
- activejob (= 6.0.4.4)
25
- mail (~> 2.5, >= 2.5.4)
26
- rails-dom-testing (~> 2.0)
27
- actionpack (6.0.4.4)
28
- actionview (= 6.0.4.4)
29
- activesupport (= 6.0.4.4)
30
- rack (~> 2.0, >= 2.0.8)
31
- rack-test (>= 0.6.3)
32
- rails-dom-testing (~> 2.0)
33
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
34
- actiontext (6.0.4.4)
35
- actionpack (= 6.0.4.4)
36
- activerecord (= 6.0.4.4)
37
- activestorage (= 6.0.4.4)
38
- activesupport (= 6.0.4.4)
39
- nokogiri (>= 1.8.5)
40
- actionview (6.0.4.4)
41
- activesupport (= 6.0.4.4)
42
- builder (~> 3.1)
43
- erubi (~> 1.4)
44
- rails-dom-testing (~> 2.0)
45
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
46
- activejob (6.0.4.4)
47
- activesupport (= 6.0.4.4)
48
- globalid (>= 0.3.6)
49
- activemodel (6.0.4.4)
50
- activesupport (= 6.0.4.4)
51
- activerecord (6.0.4.4)
52
- activemodel (= 6.0.4.4)
53
- activesupport (= 6.0.4.4)
54
- activestorage (6.0.4.4)
55
- actionpack (= 6.0.4.4)
56
- activejob (= 6.0.4.4)
57
- activerecord (= 6.0.4.4)
58
- marcel (~> 1.0.0)
59
- activesupport (6.0.4.4)
60
- concurrent-ruby (~> 1.0, >= 1.0.2)
61
- i18n (>= 0.7, < 2)
62
- minitest (~> 5.1)
63
- tzinfo (~> 1.1)
64
- zeitwerk (~> 2.2, >= 2.2.2)
65
- builder (3.2.4)
66
- byebug (11.1.3)
67
- combustion (1.3.5)
68
- activesupport (>= 3.0.0)
69
- railties (>= 3.0.0)
70
- thor (>= 0.14.6)
71
- concurrent-ruby (1.1.9)
72
- crass (1.0.6)
73
- database_cleaner (2.0.1)
74
- database_cleaner-active_record (~> 2.0.0)
75
- database_cleaner-active_record (2.0.1)
76
- activerecord (>= 5.a)
77
- database_cleaner-core (~> 2.0.0)
78
- database_cleaner-core (2.0.1)
79
- diff-lcs (1.5.0)
80
- erubi (1.10.0)
81
- gemika (0.6.1)
82
- globalid (1.0.0)
83
- activesupport (>= 5.0)
84
- i18n (1.8.11)
85
- concurrent-ruby (~> 1.0)
86
- loofah (2.13.0)
87
- crass (~> 1.0.2)
88
- nokogiri (>= 1.5.9)
89
- mail (2.7.1)
90
- mini_mime (>= 0.1.1)
91
- marcel (1.0.2)
92
- method_source (1.0.0)
93
- mini_mime (1.1.2)
94
- mini_portile2 (2.6.1)
95
- minitest (5.15.0)
96
- nio4r (2.5.8)
97
- nokogiri (1.12.5)
98
- mini_portile2 (~> 2.6.1)
99
- racc (~> 1.4)
100
- pg (1.2.3)
101
- racc (1.6.0)
102
- rack (2.2.3)
103
- rack-test (1.1.0)
104
- rack (>= 1.0, < 3)
105
- rails (6.0.4.4)
106
- actioncable (= 6.0.4.4)
107
- actionmailbox (= 6.0.4.4)
108
- actionmailer (= 6.0.4.4)
109
- actionpack (= 6.0.4.4)
110
- actiontext (= 6.0.4.4)
111
- actionview (= 6.0.4.4)
112
- activejob (= 6.0.4.4)
113
- activemodel (= 6.0.4.4)
114
- activerecord (= 6.0.4.4)
115
- activestorage (= 6.0.4.4)
116
- activesupport (= 6.0.4.4)
117
- bundler (>= 1.3.0)
118
- railties (= 6.0.4.4)
119
- sprockets-rails (>= 2.0.0)
120
- rails-dom-testing (2.0.3)
121
- activesupport (>= 4.2.0)
122
- nokogiri (>= 1.6)
123
- rails-html-sanitizer (1.4.2)
124
- loofah (~> 2.3)
125
- railties (6.0.4.4)
126
- actionpack (= 6.0.4.4)
127
- activesupport (= 6.0.4.4)
128
- method_source
129
- rake (>= 0.8.7)
130
- thor (>= 0.20.3, < 2.0)
131
- rake (13.0.6)
132
- rspec (3.10.0)
133
- rspec-core (~> 3.10.0)
134
- rspec-expectations (~> 3.10.0)
135
- rspec-mocks (~> 3.10.0)
136
- rspec-core (3.10.1)
137
- rspec-support (~> 3.10.0)
138
- rspec-expectations (3.10.1)
139
- diff-lcs (>= 1.2.0, < 2.0)
140
- rspec-support (~> 3.10.0)
141
- rspec-mocks (3.10.2)
142
- diff-lcs (>= 1.2.0, < 2.0)
143
- rspec-support (~> 3.10.0)
144
- rspec-support (3.10.3)
145
- sprockets (4.0.2)
146
- concurrent-ruby (~> 1.0)
147
- rack (> 1, < 3)
148
- sprockets-rails (3.4.2)
149
- actionpack (>= 5.2)
150
- activesupport (>= 5.2)
151
- sprockets (>= 3.0.0)
152
- thor (1.1.0)
153
- thread_safe (0.3.6)
154
- tzinfo (1.2.9)
155
- thread_safe (~> 0.1)
156
- websocket-driver (0.7.5)
157
- websocket-extensions (>= 0.1.0)
158
- websocket-extensions (0.1.5)
159
- zeitwerk (2.5.3)
160
-
161
- PLATFORMS
162
- ruby
163
-
164
- DEPENDENCIES
165
- byebug
166
- combustion
167
- database_cleaner
168
- gemika
169
- pg (>= 0.18, < 2.0)
170
- rails (~> 6.0.2)
171
- rake
172
- rspec (~> 3.4)
173
- temporal_tables!
174
-
175
- BUNDLED WITH
176
- 2.3.4