data_taster 0.5.1 → 0.6.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a78a2fcd415d03830f1fdd08ed9ae8230c284501f265594b9ba9295b6d26e3b4
4
- data.tar.gz: 381f2629b8577df802de57d63d9cd46a4ab053e171b067f3ce1e5d8584b4b76d
3
+ metadata.gz: 2ea98339906aa0e399bb9b3f98fe4da01427eeef571c9144163cbc6e24a2746a
4
+ data.tar.gz: 84c2069b369c1898108c2ce8545df3384b8dbf9e24e7e45e9ac8fe12cfc92682
5
5
  SHA512:
6
- metadata.gz: 13a97b5ee7cff7b8250a41719e0818bb828e76e509fac19727045f5f73a314e53efdf79269e7ad92a19ec0a0201a62a8d2e56dc0ab8b2bb4dfe41ae327c9302d
7
- data.tar.gz: 1e75e66bda81aebadacac1d28b257596d0960ad239ee64a725ddc3708f9a5939a80950ddb561dc24f3f9b3ddbf24d2ba0a0a2b1308be43a0c695c1a9b3ed7786
6
+ metadata.gz: 3ef19b1d64946d683fee115a0c4cad46bde05bd761d8a701fa30856124659b329b950a6bc79b1a237799101a585233161a0ab956b0f54b617e5fc66d22ebe133
7
+ data.tar.gz: c36a8e79951dddcaa74a58d3afdde6055e3f6c256732960bbeab90469e348fbc3b6370540527b4146b09ae6ace0620bec8fe236fde5911470a73f31a0c5f3df2
data/.rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-powerhome
3
3
 
4
4
  AllCops:
data/Appraisals CHANGED
@@ -9,3 +9,13 @@ appraise "rails-7-2" do
9
9
  gem "rails", "7.2.2.2"
10
10
  gem "rspec-rails", "~> 8.0.1"
11
11
  end
12
+
13
+ appraise "rails-8-0" do
14
+ gem "activemodel", "~> 8.0.5"
15
+ gem "activesupport", "~> 8.0.5"
16
+ end
17
+
18
+ appraise "rails-8-1" do
19
+ gem "activemodel", "~> 8.1.3"
20
+ gem "activesupport", "~> 8.1.3"
21
+ end
data/Gemfile.lock CHANGED
@@ -1,18 +1,19 @@
1
1
  PATH
2
2
  remote: ../rubocop-powerhome
3
3
  specs:
4
- rubocop-powerhome (0.6.1)
4
+ rubocop-powerhome (0.8.0)
5
+ lint_roller (~> 1.1)
5
6
  rubocop (= 1.82.1)
6
- rubocop-performance
7
- rubocop-rails
8
- rubocop-rake
9
- rubocop-rspec
7
+ rubocop-performance (>= 1.24)
8
+ rubocop-rails (>= 2.28)
9
+ rubocop-rake (>= 0.7)
10
+ rubocop-rspec (>= 3.5)
10
11
 
11
12
  PATH
12
13
  remote: .
13
14
  specs:
14
- data_taster (0.5.1)
15
- rails (>= 6.1, < 8)
15
+ data_taster (0.6.0)
16
+ rails (>= 7.1.3.2, <= 8.2)
16
17
 
17
18
  GEM
18
19
  remote: https://rubygems.org/
@@ -292,6 +293,8 @@ GEM
292
293
  thor (1.5.0)
293
294
  timeout (0.6.1)
294
295
  tomlrb (2.0.4)
296
+ trilogy (2.13.2)
297
+ bigdecimal
295
298
  tsort (0.2.0)
296
299
  tzinfo (2.0.6)
297
300
  concurrent-ruby (~> 1.0)
@@ -306,7 +309,7 @@ GEM
306
309
  with_env (1.1.0)
307
310
  xml-simple (1.1.9)
308
311
  rexml
309
- yard (0.9.38)
312
+ yard (0.9.44)
310
313
  zeitwerk (2.7.5)
311
314
 
312
315
  PLATFORMS
@@ -319,7 +322,7 @@ PLATFORMS
319
322
 
320
323
  DEPENDENCIES
321
324
  appraisal (= 2.5.0)
322
- bundler (~> 2.1)
325
+ bundler (~> 4.0)
323
326
  combustion (~> 1.3)
324
327
  data_taster!
325
328
  license_finder (~> 7.0)
@@ -331,7 +334,8 @@ DEPENDENCIES
331
334
  rubocop-powerhome!
332
335
  simplecov (= 0.15.1)
333
336
  test-unit (= 3.1.5)
334
- yard (= 0.9.38)
337
+ trilogy (= 2.13.2)
338
+ yard (= 0.9.44)
335
339
 
336
340
  BUNDLED WITH
337
- 2.5.23
341
+ 4.1.0
data/docs/CHANGELOG.md CHANGED
@@ -1,10 +1,32 @@
1
- ## [Unreleased]
1
+ # Changelog
2
+
3
+ ## [0.6.0](https://github.com/powerhome/power-tools/compare/data_taster/v0.5.1...data_taster/v0.6.0) (2026-11-23)
4
+
5
+
6
+ ### Added
7
+
8
+ * **data-taster:** support Trilogy clients ([#462](https://github.com/powerhome/power-tools/issues/462)) ([ec12f5b](https://github.com/powerhome/power-tools/commit/ec12f5ba80a2237a352d7174b11c96bb4feb8d9b))
9
+
10
+ ## [0.5.2] - 2026-11-05
11
+
12
+ - Accept `Trilogy` connections as `MysqlSource` and `DatabaseOutput` clients
13
+
14
+ ## [0.5.0] - 2026-07-28
15
+
16
+ [HFH-4410 - Bump powertools for Rails 8.1.3 V2](https://github.com/powerhome/power-tools/pull/426)
17
+
18
+ - Upgrade Rails to 8.1.3 for Nitro and Runway compatability
19
+ - Drop support for Ruby < 3.3 and Rails < 7.1 [#396](https://github.com/powerhome/power-tools/pull/396)
20
+ - Update Rails version to 7.2.3.1 for Active Storage CVE [#402](https://github.com/powerhome/power-tools/pull/402)
2
21
 
3
22
  ### Dependencies and platform support
4
23
 
5
24
  - Update rainbow to v3.x [#372](https://github.com/powerhome/power-tools/pull/372)
6
25
  - Update yard to 0.9.38 to address [Cross-site Scripting vulnerability](https://github.com/powerhome/power-tools/security/dependabot/544) [#394](https://github.com/powerhome/power-tools/pull/394)
7
26
  - Drop support for Ruby < 3.3 and Rails < 7.1 [#396](https://github.com/powerhome/power-tools/pull/396)
27
+
28
+ ---
29
+
8
30
  - Remove more Rails 6.0 config handling
9
31
  - Standardize all libs to support ruby 3.0, ruby 3.3 x rails 6.1 through rails 7.2 [#359](https://github.com/powerhome/power-tools/pull/359)
10
32
  - Lock activesupport requirement to ~> 7.0.8
data/docs/README.md CHANGED
@@ -42,32 +42,28 @@ users:
42
42
 
43
43
  ### `DataTaster.sample!`
44
44
 
45
- DataTaster uses its [Sample](https://github.com/powerhome/power-tools/blob/main/packages/data_taster/lib/data_taster/sample.rb) class to load the yml files, filtered through erb methods provided through its [Flavors](https://github.com/powerhome/power-tools/blob/main/packages/data_taster/lib/data_taster/flavors.rb) class.
45
+ DataTaster loads the yml files through erb methods provided by its [Flavors](https://github.com/powerhome/power-tools/blob/main/packages/data_taster/lib/data_taster/flavors.rb) class.
46
46
 
47
- Before doing so, you'll need to specify a client to use to connect to mysql and make queries. Doing so can be done by calling `DataTaster.config`, like so:
47
+ Before sampling, configure a source to read from and an output to write to with `DataTaster.setup`. Clients can be either `Mysql2::Client` or `Trilogy` connections:
48
48
 
49
49
  ```ruby
50
- # Example, using all defaults
51
-
52
- DataTaster.config(
53
- source_client: Mysql2::Client.new(db_config),
54
- working_client: Mysql2::Client.new(db_config),
55
- )
50
+ DataTaster.setup(
51
+ source: DataTaster::MysqlSource.new(source_client: Trilogy.new(source_config.dup)),
52
+ output: DataTaster::DatabaseOutput.new(target_client: Trilogy.new(target_config.dup)),
53
+ )
56
54
  ```
57
55
 
58
- This method takes several optional arguments for further configuration of data selection. The list of arguments and their defaults can be found at `components/data_taster/lib/data_taster.rb`.
56
+ `setup` also accepts `months:` (how far back `recent_table_updates` looks) and `list:` (the yml files to load, defaulting to every `data_taster_export_tables.yml` under `Rails.root`).
59
57
 
60
- When you are ready to populate your database with the selected data, you can pass `include_insert: true` to this method call so that it returns INSERT statements. Otherwise, it will only return SELECT queries, useful for testing and debugging purposes.
58
+ To write a SQL file instead of loading a database, use `DataTaster::FileOutput.new(path: "dump.sql", target_database: "my_db")` as the output.
61
59
 
62
- Asking for samples without previously configuring db clients will result in errors. However, once you have done so, sampling is easy:
60
+ Once configured, sampling is easy:
63
61
 
64
62
  ```ruby
65
- # Example, using all defaults
66
-
67
63
  DataTaster.sample!
68
64
  ```
69
65
 
70
- This will select data from the source_client and insert it using the working_client.
66
+ This selects data from the source and writes it, sanitized, to the output.
71
67
 
72
68
 
73
69
  #### Deprecating Tables
@@ -1,18 +1,19 @@
1
1
  PATH
2
2
  remote: ../../rubocop-powerhome
3
3
  specs:
4
- rubocop-powerhome (0.6.1)
4
+ rubocop-powerhome (0.8.0)
5
+ lint_roller (~> 1.1)
5
6
  rubocop (= 1.82.1)
6
- rubocop-performance
7
- rubocop-rails
8
- rubocop-rake
9
- rubocop-rspec
7
+ rubocop-performance (>= 1.24)
8
+ rubocop-rails (>= 2.28)
9
+ rubocop-rake (>= 0.7)
10
+ rubocop-rspec (>= 3.5)
10
11
 
11
12
  PATH
12
13
  remote: ..
13
14
  specs:
14
- data_taster (0.5.1)
15
- rails (>= 6.1, < 8)
15
+ data_taster (0.6.0)
16
+ rails (>= 7.1.3.2, <= 8.2)
16
17
 
17
18
  GEM
18
19
  remote: https://rubygems.org/
@@ -101,7 +102,7 @@ GEM
101
102
  ast (2.4.3)
102
103
  base64 (0.3.0)
103
104
  benchmark (0.5.0)
104
- bigdecimal (4.1.1)
105
+ bigdecimal (4.1.2)
105
106
  builder (3.3.0)
106
107
  combustion (1.5.0)
107
108
  activesupport (>= 3.0.0)
@@ -115,14 +116,14 @@ GEM
115
116
  diff-lcs (1.6.2)
116
117
  docile (1.1.5)
117
118
  drb (2.2.3)
118
- erb (6.0.2)
119
+ erb (6.0.4)
119
120
  erubi (1.13.1)
120
121
  globalid (1.3.0)
121
122
  activesupport (>= 6.1)
122
123
  i18n (1.14.8)
123
124
  concurrent-ruby (~> 1.0)
124
125
  io-console (0.8.2)
125
- irb (1.17.0)
126
+ irb (1.18.0)
126
127
  pp (>= 0.6.0)
127
128
  prism (>= 1.3.0)
128
129
  rdoc (>= 4.0.0)
@@ -150,12 +151,12 @@ GEM
150
151
  net-smtp
151
152
  marcel (1.1.0)
152
153
  mini_mime (1.1.5)
153
- minitest (6.0.3)
154
+ minitest (6.0.6)
154
155
  drb (~> 2.0)
155
156
  prism (~> 1.5)
156
157
  mutex_m (0.3.0)
157
158
  mysql2 (0.5.5)
158
- net-imap (0.6.3)
159
+ net-imap (0.6.4)
159
160
  date
160
161
  net-protocol
161
162
  net-pop (0.1.2)
@@ -165,21 +166,21 @@ GEM
165
166
  net-smtp (0.5.1)
166
167
  net-protocol
167
168
  nio4r (2.7.5)
168
- nokogiri (1.19.2-aarch64-linux-gnu)
169
+ nokogiri (1.19.3-aarch64-linux-gnu)
169
170
  racc (~> 1.4)
170
- nokogiri (1.19.2-aarch64-linux-musl)
171
+ nokogiri (1.19.3-aarch64-linux-musl)
171
172
  racc (~> 1.4)
172
- nokogiri (1.19.2-arm-linux-gnu)
173
+ nokogiri (1.19.3-arm-linux-gnu)
173
174
  racc (~> 1.4)
174
- nokogiri (1.19.2-arm-linux-musl)
175
+ nokogiri (1.19.3-arm-linux-musl)
175
176
  racc (~> 1.4)
176
- nokogiri (1.19.2-arm64-darwin)
177
+ nokogiri (1.19.3-arm64-darwin)
177
178
  racc (~> 1.4)
178
- nokogiri (1.19.2-x86_64-darwin)
179
+ nokogiri (1.19.3-x86_64-darwin)
179
180
  racc (~> 1.4)
180
- nokogiri (1.19.2-x86_64-linux-gnu)
181
+ nokogiri (1.19.3-x86_64-linux-gnu)
181
182
  racc (~> 1.4)
182
- nokogiri (1.19.2-x86_64-linux-musl)
183
+ nokogiri (1.19.3-x86_64-linux-musl)
183
184
  racc (~> 1.4)
184
185
  parallel (1.28.0)
185
186
  parser (3.3.11.1)
@@ -232,7 +233,7 @@ GEM
232
233
  thor (~> 1.0, >= 1.2.2)
233
234
  zeitwerk (~> 2.6)
234
235
  rainbow (3.1.1)
235
- rake (13.3.1)
236
+ rake (13.4.2)
236
237
  rdoc (7.2.0)
237
238
  erb
238
239
  psych (>= 4.0.0)
@@ -306,6 +307,8 @@ GEM
306
307
  thor (1.5.0)
307
308
  timeout (0.6.1)
308
309
  tomlrb (2.0.4)
310
+ trilogy (2.13.2)
311
+ bigdecimal
309
312
  tsort (0.2.0)
310
313
  tzinfo (2.0.6)
311
314
  concurrent-ruby (~> 1.0)
@@ -319,7 +322,7 @@ GEM
319
322
  with_env (1.1.0)
320
323
  xml-simple (1.1.9)
321
324
  rexml
322
- yard (0.9.38)
325
+ yard (0.9.44)
323
326
  zeitwerk (2.7.5)
324
327
 
325
328
  PLATFORMS
@@ -334,7 +337,7 @@ PLATFORMS
334
337
 
335
338
  DEPENDENCIES
336
339
  appraisal (= 2.5.0)
337
- bundler (~> 2.1)
340
+ bundler (~> 4.0)
338
341
  combustion (~> 1.3)
339
342
  data_taster!
340
343
  license_finder (~> 7.0)
@@ -348,7 +351,8 @@ DEPENDENCIES
348
351
  rubocop-powerhome!
349
352
  simplecov (= 0.15.1)
350
353
  test-unit (= 3.1.5)
351
- yard (= 0.9.38)
354
+ trilogy (= 2.13.2)
355
+ yard (= 0.9.44)
352
356
 
353
357
  BUNDLED WITH
354
- 2.5.23
358
+ 4.1.0
@@ -1,18 +1,19 @@
1
1
  PATH
2
2
  remote: ../../rubocop-powerhome
3
3
  specs:
4
- rubocop-powerhome (0.6.1)
4
+ rubocop-powerhome (0.8.0)
5
+ lint_roller (~> 1.1)
5
6
  rubocop (= 1.82.1)
6
- rubocop-performance
7
- rubocop-rails
8
- rubocop-rake
9
- rubocop-rspec
7
+ rubocop-performance (>= 1.24)
8
+ rubocop-rails (>= 2.28)
9
+ rubocop-rake (>= 0.7)
10
+ rubocop-rspec (>= 3.5)
10
11
 
11
12
  PATH
12
13
  remote: ..
13
14
  specs:
14
- data_taster (0.5.1)
15
- rails (>= 6.1, < 8)
15
+ data_taster (0.6.0)
16
+ rails (>= 7.1.3.2, <= 8.2)
16
17
 
17
18
  GEM
18
19
  remote: https://rubygems.org/
@@ -95,7 +96,7 @@ GEM
95
96
  ast (2.4.3)
96
97
  base64 (0.3.0)
97
98
  benchmark (0.5.0)
98
- bigdecimal (4.1.1)
99
+ bigdecimal (4.1.2)
99
100
  builder (3.3.0)
100
101
  combustion (1.5.0)
101
102
  activesupport (>= 3.0.0)
@@ -109,14 +110,14 @@ GEM
109
110
  diff-lcs (1.6.2)
110
111
  docile (1.1.5)
111
112
  drb (2.2.3)
112
- erb (6.0.2)
113
+ erb (6.0.4)
113
114
  erubi (1.13.1)
114
115
  globalid (1.3.0)
115
116
  activesupport (>= 6.1)
116
117
  i18n (1.14.8)
117
118
  concurrent-ruby (~> 1.0)
118
119
  io-console (0.8.2)
119
- irb (1.17.0)
120
+ irb (1.18.0)
120
121
  pp (>= 0.6.0)
121
122
  prism (>= 1.3.0)
122
123
  rdoc (>= 4.0.0)
@@ -144,11 +145,11 @@ GEM
144
145
  net-smtp
145
146
  marcel (1.1.0)
146
147
  mini_mime (1.1.5)
147
- minitest (6.0.3)
148
+ minitest (6.0.6)
148
149
  drb (~> 2.0)
149
150
  prism (~> 1.5)
150
151
  mysql2 (0.5.5)
151
- net-imap (0.6.3)
152
+ net-imap (0.6.4)
152
153
  date
153
154
  net-protocol
154
155
  net-pop (0.1.2)
@@ -158,21 +159,21 @@ GEM
158
159
  net-smtp (0.5.1)
159
160
  net-protocol
160
161
  nio4r (2.7.5)
161
- nokogiri (1.19.2-aarch64-linux-gnu)
162
+ nokogiri (1.19.3-aarch64-linux-gnu)
162
163
  racc (~> 1.4)
163
- nokogiri (1.19.2-aarch64-linux-musl)
164
+ nokogiri (1.19.3-aarch64-linux-musl)
164
165
  racc (~> 1.4)
165
- nokogiri (1.19.2-arm-linux-gnu)
166
+ nokogiri (1.19.3-arm-linux-gnu)
166
167
  racc (~> 1.4)
167
- nokogiri (1.19.2-arm-linux-musl)
168
+ nokogiri (1.19.3-arm-linux-musl)
168
169
  racc (~> 1.4)
169
- nokogiri (1.19.2-arm64-darwin)
170
+ nokogiri (1.19.3-arm64-darwin)
170
171
  racc (~> 1.4)
171
- nokogiri (1.19.2-x86_64-darwin)
172
+ nokogiri (1.19.3-x86_64-darwin)
172
173
  racc (~> 1.4)
173
- nokogiri (1.19.2-x86_64-linux-gnu)
174
+ nokogiri (1.19.3-x86_64-linux-gnu)
174
175
  racc (~> 1.4)
175
- nokogiri (1.19.2-x86_64-linux-musl)
176
+ nokogiri (1.19.3-x86_64-linux-musl)
176
177
  racc (~> 1.4)
177
178
  parallel (1.28.0)
178
179
  parser (3.3.11.1)
@@ -225,7 +226,7 @@ GEM
225
226
  thor (~> 1.0, >= 1.2.2)
226
227
  zeitwerk (~> 2.6)
227
228
  rainbow (3.1.1)
228
- rake (13.3.1)
229
+ rake (13.4.2)
229
230
  rdoc (7.2.0)
230
231
  erb
231
232
  psych (>= 4.0.0)
@@ -299,6 +300,8 @@ GEM
299
300
  thor (1.5.0)
300
301
  timeout (0.6.1)
301
302
  tomlrb (2.0.4)
303
+ trilogy (2.13.2)
304
+ bigdecimal
302
305
  tsort (0.2.0)
303
306
  tzinfo (2.0.6)
304
307
  concurrent-ruby (~> 1.0)
@@ -313,7 +316,7 @@ GEM
313
316
  with_env (1.1.0)
314
317
  xml-simple (1.1.9)
315
318
  rexml
316
- yard (0.9.38)
319
+ yard (0.9.44)
317
320
  zeitwerk (2.7.5)
318
321
 
319
322
  PLATFORMS
@@ -328,7 +331,7 @@ PLATFORMS
328
331
 
329
332
  DEPENDENCIES
330
333
  appraisal (= 2.5.0)
331
- bundler (~> 2.1)
334
+ bundler (~> 4.0)
332
335
  combustion (~> 1.3)
333
336
  data_taster!
334
337
  license_finder (~> 7.0)
@@ -342,7 +345,8 @@ DEPENDENCIES
342
345
  rubocop-powerhome!
343
346
  simplecov (= 0.15.1)
344
347
  test-unit (= 3.1.5)
345
- yard (= 0.9.38)
348
+ trilogy (= 2.13.2)
349
+ yard (= 0.9.44)
346
350
 
347
351
  BUNDLED WITH
348
- 2.5.23
352
+ 4.1.0
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file was generated by Appraisal
4
+
5
+ source "https://rubygems.org"
6
+
7
+ gem "activemodel", "~> 8.0.5"
8
+ gem "activesupport", "~> 8.0.5"
9
+ gem "rubocop-powerhome", path: "../../rubocop-powerhome"
10
+
11
+ gemspec path: "../"