pgdice 0.4.2 → 2.0.0

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.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +4 -1
  3. data/.github/ISSUE_TEMPLATE/bug_report.md +27 -0
  4. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  5. data/.github/workflows/gem-push.yml +20 -0
  6. data/.github/workflows/ruby.yml +62 -0
  7. data/.rubocop.yml +12 -2
  8. data/.ruby-version +1 -1
  9. data/CHANGELOG.md +21 -0
  10. data/README.md +22 -26
  11. data/SECURITY.md +15 -0
  12. data/examples/aws/README.md +28 -0
  13. data/examples/aws/cloudformation/scheduled_events.json +59 -0
  14. data/examples/aws/lib/sqs_listener/default_event_handler.rb +32 -0
  15. data/examples/aws/lib/sqs_listener/exceptions/unknown_task_error.rb +4 -0
  16. data/examples/aws/lib/sqs_listener/fallthrough_event_handler.rb +18 -0
  17. data/examples/aws/lib/sqs_listener/sqs_event_router.rb +32 -0
  18. data/examples/aws/lib/sqs_listener/typed_event_handler/task_event_handler.rb +46 -0
  19. data/examples/aws/lib/sqs_listener/typed_event_handler/tasks/database_tasks.rb +37 -0
  20. data/examples/aws/lib/sqs_listener.rb +47 -0
  21. data/examples/aws/lib/sqs_message_deleter.rb +32 -0
  22. data/examples/aws/lib/sqs_poller.rb +67 -0
  23. data/examples/aws/tasks/poll_sqs.rake +8 -0
  24. data/examples/aws/workers/pg_dice_worker.rb +54 -0
  25. data/lib/pgdice/approved_tables.rb +3 -2
  26. data/lib/pgdice/configuration.rb +5 -5
  27. data/lib/pgdice/configuration_file_loader.rb +1 -1
  28. data/lib/pgdice/database_connection_factory.rb +5 -6
  29. data/lib/pgdice/date_helper.rb +2 -2
  30. data/lib/pgdice/error.rb +2 -2
  31. data/lib/pgdice/partition_dropper.rb +1 -1
  32. data/lib/pgdice/partition_helper.rb +2 -2
  33. data/lib/pgdice/pg_slice_manager.rb +5 -5
  34. data/lib/pgdice/query_executor.rb +3 -3
  35. data/lib/pgdice/query_executor_factory.rb +20 -0
  36. data/lib/pgdice/table.rb +2 -2
  37. data/lib/pgdice/version.rb +1 -1
  38. data/lib/pgdice.rb +1 -0
  39. data/pgdice.gemspec +26 -22
  40. metadata +87 -49
  41. data/.circleci/config.yml +0 -66
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pgdice
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Newell
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-23 00:00:00.000000000 Z
11
+ date: 2022-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.1.0
19
+ version: 1.2.3
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
22
  version: 1.1.0
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: 1.1.0
29
+ version: 1.2.3
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
32
  version: 1.1.0
@@ -36,21 +36,21 @@ dependencies:
36
36
  requirements:
37
37
  - - '='
38
38
  - !ruby/object:Gem::Version
39
- version: 0.4.5
39
+ version: 0.4.7
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - '='
45
45
  - !ruby/object:Gem::Version
46
- version: 0.4.5
46
+ version: 0.4.7
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '1.16'
53
+ version: 2.3.6
54
54
  - - ">="
55
55
  - !ruby/object:Gem::Version
56
56
  version: '1.16'
@@ -60,37 +60,17 @@ dependencies:
60
60
  requirements:
61
61
  - - "~>"
62
62
  - !ruby/object:Gem::Version
63
- version: '1.16'
63
+ version: 2.3.6
64
64
  - - ">="
65
65
  - !ruby/object:Gem::Version
66
66
  version: '1.16'
67
- - !ruby/object:Gem::Dependency
68
- name: coveralls
69
- requirement: !ruby/object:Gem::Requirement
70
- requirements:
71
- - - "~>"
72
- - !ruby/object:Gem::Version
73
- version: 0.8.22
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- version: 0.8.22
77
- type: :development
78
- prerelease: false
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - "~>"
82
- - !ruby/object:Gem::Version
83
- version: 0.8.22
84
- - - ">="
85
- - !ruby/object:Gem::Version
86
- version: 0.8.22
87
67
  - !ruby/object:Gem::Dependency
88
68
  name: guard
89
69
  requirement: !ruby/object:Gem::Requirement
90
70
  requirements:
91
71
  - - "~>"
92
72
  - !ruby/object:Gem::Version
93
- version: 2.14.2
73
+ version: 2.18.0
94
74
  - - ">="
95
75
  - !ruby/object:Gem::Version
96
76
  version: 2.14.2
@@ -100,7 +80,7 @@ dependencies:
100
80
  requirements:
101
81
  - - "~>"
102
82
  - !ruby/object:Gem::Version
103
- version: 2.14.2
83
+ version: 2.18.0
104
84
  - - ">="
105
85
  - !ruby/object:Gem::Version
106
86
  version: 2.14.2
@@ -130,7 +110,7 @@ dependencies:
130
110
  requirements:
131
111
  - - "~>"
132
112
  - !ruby/object:Gem::Version
133
- version: 1.3.0
113
+ version: 1.5.0
134
114
  - - ">="
135
115
  - !ruby/object:Gem::Version
136
116
  version: 1.3.0
@@ -140,7 +120,7 @@ dependencies:
140
120
  requirements:
141
121
  - - "~>"
142
122
  - !ruby/object:Gem::Version
143
- version: 1.3.0
123
+ version: 1.5.0
144
124
  - - ">="
145
125
  - !ruby/object:Gem::Version
146
126
  version: 1.3.0
@@ -210,7 +190,7 @@ dependencies:
210
190
  requirements:
211
191
  - - "~>"
212
192
  - !ruby/object:Gem::Version
213
- version: 1.3.4
193
+ version: 1.5.0
214
194
  - - ">="
215
195
  - !ruby/object:Gem::Version
216
196
  version: 1.3.4
@@ -220,7 +200,7 @@ dependencies:
220
200
  requirements:
221
201
  - - "~>"
222
202
  - !ruby/object:Gem::Version
223
- version: 1.3.4
203
+ version: 1.5.0
224
204
  - - ">="
225
205
  - !ruby/object:Gem::Version
226
206
  version: 1.3.4
@@ -230,7 +210,7 @@ dependencies:
230
210
  requirements:
231
211
  - - "~>"
232
212
  - !ruby/object:Gem::Version
233
- version: '10.0'
213
+ version: 13.0.6
234
214
  - - ">="
235
215
  - !ruby/object:Gem::Version
236
216
  version: '10.0'
@@ -240,7 +220,7 @@ dependencies:
240
220
  requirements:
241
221
  - - "~>"
242
222
  - !ruby/object:Gem::Version
243
- version: '10.0'
223
+ version: 13.0.6
244
224
  - - ">="
245
225
  - !ruby/object:Gem::Version
246
226
  version: '10.0'
@@ -250,21 +230,61 @@ dependencies:
250
230
  requirements:
251
231
  - - '='
252
232
  - !ruby/object:Gem::Version
253
- version: '0.59'
233
+ version: 1.25.1
254
234
  type: :development
255
235
  prerelease: false
256
236
  version_requirements: !ruby/object:Gem::Requirement
257
237
  requirements:
258
238
  - - '='
259
239
  - !ruby/object:Gem::Version
260
- version: '0.59'
240
+ version: 1.25.1
241
+ - !ruby/object:Gem::Dependency
242
+ name: rubocop-performance
243
+ requirement: !ruby/object:Gem::Requirement
244
+ requirements:
245
+ - - "~>"
246
+ - !ruby/object:Gem::Version
247
+ version: 1.13.2
248
+ - - ">="
249
+ - !ruby/object:Gem::Version
250
+ version: 1.13.2
251
+ type: :development
252
+ prerelease: false
253
+ version_requirements: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - "~>"
256
+ - !ruby/object:Gem::Version
257
+ version: 1.13.2
258
+ - - ">="
259
+ - !ruby/object:Gem::Version
260
+ version: 1.13.2
261
+ - !ruby/object:Gem::Dependency
262
+ name: rubocop-rake
263
+ requirement: !ruby/object:Gem::Requirement
264
+ requirements:
265
+ - - "~>"
266
+ - !ruby/object:Gem::Version
267
+ version: 0.6.0
268
+ - - ">="
269
+ - !ruby/object:Gem::Version
270
+ version: 0.6.0
271
+ type: :development
272
+ prerelease: false
273
+ version_requirements: !ruby/object:Gem::Requirement
274
+ requirements:
275
+ - - "~>"
276
+ - !ruby/object:Gem::Version
277
+ version: 0.6.0
278
+ - - ">="
279
+ - !ruby/object:Gem::Version
280
+ version: 0.6.0
261
281
  - !ruby/object:Gem::Dependency
262
282
  name: simplecov
263
283
  requirement: !ruby/object:Gem::Requirement
264
284
  requirements:
265
285
  - - "~>"
266
286
  - !ruby/object:Gem::Version
267
- version: 0.16.1
287
+ version: 0.21.2
268
288
  - - ">="
269
289
  - !ruby/object:Gem::Version
270
290
  version: 0.16.1
@@ -274,20 +294,23 @@ dependencies:
274
294
  requirements:
275
295
  - - "~>"
276
296
  - !ruby/object:Gem::Version
277
- version: 0.16.1
297
+ version: 0.21.2
278
298
  - - ">="
279
299
  - !ruby/object:Gem::Version
280
300
  version: 0.16.1
281
301
  description: Postgres table partitioning with a Ruby API built on top of https://github.com/ankane/pgslice
282
302
  email:
283
- - andrew@andrewcn.com illuminuslimited@gmail.com
303
+ - andrew@illuminusltd.com
284
304
  executables: []
285
305
  extensions: []
286
306
  extra_rdoc_files: []
287
307
  files:
288
- - ".circleci/config.yml"
289
308
  - ".codeclimate.yml"
290
309
  - ".coveralls.yml"
310
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
311
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
312
+ - ".github/workflows/gem-push.yml"
313
+ - ".github/workflows/ruby.yml"
291
314
  - ".gitignore"
292
315
  - ".rubocop.yml"
293
316
  - ".ruby-gemset"
@@ -299,10 +322,24 @@ files:
299
322
  - LICENSE
300
323
  - README.md
301
324
  - Rakefile
325
+ - SECURITY.md
302
326
  - bin/_guard-core
303
327
  - bin/console
304
328
  - bin/guard
305
329
  - bin/setup
330
+ - examples/aws/README.md
331
+ - examples/aws/cloudformation/scheduled_events.json
332
+ - examples/aws/lib/sqs_listener.rb
333
+ - examples/aws/lib/sqs_listener/default_event_handler.rb
334
+ - examples/aws/lib/sqs_listener/exceptions/unknown_task_error.rb
335
+ - examples/aws/lib/sqs_listener/fallthrough_event_handler.rb
336
+ - examples/aws/lib/sqs_listener/sqs_event_router.rb
337
+ - examples/aws/lib/sqs_listener/typed_event_handler/task_event_handler.rb
338
+ - examples/aws/lib/sqs_listener/typed_event_handler/tasks/database_tasks.rb
339
+ - examples/aws/lib/sqs_message_deleter.rb
340
+ - examples/aws/lib/sqs_poller.rb
341
+ - examples/aws/tasks/poll_sqs.rake
342
+ - examples/aws/workers/pg_dice_worker.rb
306
343
  - examples/config.yml
307
344
  - lib/pgdice.rb
308
345
  - lib/pgdice/approved_tables.rb
@@ -326,6 +363,7 @@ files:
326
363
  - lib/pgdice/pg_slice_manager.rb
327
364
  - lib/pgdice/pg_slice_manager_factory.rb
328
365
  - lib/pgdice/query_executor.rb
366
+ - lib/pgdice/query_executor_factory.rb
329
367
  - lib/pgdice/table.rb
330
368
  - lib/pgdice/table_finder.rb
331
369
  - lib/pgdice/validation.rb
@@ -335,8 +373,9 @@ files:
335
373
  homepage: https://github.com/IlluminusLimited/pgdice
336
374
  licenses:
337
375
  - MIT
338
- metadata: {}
339
- post_install_message:
376
+ metadata:
377
+ rubygems_mfa_required: 'true'
378
+ post_install_message:
340
379
  rdoc_options: []
341
380
  require_paths:
342
381
  - lib
@@ -344,16 +383,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
344
383
  requirements:
345
384
  - - ">="
346
385
  - !ruby/object:Gem::Version
347
- version: '0'
386
+ version: 3.0.0
348
387
  required_rubygems_version: !ruby/object:Gem::Requirement
349
388
  requirements:
350
389
  - - ">="
351
390
  - !ruby/object:Gem::Version
352
391
  version: '0'
353
392
  requirements: []
354
- rubyforge_project:
355
- rubygems_version: 2.7.6
356
- signing_key:
393
+ rubygems_version: 3.2.32
394
+ signing_key:
357
395
  specification_version: 4
358
396
  summary: Postgres table partitioning with a Ruby API!
359
397
  test_files: []
data/.circleci/config.yml DELETED
@@ -1,66 +0,0 @@
1
- # Ruby CircleCI 2.0 configuration file
2
- #
3
- # Check https://circleci.com/docs/2.0/language-ruby/ for more details
4
- #
5
- version: 2
6
- defaults: &defaults
7
- working_directory: ~/repo
8
- docker:
9
- - image: circleci/ruby:2.5.1
10
- environment:
11
- DATABASE_HOST: 127.0.0.1
12
- DATABASE_USERNAME: pgdice
13
- PGDICE_LOG_TARGET: STDOUT
14
-
15
- - image: circleci/postgres:10.6-alpine-ram
16
- environment:
17
- POSTGRES_USER: pgdice
18
- POSTGRES_DB: pgdice_test
19
-
20
- jobs:
21
- test:
22
- <<: *defaults
23
- environment:
24
- - CC_TEST_REPORTER_ID: b39c211d102df8869887e0f5764fbb06114fd2430cdf6689868dec7a1261fd05
25
- steps:
26
- - checkout
27
- - run:
28
- name: Download cc-test-reporter
29
- command: |
30
- mkdir -p tmp/
31
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./tmp/cc-test-reporter
32
- chmod +x ./tmp/cc-test-reporter
33
-
34
- - run:
35
- name: Setup dependencies
36
- command: |
37
- bundle install --jobs 4 --retry 3
38
-
39
- - run:
40
- name: Run tests
41
- command: |
42
- mkdir -p /tmp/test-results
43
- TEST_FILES="$(circleci tests glob "test/**/*_test.rb" | circleci tests split --split-by=timings)"
44
-
45
- bundle exec rake rubocop test
46
- ./tmp/cc-test-reporter format-coverage -t simplecov -o tmp/coverage/codeclimate.pgdice.json tmp/coverage/pgdice/.resultset.json
47
-
48
- - store_test_results:
49
- path: ~/repo/tmp/test-results
50
-
51
- - store_artifacts:
52
- path: ~/repo/tmp/test-results
53
- destination: test-results
54
-
55
- - run:
56
- name: Upload coverage results to Code Climate
57
- command: |
58
- ./tmp/cc-test-reporter sum-coverage tmp/coverage/codeclimate.*.json -p 1 -o tmp/coverage/codeclimate.total.json
59
- ./tmp/cc-test-reporter upload-coverage -i tmp/coverage/codeclimate.total.json
60
-
61
-
62
- workflows:
63
- version: 2
64
- commit:
65
- jobs:
66
- - test