historiographer 4.0.0 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +115 -39
- data/lib/historiographer/configuration.rb +36 -0
- data/lib/historiographer/history.rb +9 -2
- data/lib/historiographer/history_migration.rb +9 -6
- data/lib/historiographer/relation.rb +1 -1
- data/lib/historiographer/version.rb +3 -0
- data/lib/historiographer.rb +176 -11
- metadata +3 -30
- data/.document +0 -5
- data/.rspec +0 -1
- data/.ruby-version +0 -1
- data/.standalone_migrations +0 -6
- data/Gemfile +0 -34
- data/Gemfile.lock +0 -289
- data/Guardfile +0 -70
- data/Rakefile +0 -54
- data/VERSION +0 -1
- data/historiographer.gemspec +0 -106
- data/init.rb +0 -18
- data/spec/db/database.yml +0 -25
- data/spec/db/migrate/20161121212228_create_posts.rb +0 -19
- data/spec/db/migrate/20161121212229_create_post_histories.rb +0 -10
- data/spec/db/migrate/20161121212230_create_authors.rb +0 -13
- data/spec/db/migrate/20161121212231_create_author_histories.rb +0 -10
- data/spec/db/migrate/20161121212232_create_users.rb +0 -9
- data/spec/db/migrate/20171011194624_create_safe_posts.rb +0 -19
- data/spec/db/migrate/20171011194715_create_safe_post_histories.rb +0 -9
- data/spec/db/migrate/20191024142304_create_thing_with_compound_index.rb +0 -10
- data/spec/db/migrate/20191024142352_create_thing_with_compound_index_history.rb +0 -11
- data/spec/db/migrate/20191024203106_create_thing_without_history.rb +0 -7
- data/spec/db/migrate/20221018204220_create_silent_posts.rb +0 -21
- data/spec/db/migrate/20221018204255_create_silent_post_histories.rb +0 -9
- data/spec/db/schema.rb +0 -186
- data/spec/examples.txt +0 -32
- data/spec/factories/post.rb +0 -7
- data/spec/historiographer_spec.rb +0 -588
- data/spec/spec_helper.rb +0 -52
data/.document
DELETED
data/.rspec
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
--color
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
3.0.2
|
data/.standalone_migrations
DELETED
data/Gemfile
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
source 'https://rubygems.org'
|
4
|
-
ruby '3.0.2'
|
5
|
-
|
6
|
-
gem 'activerecord', '>= 6'
|
7
|
-
gem 'activerecord-import'
|
8
|
-
gem 'activesupport'
|
9
|
-
gem 'rails', '>= 6'
|
10
|
-
gem 'rollbar'
|
11
|
-
|
12
|
-
group :development, :test do
|
13
|
-
gem 'mysql2', '0.5'
|
14
|
-
gem 'paranoia'
|
15
|
-
gem 'pg'
|
16
|
-
gem 'pry'
|
17
|
-
gem 'standalone_migrations'
|
18
|
-
gem 'timecop'
|
19
|
-
end
|
20
|
-
|
21
|
-
group :development do
|
22
|
-
gem 'bundler', '~> 1.0'
|
23
|
-
gem 'jeweler', git: 'https://github.com/technicalpickles/jeweler', branch: 'master'
|
24
|
-
gem 'rdoc', '~> 3.12'
|
25
|
-
gem 'simplecov', '>= 0'
|
26
|
-
end
|
27
|
-
|
28
|
-
group :test do
|
29
|
-
gem 'database_cleaner'
|
30
|
-
gem 'factory_bot_rails'
|
31
|
-
gem 'guard'
|
32
|
-
gem 'guard-rspec'
|
33
|
-
gem 'rspec'
|
34
|
-
end
|
data/Gemfile.lock
DELETED
@@ -1,289 +0,0 @@
|
|
1
|
-
GIT
|
2
|
-
remote: https://github.com/technicalpickles/jeweler
|
3
|
-
revision: 2ab86309fc2494ba2a4e9c86c514742cd4f681c2
|
4
|
-
branch: master
|
5
|
-
specs:
|
6
|
-
jeweler (2.3.9)
|
7
|
-
builder
|
8
|
-
bundler
|
9
|
-
git (>= 1.2.5)
|
10
|
-
github_api (~> 0.16.0)
|
11
|
-
highline (>= 1.6.15)
|
12
|
-
nokogiri (>= 1.5.10)
|
13
|
-
psych
|
14
|
-
rake
|
15
|
-
rdoc
|
16
|
-
semver2
|
17
|
-
|
18
|
-
GEM
|
19
|
-
remote: https://rubygems.org/
|
20
|
-
specs:
|
21
|
-
actioncable (6.1.4.4)
|
22
|
-
actionpack (= 6.1.4.4)
|
23
|
-
activesupport (= 6.1.4.4)
|
24
|
-
nio4r (~> 2.0)
|
25
|
-
websocket-driver (>= 0.6.1)
|
26
|
-
actionmailbox (6.1.4.4)
|
27
|
-
actionpack (= 6.1.4.4)
|
28
|
-
activejob (= 6.1.4.4)
|
29
|
-
activerecord (= 6.1.4.4)
|
30
|
-
activestorage (= 6.1.4.4)
|
31
|
-
activesupport (= 6.1.4.4)
|
32
|
-
mail (>= 2.7.1)
|
33
|
-
actionmailer (6.1.4.4)
|
34
|
-
actionpack (= 6.1.4.4)
|
35
|
-
actionview (= 6.1.4.4)
|
36
|
-
activejob (= 6.1.4.4)
|
37
|
-
activesupport (= 6.1.4.4)
|
38
|
-
mail (~> 2.5, >= 2.5.4)
|
39
|
-
rails-dom-testing (~> 2.0)
|
40
|
-
actionpack (6.1.4.4)
|
41
|
-
actionview (= 6.1.4.4)
|
42
|
-
activesupport (= 6.1.4.4)
|
43
|
-
rack (~> 2.0, >= 2.0.9)
|
44
|
-
rack-test (>= 0.6.3)
|
45
|
-
rails-dom-testing (~> 2.0)
|
46
|
-
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
47
|
-
actiontext (6.1.4.4)
|
48
|
-
actionpack (= 6.1.4.4)
|
49
|
-
activerecord (= 6.1.4.4)
|
50
|
-
activestorage (= 6.1.4.4)
|
51
|
-
activesupport (= 6.1.4.4)
|
52
|
-
nokogiri (>= 1.8.5)
|
53
|
-
actionview (6.1.4.4)
|
54
|
-
activesupport (= 6.1.4.4)
|
55
|
-
builder (~> 3.1)
|
56
|
-
erubi (~> 1.4)
|
57
|
-
rails-dom-testing (~> 2.0)
|
58
|
-
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
59
|
-
activejob (6.1.4.4)
|
60
|
-
activesupport (= 6.1.4.4)
|
61
|
-
globalid (>= 0.3.6)
|
62
|
-
activemodel (6.1.4.4)
|
63
|
-
activesupport (= 6.1.4.4)
|
64
|
-
activerecord (6.1.4.4)
|
65
|
-
activemodel (= 6.1.4.4)
|
66
|
-
activesupport (= 6.1.4.4)
|
67
|
-
activerecord-import (1.3.0)
|
68
|
-
activerecord (>= 4.2)
|
69
|
-
activestorage (6.1.4.4)
|
70
|
-
actionpack (= 6.1.4.4)
|
71
|
-
activejob (= 6.1.4.4)
|
72
|
-
activerecord (= 6.1.4.4)
|
73
|
-
activesupport (= 6.1.4.4)
|
74
|
-
marcel (~> 1.0.0)
|
75
|
-
mini_mime (>= 1.1.0)
|
76
|
-
activesupport (6.1.4.4)
|
77
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
78
|
-
i18n (>= 1.6, < 2)
|
79
|
-
minitest (>= 5.1)
|
80
|
-
tzinfo (~> 2.0)
|
81
|
-
zeitwerk (~> 2.3)
|
82
|
-
addressable (2.4.0)
|
83
|
-
builder (3.2.4)
|
84
|
-
coderay (1.1.3)
|
85
|
-
concurrent-ruby (1.1.10)
|
86
|
-
crass (1.0.6)
|
87
|
-
database_cleaner (2.0.1)
|
88
|
-
database_cleaner-active_record (~> 2.0.0)
|
89
|
-
database_cleaner-active_record (2.0.1)
|
90
|
-
activerecord (>= 5.a)
|
91
|
-
database_cleaner-core (~> 2.0.0)
|
92
|
-
database_cleaner-core (2.0.1)
|
93
|
-
descendants_tracker (0.0.4)
|
94
|
-
thread_safe (~> 0.3, >= 0.3.1)
|
95
|
-
diff-lcs (1.5.0)
|
96
|
-
docile (1.4.0)
|
97
|
-
erubi (1.10.0)
|
98
|
-
factory_bot (6.2.0)
|
99
|
-
activesupport (>= 5.0.0)
|
100
|
-
factory_bot_rails (6.2.0)
|
101
|
-
factory_bot (~> 6.2.0)
|
102
|
-
railties (>= 5.0.0)
|
103
|
-
faraday (0.9.2)
|
104
|
-
multipart-post (>= 1.2, < 3)
|
105
|
-
ffi (1.15.5)
|
106
|
-
formatador (1.1.0)
|
107
|
-
git (1.11.0)
|
108
|
-
rchardet (~> 1.8)
|
109
|
-
github_api (0.16.0)
|
110
|
-
addressable (~> 2.4.0)
|
111
|
-
descendants_tracker (~> 0.0.4)
|
112
|
-
faraday (~> 0.8, < 0.10)
|
113
|
-
hashie (>= 3.4)
|
114
|
-
mime-types (>= 1.16, < 3.0)
|
115
|
-
oauth2 (~> 1.0)
|
116
|
-
globalid (1.0.0)
|
117
|
-
activesupport (>= 5.0)
|
118
|
-
guard (2.18.0)
|
119
|
-
formatador (>= 0.2.4)
|
120
|
-
listen (>= 2.7, < 4.0)
|
121
|
-
lumberjack (>= 1.0.12, < 2.0)
|
122
|
-
nenv (~> 0.1)
|
123
|
-
notiffany (~> 0.0)
|
124
|
-
pry (>= 0.13.0)
|
125
|
-
shellany (~> 0.0)
|
126
|
-
thor (>= 0.18.1)
|
127
|
-
guard-compat (1.2.1)
|
128
|
-
guard-rspec (4.7.3)
|
129
|
-
guard (~> 2.1)
|
130
|
-
guard-compat (~> 1.1)
|
131
|
-
rspec (>= 2.99.0, < 4.0)
|
132
|
-
hashie (5.0.0)
|
133
|
-
highline (2.0.3)
|
134
|
-
i18n (1.12.0)
|
135
|
-
concurrent-ruby (~> 1.0)
|
136
|
-
json (1.8.6)
|
137
|
-
jwt (2.5.0)
|
138
|
-
listen (3.7.1)
|
139
|
-
rb-fsevent (~> 0.10, >= 0.10.3)
|
140
|
-
rb-inotify (~> 0.9, >= 0.9.10)
|
141
|
-
loofah (2.13.0)
|
142
|
-
crass (~> 1.0.2)
|
143
|
-
nokogiri (>= 1.5.9)
|
144
|
-
lumberjack (1.2.8)
|
145
|
-
mail (2.7.1)
|
146
|
-
mini_mime (>= 0.1.1)
|
147
|
-
marcel (1.0.2)
|
148
|
-
method_source (1.0.0)
|
149
|
-
mime-types (2.99.3)
|
150
|
-
mini_mime (1.1.2)
|
151
|
-
mini_portile2 (2.8.0)
|
152
|
-
minitest (5.16.3)
|
153
|
-
multi_json (1.15.0)
|
154
|
-
multi_xml (0.6.0)
|
155
|
-
multipart-post (2.2.3)
|
156
|
-
mysql2 (0.5.0)
|
157
|
-
nenv (0.3.0)
|
158
|
-
nio4r (2.5.8)
|
159
|
-
nokogiri (1.13.8)
|
160
|
-
mini_portile2 (~> 2.8.0)
|
161
|
-
racc (~> 1.4)
|
162
|
-
notiffany (0.1.3)
|
163
|
-
nenv (~> 0.1)
|
164
|
-
shellany (~> 0.0)
|
165
|
-
oauth2 (1.4.8)
|
166
|
-
faraday (>= 0.8, < 3.0)
|
167
|
-
jwt (>= 1.0, < 3.0)
|
168
|
-
multi_json (~> 1.3)
|
169
|
-
multi_xml (~> 0.5)
|
170
|
-
rack (>= 1.2, < 3)
|
171
|
-
paranoia (2.5.2)
|
172
|
-
activerecord (>= 5.1, < 7.1)
|
173
|
-
pg (1.3.1)
|
174
|
-
pry (0.14.1)
|
175
|
-
coderay (~> 1.1)
|
176
|
-
method_source (~> 1.0)
|
177
|
-
psych (4.0.6)
|
178
|
-
stringio
|
179
|
-
racc (1.6.0)
|
180
|
-
rack (2.2.4)
|
181
|
-
rack-test (1.1.0)
|
182
|
-
rack (>= 1.0, < 3)
|
183
|
-
rails (6.1.4.4)
|
184
|
-
actioncable (= 6.1.4.4)
|
185
|
-
actionmailbox (= 6.1.4.4)
|
186
|
-
actionmailer (= 6.1.4.4)
|
187
|
-
actionpack (= 6.1.4.4)
|
188
|
-
actiontext (= 6.1.4.4)
|
189
|
-
actionview (= 6.1.4.4)
|
190
|
-
activejob (= 6.1.4.4)
|
191
|
-
activemodel (= 6.1.4.4)
|
192
|
-
activerecord (= 6.1.4.4)
|
193
|
-
activestorage (= 6.1.4.4)
|
194
|
-
activesupport (= 6.1.4.4)
|
195
|
-
bundler (>= 1.15.0)
|
196
|
-
railties (= 6.1.4.4)
|
197
|
-
sprockets-rails (>= 2.0.0)
|
198
|
-
rails-dom-testing (2.0.3)
|
199
|
-
activesupport (>= 4.2.0)
|
200
|
-
nokogiri (>= 1.6)
|
201
|
-
rails-html-sanitizer (1.4.2)
|
202
|
-
loofah (~> 2.3)
|
203
|
-
railties (6.1.4.4)
|
204
|
-
actionpack (= 6.1.4.4)
|
205
|
-
activesupport (= 6.1.4.4)
|
206
|
-
method_source
|
207
|
-
rake (>= 0.13)
|
208
|
-
thor (~> 1.0)
|
209
|
-
rake (13.0.6)
|
210
|
-
rb-fsevent (0.11.0)
|
211
|
-
rb-inotify (0.10.1)
|
212
|
-
ffi (~> 1.0)
|
213
|
-
rchardet (1.8.0)
|
214
|
-
rdoc (3.12.2)
|
215
|
-
json (~> 1.4)
|
216
|
-
rollbar (3.3.0)
|
217
|
-
rspec (3.10.0)
|
218
|
-
rspec-core (~> 3.10.0)
|
219
|
-
rspec-expectations (~> 3.10.0)
|
220
|
-
rspec-mocks (~> 3.10.0)
|
221
|
-
rspec-core (3.10.2)
|
222
|
-
rspec-support (~> 3.10.0)
|
223
|
-
rspec-expectations (3.10.2)
|
224
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
225
|
-
rspec-support (~> 3.10.0)
|
226
|
-
rspec-mocks (3.10.3)
|
227
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
228
|
-
rspec-support (~> 3.10.0)
|
229
|
-
rspec-support (3.10.3)
|
230
|
-
semver2 (3.4.2)
|
231
|
-
shellany (0.0.1)
|
232
|
-
simplecov (0.21.2)
|
233
|
-
docile (~> 1.1)
|
234
|
-
simplecov-html (~> 0.11)
|
235
|
-
simplecov_json_formatter (~> 0.1)
|
236
|
-
simplecov-html (0.12.3)
|
237
|
-
simplecov_json_formatter (0.1.3)
|
238
|
-
sprockets (4.1.1)
|
239
|
-
concurrent-ruby (~> 1.0)
|
240
|
-
rack (> 1, < 3)
|
241
|
-
sprockets-rails (3.4.2)
|
242
|
-
actionpack (>= 5.2)
|
243
|
-
activesupport (>= 5.2)
|
244
|
-
sprockets (>= 3.0.0)
|
245
|
-
standalone_migrations (6.1.0)
|
246
|
-
activerecord (>= 4.2.7, < 6.2.0, != 5.2.3.rc1, != 5.2.3)
|
247
|
-
railties (>= 4.2.7, < 6.2.0, != 5.2.3.rc1, != 5.2.3)
|
248
|
-
rake (>= 10.0)
|
249
|
-
stringio (3.0.2)
|
250
|
-
thor (1.2.1)
|
251
|
-
thread_safe (0.3.6)
|
252
|
-
timecop (0.9.4)
|
253
|
-
tzinfo (2.0.5)
|
254
|
-
concurrent-ruby (~> 1.0)
|
255
|
-
websocket-driver (0.7.5)
|
256
|
-
websocket-extensions (>= 0.1.0)
|
257
|
-
websocket-extensions (0.1.5)
|
258
|
-
zeitwerk (2.6.1)
|
259
|
-
|
260
|
-
PLATFORMS
|
261
|
-
ruby
|
262
|
-
|
263
|
-
DEPENDENCIES
|
264
|
-
activerecord (>= 6)
|
265
|
-
activerecord-import
|
266
|
-
activesupport
|
267
|
-
bundler (~> 1.0)
|
268
|
-
database_cleaner
|
269
|
-
factory_bot_rails
|
270
|
-
guard
|
271
|
-
guard-rspec
|
272
|
-
jeweler!
|
273
|
-
mysql2 (= 0.5)
|
274
|
-
paranoia
|
275
|
-
pg
|
276
|
-
pry
|
277
|
-
rails (>= 6)
|
278
|
-
rdoc (~> 3.12)
|
279
|
-
rollbar
|
280
|
-
rspec
|
281
|
-
simplecov
|
282
|
-
standalone_migrations
|
283
|
-
timecop
|
284
|
-
|
285
|
-
RUBY VERSION
|
286
|
-
ruby 3.0.2p107
|
287
|
-
|
288
|
-
BUNDLED WITH
|
289
|
-
1.17.3
|
data/Guardfile
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
# A sample Guardfile
|
2
|
-
# More info at https://github.com/guard/guard#readme
|
3
|
-
|
4
|
-
## Uncomment and set this to only include directories you want to watch
|
5
|
-
# directories %w(app lib config test spec features) \
|
6
|
-
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
|
7
|
-
|
8
|
-
## Note: if you are using the `directories` clause above and you are not
|
9
|
-
## watching the project directory ('.'), then you will want to move
|
10
|
-
## the Guardfile to a watched dir and symlink it back, e.g.
|
11
|
-
#
|
12
|
-
# $ mkdir config
|
13
|
-
# $ mv Guardfile config/
|
14
|
-
# $ ln -s config/Guardfile .
|
15
|
-
#
|
16
|
-
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
|
17
|
-
|
18
|
-
# Note: The cmd option is now required due to the increasing number of ways
|
19
|
-
# rspec may be run, below are examples of the most common uses.
|
20
|
-
# * bundler: 'bundle exec rspec'
|
21
|
-
# * bundler binstubs: 'bin/rspec'
|
22
|
-
# * spring: 'bin/rspec' (This will use spring if running and you have
|
23
|
-
# installed the spring binstubs per the docs)
|
24
|
-
# * zeus: 'zeus rspec' (requires the server to be started separately)
|
25
|
-
# * 'just' rspec: 'rspec'
|
26
|
-
|
27
|
-
guard :rspec, cmd: "bundle exec rspec" do
|
28
|
-
require "guard/rspec/dsl"
|
29
|
-
dsl = Guard::RSpec::Dsl.new(self)
|
30
|
-
|
31
|
-
# Feel free to open issues for suggestions and improvements
|
32
|
-
|
33
|
-
# RSpec files
|
34
|
-
rspec = dsl.rspec
|
35
|
-
watch(rspec.spec_helper) { rspec.spec_dir }
|
36
|
-
watch(rspec.spec_support) { rspec.spec_dir }
|
37
|
-
watch(rspec.spec_files)
|
38
|
-
|
39
|
-
# Ruby files
|
40
|
-
ruby = dsl.ruby
|
41
|
-
dsl.watch_spec_files_for(ruby.lib_files)
|
42
|
-
|
43
|
-
# Rails files
|
44
|
-
rails = dsl.rails(view_extensions: %w(erb haml slim))
|
45
|
-
dsl.watch_spec_files_for(rails.app_files)
|
46
|
-
dsl.watch_spec_files_for(rails.views)
|
47
|
-
|
48
|
-
watch(rails.controllers) do |m|
|
49
|
-
[
|
50
|
-
rspec.spec.call("routing/#{m[1]}_routing"),
|
51
|
-
rspec.spec.call("controllers/#{m[1]}_controller"),
|
52
|
-
rspec.spec.call("acceptance/#{m[1]}")
|
53
|
-
]
|
54
|
-
end
|
55
|
-
|
56
|
-
# Rails config changes
|
57
|
-
watch(rails.spec_helper) { rspec.spec_dir }
|
58
|
-
watch(rails.routes) { "#{rspec.spec_dir}/routing" }
|
59
|
-
watch(rails.app_controller) { "#{rspec.spec_dir}/controllers" }
|
60
|
-
|
61
|
-
# Capybara features specs
|
62
|
-
watch(rails.view_dirs) { |m| rspec.spec.call("features/#{m[1]}") }
|
63
|
-
watch(rails.layouts) { |m| rspec.spec.call("features/#{m[1]}") }
|
64
|
-
|
65
|
-
# Turnip features and steps
|
66
|
-
watch(%r{^spec/acceptance/(.+)\.feature$})
|
67
|
-
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m|
|
68
|
-
Dir[File.join("**/#{m[1]}.feature")][0] || "spec/acceptance"
|
69
|
-
end
|
70
|
-
end
|
data/Rakefile
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require 'rubygems'
|
4
|
-
require 'bundler'
|
5
|
-
require 'pry'
|
6
|
-
begin
|
7
|
-
Bundler.setup(:default, :development)
|
8
|
-
rescue Bundler::BundlerError => e
|
9
|
-
$stderr.puts e.message
|
10
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
11
|
-
exit e.status_code
|
12
|
-
end
|
13
|
-
require 'rake'
|
14
|
-
require 'jeweler'
|
15
|
-
|
16
|
-
Jeweler::Tasks.new do |gem|
|
17
|
-
# gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
|
18
|
-
gem.name = "historiographer"
|
19
|
-
gem.homepage = "http://github.com/brettshollenberger/historiographer"
|
20
|
-
gem.license = "MIT"
|
21
|
-
gem.summary = %Q{Create histories of your ActiveRecord tables}
|
22
|
-
gem.description = %Q{Creates separate tables for each history table}
|
23
|
-
gem.email = "brett.shollenberger@gmail.com"
|
24
|
-
gem.authors = ["brettshollenberger"]
|
25
|
-
end
|
26
|
-
Jeweler::RubygemsDotOrgTasks.new
|
27
|
-
|
28
|
-
require 'rake/testtask'
|
29
|
-
Rake::TestTask.new(:test) do |test|
|
30
|
-
test.libs << 'lib' << 'spec'
|
31
|
-
test.pattern = 'rspec/**/*_spec.rb'
|
32
|
-
test.verbose = true
|
33
|
-
end
|
34
|
-
|
35
|
-
desc "Code coverage detail"
|
36
|
-
task :simplecov do
|
37
|
-
ENV['COVERAGE'] = "true"
|
38
|
-
Rake::Task['test'].execute
|
39
|
-
end
|
40
|
-
|
41
|
-
task :default => :test
|
42
|
-
|
43
|
-
require 'rdoc/task'
|
44
|
-
Rake::RDocTask.new do |rdoc|
|
45
|
-
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
46
|
-
|
47
|
-
rdoc.rdoc_dir = 'rdoc'
|
48
|
-
rdoc.title = "historiographer #{version}"
|
49
|
-
rdoc.rdoc_files.include('README*')
|
50
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
51
|
-
end
|
52
|
-
|
53
|
-
require 'standalone_migrations'
|
54
|
-
StandaloneMigrations::Tasks.load_tasks
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
4.0.0
|
data/historiographer.gemspec
DELETED
@@ -1,106 +0,0 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
-
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: historiographer 4.0.0 ruby lib
|
6
|
-
|
7
|
-
Gem::Specification.new do |s|
|
8
|
-
s.name = "historiographer".freeze
|
9
|
-
s.version = "4.0.0"
|
10
|
-
|
11
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
|
-
s.require_paths = ["lib".freeze]
|
13
|
-
s.authors = ["brettshollenberger".freeze]
|
14
|
-
s.date = "2023-08-22"
|
15
|
-
s.description = "Creates separate tables for each history table".freeze
|
16
|
-
s.email = "brett.shollenberger@gmail.com".freeze
|
17
|
-
s.extra_rdoc_files = [
|
18
|
-
"LICENSE.txt",
|
19
|
-
"README.md"
|
20
|
-
]
|
21
|
-
s.files = [
|
22
|
-
".document",
|
23
|
-
".rspec",
|
24
|
-
".ruby-version",
|
25
|
-
".standalone_migrations",
|
26
|
-
"Gemfile",
|
27
|
-
"Gemfile.lock",
|
28
|
-
"Guardfile",
|
29
|
-
"LICENSE.txt",
|
30
|
-
"README.md",
|
31
|
-
"Rakefile",
|
32
|
-
"VERSION",
|
33
|
-
"historiographer.gemspec",
|
34
|
-
"init.rb",
|
35
|
-
"lib/historiographer.rb",
|
36
|
-
"lib/historiographer/history.rb",
|
37
|
-
"lib/historiographer/history_migration.rb",
|
38
|
-
"lib/historiographer/history_migration_mysql.rb",
|
39
|
-
"lib/historiographer/mysql_migration.rb",
|
40
|
-
"lib/historiographer/postgres_migration.rb",
|
41
|
-
"lib/historiographer/relation.rb",
|
42
|
-
"lib/historiographer/safe.rb",
|
43
|
-
"lib/historiographer/silent.rb",
|
44
|
-
"spec/db/database.yml",
|
45
|
-
"spec/db/migrate/20161121212228_create_posts.rb",
|
46
|
-
"spec/db/migrate/20161121212229_create_post_histories.rb",
|
47
|
-
"spec/db/migrate/20161121212230_create_authors.rb",
|
48
|
-
"spec/db/migrate/20161121212231_create_author_histories.rb",
|
49
|
-
"spec/db/migrate/20161121212232_create_users.rb",
|
50
|
-
"spec/db/migrate/20171011194624_create_safe_posts.rb",
|
51
|
-
"spec/db/migrate/20171011194715_create_safe_post_histories.rb",
|
52
|
-
"spec/db/migrate/20191024142304_create_thing_with_compound_index.rb",
|
53
|
-
"spec/db/migrate/20191024142352_create_thing_with_compound_index_history.rb",
|
54
|
-
"spec/db/migrate/20191024203106_create_thing_without_history.rb",
|
55
|
-
"spec/db/migrate/20221018204220_create_silent_posts.rb",
|
56
|
-
"spec/db/migrate/20221018204255_create_silent_post_histories.rb",
|
57
|
-
"spec/db/schema.rb",
|
58
|
-
"spec/examples.txt",
|
59
|
-
"spec/factories/post.rb",
|
60
|
-
"spec/historiographer_spec.rb",
|
61
|
-
"spec/spec_helper.rb"
|
62
|
-
]
|
63
|
-
s.homepage = "http://github.com/brettshollenberger/historiographer".freeze
|
64
|
-
s.licenses = ["MIT".freeze]
|
65
|
-
s.rubygems_version = "3.2.22".freeze
|
66
|
-
s.summary = "Create histories of your ActiveRecord tables".freeze
|
67
|
-
|
68
|
-
if s.respond_to? :specification_version then
|
69
|
-
s.specification_version = 4
|
70
|
-
end
|
71
|
-
|
72
|
-
if s.respond_to? :add_runtime_dependency then
|
73
|
-
s.add_runtime_dependency(%q<activerecord>.freeze, [">= 6"])
|
74
|
-
s.add_runtime_dependency(%q<activerecord-import>.freeze, [">= 0"])
|
75
|
-
s.add_runtime_dependency(%q<activesupport>.freeze, [">= 0"])
|
76
|
-
s.add_runtime_dependency(%q<rails>.freeze, [">= 6"])
|
77
|
-
s.add_runtime_dependency(%q<rollbar>.freeze, [">= 0"])
|
78
|
-
s.add_development_dependency(%q<mysql2>.freeze, ["= 0.5"])
|
79
|
-
s.add_development_dependency(%q<paranoia>.freeze, [">= 0"])
|
80
|
-
s.add_development_dependency(%q<pg>.freeze, [">= 0"])
|
81
|
-
s.add_development_dependency(%q<pry>.freeze, [">= 0"])
|
82
|
-
s.add_development_dependency(%q<standalone_migrations>.freeze, [">= 0"])
|
83
|
-
s.add_development_dependency(%q<timecop>.freeze, [">= 0"])
|
84
|
-
s.add_development_dependency(%q<bundler>.freeze, ["~> 1.0"])
|
85
|
-
s.add_development_dependency(%q<jeweler>.freeze, [">= 0"])
|
86
|
-
s.add_development_dependency(%q<rdoc>.freeze, ["~> 3.12"])
|
87
|
-
s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
|
88
|
-
else
|
89
|
-
s.add_dependency(%q<activerecord>.freeze, [">= 6"])
|
90
|
-
s.add_dependency(%q<activerecord-import>.freeze, [">= 0"])
|
91
|
-
s.add_dependency(%q<activesupport>.freeze, [">= 0"])
|
92
|
-
s.add_dependency(%q<rails>.freeze, [">= 6"])
|
93
|
-
s.add_dependency(%q<rollbar>.freeze, [">= 0"])
|
94
|
-
s.add_dependency(%q<mysql2>.freeze, ["= 0.5"])
|
95
|
-
s.add_dependency(%q<paranoia>.freeze, [">= 0"])
|
96
|
-
s.add_dependency(%q<pg>.freeze, [">= 0"])
|
97
|
-
s.add_dependency(%q<pry>.freeze, [">= 0"])
|
98
|
-
s.add_dependency(%q<standalone_migrations>.freeze, [">= 0"])
|
99
|
-
s.add_dependency(%q<timecop>.freeze, [">= 0"])
|
100
|
-
s.add_dependency(%q<bundler>.freeze, ["~> 1.0"])
|
101
|
-
s.add_dependency(%q<jeweler>.freeze, [">= 0"])
|
102
|
-
s.add_dependency(%q<rdoc>.freeze, ["~> 3.12"])
|
103
|
-
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
104
|
-
end
|
105
|
-
end
|
106
|
-
|
data/init.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
require "yaml"
|
2
|
-
|
3
|
-
Bundler.require(:default, :development, :test)
|
4
|
-
|
5
|
-
Dir.glob(File.expand_path("lib/**/*.rb")).each do |file|
|
6
|
-
require file
|
7
|
-
end
|
8
|
-
|
9
|
-
database_config = YAML.load(File.open(File.expand_path("spec/db/database.yml")).read)
|
10
|
-
|
11
|
-
env = ENV["HISTORIOGRAPHER_ENV"] || "development"
|
12
|
-
|
13
|
-
db_env_config = database_config[env]
|
14
|
-
|
15
|
-
if defined?(ActiveRecord::Base)
|
16
|
-
# new settings as specified here: https://devcenter.heroku.com/articles/concurrency-and-database-connections
|
17
|
-
ActiveRecord::Base.establish_connection(db_env_config)
|
18
|
-
end
|
data/spec/db/database.yml
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
development:
|
2
|
-
adapter: postgresql
|
3
|
-
prepared_statements: false
|
4
|
-
url: "postgres://localhost/historiographer_development"
|
5
|
-
|
6
|
-
test:
|
7
|
-
adapter: postgresql
|
8
|
-
database: historiographer_test
|
9
|
-
url: "postgres://localhost/historiographer_test"
|
10
|
-
|
11
|
-
# mysql_default: &mysql_default
|
12
|
-
# adapter: mysql2
|
13
|
-
# encoding: utf8
|
14
|
-
# username: root
|
15
|
-
# password:
|
16
|
-
# host: 127.0.0.1
|
17
|
-
# port: 3306
|
18
|
-
|
19
|
-
# development:
|
20
|
-
# <<: *mysql_default
|
21
|
-
# database: historiographer_development
|
22
|
-
|
23
|
-
# test:
|
24
|
-
# <<: *mysql_default
|
25
|
-
# database: historiographer_test
|
@@ -1,19 +0,0 @@
|
|
1
|
-
class CreatePosts < ActiveRecord::Migration[5.1]
|
2
|
-
def change
|
3
|
-
create_table :posts do |t|
|
4
|
-
t.string :title, null: false
|
5
|
-
t.text :body, null: false
|
6
|
-
t.integer :author_id, null: false
|
7
|
-
t.boolean :enabled, default: false
|
8
|
-
t.datetime :live_at
|
9
|
-
t.datetime :deleted_at
|
10
|
-
|
11
|
-
t.timestamps
|
12
|
-
end
|
13
|
-
|
14
|
-
add_index :posts, :author_id
|
15
|
-
add_index :posts, :enabled
|
16
|
-
add_index :posts, :live_at
|
17
|
-
add_index :posts, :deleted_at
|
18
|
-
end
|
19
|
-
end
|