data_taster 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 4600612d833abac61cc05094033474ec8922ef9f568d8a04de7eedd29e10cd72
4
+ data.tar.gz: 199e33bfe66a14fc66b6809fcb89d617697983f89d1471441f2979e4108507ed
5
+ SHA512:
6
+ metadata.gz: 32644abcc041614257de06516bee32b189939a0a504b64af7544eb47129569132c25c4e6745eca3a9eeb1253acbd8c6029824ce625663c40e706cf0e6ff83201
7
+ data.tar.gz: d11b9f52992f8b122e50c4c3663acd288fcc0e0a0047eff174301c9e17a62652fc8faa37ce92b6bda746057f04564b065d56182aba767d548090cd1921580026
data/.rubocop.yml ADDED
@@ -0,0 +1,16 @@
1
+ require:
2
+ - rubocop-powerhome
3
+
4
+ AllCops:
5
+ TargetRubyVersion: 2.7
6
+
7
+ Style/FrozenStringLiteralComment:
8
+ Exclude:
9
+ - 'gemfiles/*'
10
+
11
+ Bundler/OrderedGems:
12
+ Exclude:
13
+ - 'gemfiles/*'
14
+
15
+ Rails:
16
+ Enabled: false
data/Appraisals ADDED
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ appraise "rails-6-0" do
4
+ gem "rails", "6.0.6.1"
5
+ end
6
+
7
+ appraise "rails-6-1" do
8
+ gem "rails", "6.1.7.4"
9
+ end
10
+
11
+ appraise "rails-7-0" do
12
+ gem "rails", "7.0.6"
13
+ end
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at jill.klang@powerhrg.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gemspec
6
+
7
+ gem "nokogiri", "< 1.16"
8
+ gem "rubocop-powerhome", path: "../rubocop-powerhome", tag: "v0.5.2-rubocop-powerhome"
data/Gemfile.lock ADDED
@@ -0,0 +1,311 @@
1
+ PATH
2
+ remote: ../rubocop-powerhome
3
+ specs:
4
+ rubocop-powerhome (0.5.2)
5
+ rubocop (~> 1.52.0)
6
+ rubocop-performance
7
+ rubocop-rails
8
+ rubocop-rake
9
+ rubocop-rspec
10
+
11
+ PATH
12
+ remote: .
13
+ specs:
14
+ data_taster (0.2.2)
15
+ rails (>= 6.0)
16
+
17
+ GEM
18
+ remote: https://rubygems.org/
19
+ specs:
20
+ actioncable (7.1.2)
21
+ actionpack (= 7.1.2)
22
+ activesupport (= 7.1.2)
23
+ nio4r (~> 2.0)
24
+ websocket-driver (>= 0.6.1)
25
+ zeitwerk (~> 2.6)
26
+ actionmailbox (7.1.2)
27
+ actionpack (= 7.1.2)
28
+ activejob (= 7.1.2)
29
+ activerecord (= 7.1.2)
30
+ activestorage (= 7.1.2)
31
+ activesupport (= 7.1.2)
32
+ mail (>= 2.7.1)
33
+ net-imap
34
+ net-pop
35
+ net-smtp
36
+ actionmailer (7.1.2)
37
+ actionpack (= 7.1.2)
38
+ actionview (= 7.1.2)
39
+ activejob (= 7.1.2)
40
+ activesupport (= 7.1.2)
41
+ mail (~> 2.5, >= 2.5.4)
42
+ net-imap
43
+ net-pop
44
+ net-smtp
45
+ rails-dom-testing (~> 2.2)
46
+ actionpack (7.1.2)
47
+ actionview (= 7.1.2)
48
+ activesupport (= 7.1.2)
49
+ nokogiri (>= 1.8.5)
50
+ racc
51
+ rack (>= 2.2.4)
52
+ rack-session (>= 1.0.1)
53
+ rack-test (>= 0.6.3)
54
+ rails-dom-testing (~> 2.2)
55
+ rails-html-sanitizer (~> 1.6)
56
+ actiontext (7.1.2)
57
+ actionpack (= 7.1.2)
58
+ activerecord (= 7.1.2)
59
+ activestorage (= 7.1.2)
60
+ activesupport (= 7.1.2)
61
+ globalid (>= 0.6.0)
62
+ nokogiri (>= 1.8.5)
63
+ actionview (7.1.2)
64
+ activesupport (= 7.1.2)
65
+ builder (~> 3.1)
66
+ erubi (~> 1.11)
67
+ rails-dom-testing (~> 2.2)
68
+ rails-html-sanitizer (~> 1.6)
69
+ activejob (7.1.2)
70
+ activesupport (= 7.1.2)
71
+ globalid (>= 0.3.6)
72
+ activemodel (7.1.2)
73
+ activesupport (= 7.1.2)
74
+ activerecord (7.1.2)
75
+ activemodel (= 7.1.2)
76
+ activesupport (= 7.1.2)
77
+ timeout (>= 0.4.0)
78
+ activestorage (7.1.2)
79
+ actionpack (= 7.1.2)
80
+ activejob (= 7.1.2)
81
+ activerecord (= 7.1.2)
82
+ activesupport (= 7.1.2)
83
+ marcel (~> 1.0)
84
+ activesupport (7.1.2)
85
+ base64
86
+ bigdecimal
87
+ concurrent-ruby (~> 1.0, >= 1.0.2)
88
+ connection_pool (>= 2.2.5)
89
+ drb
90
+ i18n (>= 1.6, < 2)
91
+ minitest (>= 5.1)
92
+ mutex_m
93
+ tzinfo (~> 2.0)
94
+ appraisal (2.5.0)
95
+ bundler
96
+ rake
97
+ thor (>= 0.14.0)
98
+ ast (2.4.2)
99
+ base64 (0.2.0)
100
+ bigdecimal (3.1.5)
101
+ builder (3.2.4)
102
+ concurrent-ruby (1.2.2)
103
+ connection_pool (2.4.1)
104
+ crass (1.0.6)
105
+ date (3.3.4)
106
+ diff-lcs (1.5.0)
107
+ docile (1.1.5)
108
+ drb (2.2.0)
109
+ ruby2_keywords
110
+ erubi (1.12.0)
111
+ globalid (1.2.1)
112
+ activesupport (>= 6.1)
113
+ i18n (1.14.1)
114
+ concurrent-ruby (~> 1.0)
115
+ io-console (0.7.1)
116
+ irb (1.11.0)
117
+ rdoc
118
+ reline (>= 0.3.8)
119
+ json (2.7.1)
120
+ license_finder (7.1.0)
121
+ bundler
122
+ rubyzip (>= 1, < 3)
123
+ thor (~> 1.2)
124
+ tomlrb (>= 1.3, < 2.1)
125
+ with_env (= 1.1.0)
126
+ xml-simple (~> 1.1.9)
127
+ loofah (2.22.0)
128
+ crass (~> 1.0.2)
129
+ nokogiri (>= 1.12.0)
130
+ mail (2.8.1)
131
+ mini_mime (>= 0.1.1)
132
+ net-imap
133
+ net-pop
134
+ net-smtp
135
+ marcel (1.0.2)
136
+ mini_mime (1.1.5)
137
+ mini_portile2 (2.8.5)
138
+ minitest (5.20.0)
139
+ mutex_m (0.2.0)
140
+ net-imap (0.4.9.1)
141
+ date
142
+ net-protocol
143
+ net-pop (0.1.2)
144
+ net-protocol
145
+ net-protocol (0.2.2)
146
+ timeout
147
+ net-smtp (0.4.0.1)
148
+ net-protocol
149
+ nio4r (2.7.0)
150
+ nokogiri (1.15.5)
151
+ mini_portile2 (~> 2.8.2)
152
+ racc (~> 1.4)
153
+ nokogiri (1.15.5-arm64-darwin)
154
+ racc (~> 1.4)
155
+ nokogiri (1.15.5-x86_64-darwin)
156
+ racc (~> 1.4)
157
+ nokogiri (1.15.5-x86_64-linux)
158
+ racc (~> 1.4)
159
+ parallel (1.24.0)
160
+ parser (3.3.0.2)
161
+ ast (~> 2.4.1)
162
+ racc
163
+ power_assert (2.0.3)
164
+ psych (5.1.2)
165
+ stringio
166
+ racc (1.7.3)
167
+ rack (3.0.8)
168
+ rack-session (2.0.0)
169
+ rack (>= 3.0.0)
170
+ rack-test (2.1.0)
171
+ rack (>= 1.3)
172
+ rackup (2.1.0)
173
+ rack (>= 3)
174
+ webrick (~> 1.8)
175
+ rails (7.1.2)
176
+ actioncable (= 7.1.2)
177
+ actionmailbox (= 7.1.2)
178
+ actionmailer (= 7.1.2)
179
+ actionpack (= 7.1.2)
180
+ actiontext (= 7.1.2)
181
+ actionview (= 7.1.2)
182
+ activejob (= 7.1.2)
183
+ activemodel (= 7.1.2)
184
+ activerecord (= 7.1.2)
185
+ activestorage (= 7.1.2)
186
+ activesupport (= 7.1.2)
187
+ bundler (>= 1.15.0)
188
+ railties (= 7.1.2)
189
+ rails-dom-testing (2.2.0)
190
+ activesupport (>= 5.0.0)
191
+ minitest
192
+ nokogiri (>= 1.6)
193
+ rails-html-sanitizer (1.6.0)
194
+ loofah (~> 2.21)
195
+ nokogiri (~> 1.14)
196
+ railties (7.1.2)
197
+ actionpack (= 7.1.2)
198
+ activesupport (= 7.1.2)
199
+ irb
200
+ rackup (>= 1.0.0)
201
+ rake (>= 12.2)
202
+ thor (~> 1.0, >= 1.2.2)
203
+ zeitwerk (~> 2.6)
204
+ rainbow (2.2.2)
205
+ rake
206
+ rake (13.1.0)
207
+ rdoc (6.6.2)
208
+ psych (>= 4.0.0)
209
+ regexp_parser (2.9.0)
210
+ reline (0.4.2)
211
+ io-console (~> 0.5)
212
+ rexml (3.2.6)
213
+ rspec (3.12.0)
214
+ rspec-core (~> 3.12.0)
215
+ rspec-expectations (~> 3.12.0)
216
+ rspec-mocks (~> 3.12.0)
217
+ rspec-core (3.12.2)
218
+ rspec-support (~> 3.12.0)
219
+ rspec-expectations (3.12.3)
220
+ diff-lcs (>= 1.2.0, < 2.0)
221
+ rspec-support (~> 3.12.0)
222
+ rspec-mocks (3.12.6)
223
+ diff-lcs (>= 1.2.0, < 2.0)
224
+ rspec-support (~> 3.12.0)
225
+ rspec-support (3.12.1)
226
+ rubocop (1.52.1)
227
+ json (~> 2.3)
228
+ parallel (~> 1.10)
229
+ parser (>= 3.2.2.3)
230
+ rainbow (>= 2.2.2, < 4.0)
231
+ regexp_parser (>= 1.8, < 3.0)
232
+ rexml (>= 3.2.5, < 4.0)
233
+ rubocop-ast (>= 1.28.0, < 2.0)
234
+ ruby-progressbar (~> 1.7)
235
+ unicode-display_width (>= 2.4.0, < 3.0)
236
+ rubocop-ast (1.30.0)
237
+ parser (>= 3.2.1.0)
238
+ rubocop-capybara (2.20.0)
239
+ rubocop (~> 1.41)
240
+ rubocop-factory_bot (2.25.0)
241
+ rubocop (~> 1.33)
242
+ rubocop-performance (1.20.1)
243
+ rubocop (>= 1.48.1, < 2.0)
244
+ rubocop-ast (>= 1.30.0, < 2.0)
245
+ rubocop-rails (2.23.1)
246
+ activesupport (>= 4.2.0)
247
+ rack (>= 1.1)
248
+ rubocop (>= 1.33.0, < 2.0)
249
+ rubocop-ast (>= 1.30.0, < 2.0)
250
+ rubocop-rake (0.6.0)
251
+ rubocop (~> 1.0)
252
+ rubocop-rspec (2.26.1)
253
+ rubocop (~> 1.40)
254
+ rubocop-capybara (~> 2.17)
255
+ rubocop-factory_bot (~> 2.22)
256
+ ruby-progressbar (1.13.0)
257
+ ruby2_keywords (0.0.5)
258
+ rubyzip (2.3.2)
259
+ simplecov (0.15.1)
260
+ docile (~> 1.1.0)
261
+ json (>= 1.8, < 3)
262
+ simplecov-html (~> 0.10.0)
263
+ simplecov-html (0.10.2)
264
+ stringio (3.1.0)
265
+ test-unit (3.1.5)
266
+ power_assert
267
+ thor (1.3.0)
268
+ timeout (0.4.1)
269
+ tomlrb (2.0.3)
270
+ tzinfo (2.0.6)
271
+ concurrent-ruby (~> 1.0)
272
+ unicode-display_width (2.5.0)
273
+ webrick (1.8.1)
274
+ websocket-driver (0.7.6)
275
+ websocket-extensions (>= 0.1.0)
276
+ websocket-extensions (0.1.5)
277
+ with_env (1.1.0)
278
+ xml-simple (1.1.9)
279
+ rexml
280
+ yard (0.9.34)
281
+ zeitwerk (2.6.12)
282
+
283
+ PLATFORMS
284
+ arm64-darwin-20
285
+ arm64-darwin-21
286
+ arm64-darwin-22
287
+ arm64-darwin-23
288
+ ruby
289
+ x86_64-darwin-20
290
+ x86_64-darwin-21
291
+ x86_64-darwin-22
292
+ x86_64-darwin-23
293
+ x86_64-linux
294
+
295
+ DEPENDENCIES
296
+ appraisal (= 2.5.0)
297
+ bundler (~> 2.1)
298
+ data_taster!
299
+ license_finder (~> 7.0)
300
+ nokogiri (< 1.16)
301
+ parser (>= 2.5, != 2.5.1.1)
302
+ rainbow (= 2.2.2)
303
+ rake (~> 13.0)
304
+ rspec (~> 3.0)
305
+ rubocop-powerhome!
306
+ simplecov (= 0.15.1)
307
+ test-unit (= 3.1.5)
308
+ yard (= 0.9.34)
309
+
310
+ BUNDLED WITH
311
+ 2.5.4
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 Jill Klang
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # DataTaster
2
+
3
+ TODO: Delete this and the text below, and describe your gem
4
+
5
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/data_taster`. To experiment with that code, run `bin/console` for an interactive prompt.
6
+
7
+ ## Installation
8
+
9
+ TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
+
11
+ Install the gem and add to the application's Gemfile by executing:
12
+
13
+ $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
14
+
15
+ If bundler is not being used to manage dependencies, install the gem by executing:
16
+
17
+ $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Development
24
+
25
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
26
+
27
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
28
+
29
+ ## Contributing
30
+
31
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/data_taster. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/data_taster/blob/main/CODE_OF_CONDUCT.md).
32
+
33
+ ## License
34
+
35
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
36
+
37
+ ## Code of Conduct
38
+
39
+ Everyone interacting in the DataTaster project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/data_taster/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
@@ -0,0 +1,9 @@
1
+ ---
2
+ - - :inherit_from
3
+ - https://raw.githubusercontent.com/powerhome/oss-guide/master/license_rules.yml
4
+ - - :permit
5
+ - MIT AND (BSD-2-Clause OR GPL-2.0-or-later)
6
+ - :who:
7
+ :why:
8
+ :versions: []
9
+ :when: 2024-01-04 20:18:22.141453000 Z
data/docs/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.2.0] - 2023-12-24
4
+
5
+ - Rollout of basic features. See README for details.
6
+
7
+ ## [0.1.0] - 2023-05-30
8
+
9
+ - Initial release
data/docs/README.md ADDED
@@ -0,0 +1,75 @@
1
+ # 🍭 Data Taster
2
+
3
+ Database exporting tool.
4
+
5
+ ## Usage
6
+
7
+ ### `data_taster_export_tables.yml`
8
+
9
+ With DataTaster, you can configure certain tables and rows to be pulled from the source_db. Look for (or create) a `data_taster_export_tables.yml` file anywhere in your repo (for example, this could live under `config/` or `db/`).
10
+
11
+ By default, any table that has nothing specified in the files will not have any data selected from the source client.
12
+
13
+ Each key should represent the table name that you are defining rules for. If you don't have any custom rows to sanitize, the value should be a clause that will be wrapped in a MySQL WHERE clause. DataTaster will automatically look for any files with that name and include them in the export.
14
+
15
+ ```ruby
16
+ # Example, simple usage
17
+
18
+ sales_summaries: quarter_start_date >= '<%= Date.current.last_year.beginning_of_quarter %>'
19
+ ```
20
+
21
+ If you have columns that you need to sanitize, you'll need to specify the column names and values along with the selections. Note that many things get sanitized by default.
22
+
23
+ ```ruby
24
+ # Example, with sanitization specified
25
+
26
+ sales_summaries:
27
+ select: "quarter_start_date >= '<%= Date.current.last_year.beginning_of_quarter %>'"
28
+ sanitize:
29
+ comp_total: 9999.99
30
+ ```
31
+
32
+ ### Default Sanitization
33
+
34
+ To help protect data, DataTaster scans columns that it's importing against of blocklist of terms that it identifies as high risk (you can see the full list of default sanitizations at `lib/data_taster/sanitizer.rb`.). If the term is a match against its list and there is no custom sanitization defined, it will attempt to sanitize the column. If you do not need to sanitize that column, you can always skip it:
35
+
36
+ ```ruby
37
+ users:
38
+ select: "activated_at IS NOT NULL"
39
+ sanitize:
40
+ retain_email: "<%= skip_sanitization %>"
41
+ ```
42
+
43
+ ### `DataTaster.sample!`
44
+
45
+ DataTaster uses its [Sample](https://github.com/powerhome/nitro-web/blob/master/components/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/nitro-web/blob/master/components/data_taster/lib/data_taster/flavors.rb) class.
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:
48
+
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
+ )
56
+ ```
57
+
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`.
59
+
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.
61
+
62
+ Asking for samples without previously configuring db clients will result in errors. However, once you have done so, sampling is easy:
63
+
64
+ ```ruby
65
+ # Example, using all defaults
66
+
67
+ DataTaster.sample!
68
+ ```
69
+
70
+ This will select data from the source_client and insert it using the working_client.
71
+
72
+
73
+ #### Deprecating Tables
74
+
75
+ DataTaster queries directly on the source_client to retrieve the list of tables to work on, which can cause issues when tables are removed -- migrations that have run in one environment may not have yet run in another. In order to maintain smoother transitions, use the `deprecated_table` method found in the DataTaster#Flavors file to mark the table as one that should include neither the schema nor the data.
@@ -0,0 +1,2 @@
1
+ ---
2
+ BUNDLE_RETRY: "1"
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "nokogiri", "< 1.16"
6
+ gem "rubocop-powerhome", path: "../../rubocop-powerhome", tag: "v0.5.2-rubocop-powerhome"
7
+ gem "rails", "6.0.6.1"
8
+
9
+ gemspec path: "../"