masking 1.0.1 → 1.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/.circleci/config.yml +18 -8
- data/.github/workflows/acceptance_test_mariadb.yml +57 -1
- data/.github/workflows/acceptance_test_mysql.yml +1 -1
- data/.rubocop.yml +8 -2
- data/.rubocop_todo.yml +105 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +24 -1
- data/Dockerfile +8 -4
- data/Gemfile +20 -0
- data/Gemfile.lock +72 -55
- data/README.md +20 -9
- data/acceptance/expected_query_result.txt +36 -30
- data/acceptance/import_dumpfile.sql +3 -1
- data/acceptance/masking.yml +2 -0
- data/acceptance/run_test.sh +1 -1
- data/docker-compose/mariadb1010.yml +17 -0
- data/docker-compose/mariadb1011.yml +17 -0
- data/docker-compose/mariadb105.yml +17 -0
- data/docker-compose/mariadb106.yml +17 -0
- data/docker-compose/mariadb107.yml +17 -0
- data/docker-compose/mariadb108.yml +17 -0
- data/docker-compose/mariadb109.yml +17 -0
- data/lib/masking/cli/error_message.rb +1 -1
- data/lib/masking/config/target_columns/column.rb +19 -5
- data/lib/masking/config/target_columns/method/string_binary_distinctor.rb +3 -3
- data/lib/masking/config/target_columns/method/type/base.rb +25 -0
- data/lib/masking/config/target_columns/method/type/binary.rb +19 -0
- data/lib/masking/config/target_columns/method/type/boolean.rb +27 -0
- data/lib/masking/config/target_columns/method/type/date.rb +28 -0
- data/lib/masking/config/target_columns/method/type/extension/ignore_null.rb +24 -0
- data/lib/masking/config/target_columns/method/type/float.rb +19 -0
- data/lib/masking/config/target_columns/method/type/integer.rb +19 -0
- data/lib/masking/config/target_columns/method/{null.rb → type/null.rb} +5 -5
- data/lib/masking/config/target_columns/method/type/string.rb +37 -0
- data/lib/masking/config/target_columns/method/type/time.rb +26 -0
- data/lib/masking/config/target_columns/method.rb +16 -12
- data/lib/masking/config/target_columns.rb +1 -1
- data/lib/masking/insert_statement/sql_builder.rb +2 -2
- data/lib/masking/insert_statement.rb +1 -1
- data/lib/masking/sql_dump_line.rb +1 -0
- data/lib/masking/version.rb +1 -1
- data/masking.gemspec +2 -19
- metadata +28 -185
- data/lib/masking/config/target_columns/method/binary.rb +0 -23
- data/lib/masking/config/target_columns/method/boolean.rb +0 -29
- data/lib/masking/config/target_columns/method/date.rb +0 -30
- data/lib/masking/config/target_columns/method/float.rb +0 -23
- data/lib/masking/config/target_columns/method/integer.rb +0 -23
- data/lib/masking/config/target_columns/method/string.rb +0 -33
- data/lib/masking/config/target_columns/method/time.rb +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8229ba5463b487ff90ed68d770ce32e07d5d02859c12836eae99dc465ebe1378
|
4
|
+
data.tar.gz: 3b046df36bc1576e02412df76de34fa03c31583e4d8cc89c0c417dcbe86f09fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cd6d9271cbcdadc50281189db5e4ed73111996544d47ddb553b33e4d82a838d7dcc95b649ca6462cf9f1742256602feb22f973cba98adf5ebebb7b3fbb3ff79
|
7
|
+
data.tar.gz: f0dd87ee111bd69ef6586ce3aa18baf9b7734b8843c8d00b2480308244db7e98cb87f04f196ccd530d1690b0697f039dd7683ae60f147a8b66971ff762c0459e
|
data/.circleci/config.yml
CHANGED
@@ -2,7 +2,7 @@ version: 2.1
|
|
2
2
|
|
3
3
|
test_attributes: &test_attributes
|
4
4
|
docker:
|
5
|
-
- image:
|
5
|
+
- image: cimg/base:current
|
6
6
|
resource_class: small
|
7
7
|
steps:
|
8
8
|
- checkout
|
@@ -14,10 +14,22 @@ test_attributes: &test_attributes
|
|
14
14
|
name: output Ruby version (debug)
|
15
15
|
command: docker run --entrypoint sh masking-$RUBY_VERSION-$CIRCLE_SHA1 -c "ruby -v" # debug
|
16
16
|
- run:
|
17
|
-
name: run test
|
18
|
-
command: docker run --entrypoint sh -e CI -e CODECOV_TOKEN masking-$RUBY_VERSION-$CIRCLE_SHA1 -c "bundle exec
|
17
|
+
name: run test & rubocop & notes
|
18
|
+
command: docker run --entrypoint sh -e CI -e CODECOV_TOKEN masking-$RUBY_VERSION-$CIRCLE_SHA1 -c "bundle exec rake"
|
19
19
|
|
20
20
|
jobs:
|
21
|
+
test-ruby32:
|
22
|
+
<<: *test_attributes
|
23
|
+
environment:
|
24
|
+
RUBY_VERSION: '3.2'
|
25
|
+
test-ruby31:
|
26
|
+
<<: *test_attributes
|
27
|
+
environment:
|
28
|
+
RUBY_VERSION: '3.1'
|
29
|
+
test-ruby30:
|
30
|
+
<<: *test_attributes
|
31
|
+
environment:
|
32
|
+
RUBY_VERSION: '3.0'
|
21
33
|
test-ruby27:
|
22
34
|
<<: *test_attributes
|
23
35
|
environment:
|
@@ -26,14 +38,12 @@ jobs:
|
|
26
38
|
<<: *test_attributes
|
27
39
|
environment:
|
28
40
|
RUBY_VERSION: '2.6'
|
29
|
-
test-ruby25:
|
30
|
-
<<: *test_attributes
|
31
|
-
environment:
|
32
|
-
RUBY_VERSION: '2.5'
|
33
41
|
|
34
42
|
workflows:
|
35
43
|
'CircleCI: build':
|
36
44
|
jobs:
|
45
|
+
- test-ruby32
|
46
|
+
- test-ruby31
|
47
|
+
- test-ruby30
|
37
48
|
- test-ruby26
|
38
|
-
- test-ruby25
|
39
49
|
- test-ruby27
|
@@ -2,10 +2,66 @@ name: Acceptance Test MariaDB
|
|
2
2
|
on:
|
3
3
|
push:
|
4
4
|
branches:
|
5
|
-
-
|
5
|
+
- main
|
6
6
|
pull_request:
|
7
7
|
|
8
8
|
jobs:
|
9
|
+
mariadb1011:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v1
|
13
|
+
with:
|
14
|
+
fetch-depth: 1 # shallow clone
|
15
|
+
- name: run test
|
16
|
+
run: docker-compose/acceptance_test.sh mariadb1011 docker-compose-ci.yml
|
17
|
+
mariadb1010:
|
18
|
+
runs-on: ubuntu-latest
|
19
|
+
steps:
|
20
|
+
- uses: actions/checkout@v1
|
21
|
+
with:
|
22
|
+
fetch-depth: 1 # shallow clone
|
23
|
+
- name: run test
|
24
|
+
run: docker-compose/acceptance_test.sh mariadb1010 docker-compose-ci.yml
|
25
|
+
mariadb109:
|
26
|
+
runs-on: ubuntu-latest
|
27
|
+
steps:
|
28
|
+
- uses: actions/checkout@v1
|
29
|
+
with:
|
30
|
+
fetch-depth: 1 # shallow clone
|
31
|
+
- name: run test
|
32
|
+
run: docker-compose/acceptance_test.sh mariadb109 docker-compose-ci.yml
|
33
|
+
mariadb108:
|
34
|
+
runs-on: ubuntu-latest
|
35
|
+
steps:
|
36
|
+
- uses: actions/checkout@v1
|
37
|
+
with:
|
38
|
+
fetch-depth: 1 # shallow clone
|
39
|
+
- name: run test
|
40
|
+
run: docker-compose/acceptance_test.sh mariadb108 docker-compose-ci.yml
|
41
|
+
mariadb107:
|
42
|
+
runs-on: ubuntu-latest
|
43
|
+
steps:
|
44
|
+
- uses: actions/checkout@v1
|
45
|
+
with:
|
46
|
+
fetch-depth: 1 # shallow clone
|
47
|
+
- name: run test
|
48
|
+
run: docker-compose/acceptance_test.sh mariadb107 docker-compose-ci.yml
|
49
|
+
mariadb106:
|
50
|
+
runs-on: ubuntu-latest
|
51
|
+
steps:
|
52
|
+
- uses: actions/checkout@v1
|
53
|
+
with:
|
54
|
+
fetch-depth: 1 # shallow clone
|
55
|
+
- name: run test
|
56
|
+
run: docker-compose/acceptance_test.sh mariadb106 docker-compose-ci.yml
|
57
|
+
mariadb105:
|
58
|
+
runs-on: ubuntu-latest
|
59
|
+
steps:
|
60
|
+
- uses: actions/checkout@v1
|
61
|
+
with:
|
62
|
+
fetch-depth: 1 # shallow clone
|
63
|
+
- name: run test
|
64
|
+
run: docker-compose/acceptance_test.sh mariadb105 docker-compose-ci.yml
|
9
65
|
mariadb104:
|
10
66
|
runs-on: ubuntu-latest
|
11
67
|
steps:
|
data/.rubocop.yml
CHANGED
@@ -1,11 +1,17 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
3
|
+
require:
|
4
|
+
- rubocop-rspec
|
5
|
+
|
1
6
|
AllCops:
|
7
|
+
NewCops: enable
|
2
8
|
Exclude:
|
3
9
|
- 'vendor/**/*'
|
4
10
|
- 'spec/fixtures/**/*'
|
5
11
|
- 'tmp/**/*'
|
6
|
-
TargetRubyVersion: 2.
|
12
|
+
TargetRubyVersion: 2.6
|
7
13
|
|
8
|
-
|
14
|
+
Layout/LineLength:
|
9
15
|
Max: 120
|
10
16
|
|
11
17
|
Metrics/BlockLength:
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2023-02-26 19:42:34 UTC using RuboCop version 1.46.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 1
|
10
|
+
RSpec/AnyInstance:
|
11
|
+
Exclude:
|
12
|
+
- 'spec/masking/config_spec.rb'
|
13
|
+
|
14
|
+
# Offense count: 39
|
15
|
+
# Configuration parameters: Prefixes, AllowedPatterns.
|
16
|
+
# Prefixes: when, with, without
|
17
|
+
RSpec/ContextWording:
|
18
|
+
Exclude:
|
19
|
+
- 'spec/integration/commandline_spec.rb'
|
20
|
+
- 'spec/masking/cli_spec.rb'
|
21
|
+
- 'spec/masking/config/target_columns/column_spec.rb'
|
22
|
+
- 'spec/masking/config/target_columns/method/binary_spec.rb'
|
23
|
+
- 'spec/masking/config/target_columns/method/string_binary_distinctor_spec.rb'
|
24
|
+
- 'spec/masking/config/target_columns/method_spec.rb'
|
25
|
+
- 'spec/masking/config/target_columns_spec.rb'
|
26
|
+
- 'spec/masking/config_spec.rb'
|
27
|
+
- 'spec/masking/data_mask_processor/cache_spec.rb'
|
28
|
+
- 'spec/masking/insert_statement_spec.rb'
|
29
|
+
- 'spec/masking/sql_dump_line_spec.rb'
|
30
|
+
|
31
|
+
# Offense count: 1
|
32
|
+
# Configuration parameters: IgnoredMetadata.
|
33
|
+
RSpec/DescribeClass:
|
34
|
+
Exclude:
|
35
|
+
- '**/spec/features/**/*'
|
36
|
+
- '**/spec/requests/**/*'
|
37
|
+
- '**/spec/routing/**/*'
|
38
|
+
- '**/spec/system/**/*'
|
39
|
+
- '**/spec/views/**/*'
|
40
|
+
- 'spec/integration/commandline_spec.rb'
|
41
|
+
|
42
|
+
# Offense count: 6
|
43
|
+
# Configuration parameters: CountAsOne.
|
44
|
+
RSpec/ExampleLength:
|
45
|
+
Max: 7
|
46
|
+
|
47
|
+
# Offense count: 1
|
48
|
+
RSpec/ExpectInHook:
|
49
|
+
Exclude:
|
50
|
+
- 'spec/masking/insert_statement_spec.rb'
|
51
|
+
|
52
|
+
# Offense count: 4
|
53
|
+
RSpec/ExpectOutput:
|
54
|
+
Exclude:
|
55
|
+
- 'spec/masking/cli_spec.rb'
|
56
|
+
|
57
|
+
# Offense count: 1
|
58
|
+
RSpec/MessageChain:
|
59
|
+
Exclude:
|
60
|
+
- 'spec/masking_spec.rb'
|
61
|
+
|
62
|
+
# Offense count: 16
|
63
|
+
# Configuration parameters: .
|
64
|
+
# SupportedStyles: have_received, receive
|
65
|
+
RSpec/MessageSpies:
|
66
|
+
EnforcedStyle: receive
|
67
|
+
|
68
|
+
# Offense count: 5
|
69
|
+
RSpec/MultipleExpectations:
|
70
|
+
Max: 3
|
71
|
+
|
72
|
+
# Offense count: 44
|
73
|
+
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
|
74
|
+
# SupportedStyles: always, named_only
|
75
|
+
RSpec/NamedSubject:
|
76
|
+
Exclude:
|
77
|
+
- 'spec/masking/cli/error_message_spec.rb'
|
78
|
+
- 'spec/masking/config/target_columns/column_spec.rb'
|
79
|
+
- 'spec/masking/config/target_columns/method/binary_spec.rb'
|
80
|
+
- 'spec/masking/config/target_columns/method/string_spec.rb'
|
81
|
+
- 'spec/masking/config/target_columns/method_spec.rb'
|
82
|
+
- 'spec/masking/config/target_columns/table_spec.rb'
|
83
|
+
- 'spec/masking/config/target_columns_spec.rb'
|
84
|
+
- 'spec/masking/config_spec.rb'
|
85
|
+
- 'spec/masking/insert_statement/sql_builder_spec.rb'
|
86
|
+
- 'spec/masking/insert_statement_spec.rb'
|
87
|
+
- 'spec/masking_spec.rb'
|
88
|
+
|
89
|
+
# Offense count: 19
|
90
|
+
# Configuration parameters: AllowedGroups.
|
91
|
+
RSpec/NestedGroups:
|
92
|
+
Max: 5
|
93
|
+
|
94
|
+
# Offense count: 4
|
95
|
+
RSpec/RepeatedExampleGroupDescription:
|
96
|
+
Exclude:
|
97
|
+
- 'spec/integration/commandline_spec.rb'
|
98
|
+
- 'spec/masking/cli_spec.rb'
|
99
|
+
|
100
|
+
# Offense count: 3
|
101
|
+
RSpec/StubbedMock:
|
102
|
+
Exclude:
|
103
|
+
- 'spec/masking/cli_spec.rb'
|
104
|
+
- 'spec/masking/config/target_columns/method_spec.rb'
|
105
|
+
- 'spec/masking/sql_dump_line_spec.rb'
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
3.2.1
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [v1.1.1] - 2023-04-03
|
11
|
+
|
12
|
+
### Added
|
13
|
+
|
14
|
+
- add ignore NULL option [#66](https://github.com/kibitan/masking/pull/66) requested feature by [#59](https://github.com/kibitan/masking/pull/59) from @spyro2000
|
15
|
+
- add MariaDB 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11 support [#65](https://github.com/kibitan/masking/pull/65)
|
16
|
+
- add Ruby 3.2 support [#64](https://github.com/kibitan/masking/pull/64)
|
17
|
+
- update development libraries [#61](https://github.com/kibitan/masking/pull/61)
|
18
|
+
|
19
|
+
## [v1.1.0] - 2023-02-25 Happy #ruby30th Birthday🎉
|
20
|
+
|
21
|
+
### Added
|
22
|
+
|
23
|
+
- add Ruby 3.0 support [#55](https://github.com/kibitan/masking/pull/55)
|
24
|
+
- add Ruby 3.1 support [#60](https://github.com/kibitan/masking/pull/60)
|
25
|
+
- drop Ruby 2.5 support [#60](https://github.com/kibitan/masking/pull/60)
|
26
|
+
|
27
|
+
### Security
|
28
|
+
|
29
|
+
- chore(deps): bump kramdown from 2.1.0 to 2.3.0 [#54](https://github.com/kibitan/masking/pull/54)
|
30
|
+
|
10
31
|
## [v1.0.1] - 2019-12-31
|
11
32
|
|
12
33
|
### Added
|
@@ -56,7 +77,9 @@ $ bin/benchmark.rb
|
|
56
77
|
|
57
78
|
Initial release version. 🎉
|
58
79
|
|
59
|
-
[Unreleased]: https://github.com/kibitan/masking/compare/v1.
|
80
|
+
[Unreleased]: https://github.com/kibitan/masking/compare/v1.1.0...HEAD
|
81
|
+
[v1.1.0]: https://github.com/kibitan/masking/compare/v1.0.1...v1.1.0
|
82
|
+
[v1.0.1]: https://github.com/kibitan/masking/compare/v1.0.0...v1.0.1
|
60
83
|
[v1.0.0]: https://github.com/kibitan/masking/compare/v0.0.3...v1.0.0
|
61
84
|
[v0.0.3]: https://github.com/kibitan/masking/compare/v0.0.2...v0.0.3
|
62
85
|
[v0.0.2]: https://github.com/kibitan/masking/compare/v0.0.1...v0.0.2
|
data/Dockerfile
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
ARG ruby_version=2
|
1
|
+
ARG ruby_version=3.2
|
2
2
|
|
3
3
|
FROM ruby:$ruby_version-alpine AS builder
|
4
4
|
RUN apk add --no-cache build-base git
|
5
|
-
WORKDIR /app
|
6
5
|
RUN addgroup -S app && adduser -S -G app app
|
7
6
|
USER app
|
7
|
+
WORKDIR /app
|
8
8
|
COPY --chown=app . ./
|
9
|
-
RUN gem install bundler:2.
|
9
|
+
RUN gem install bundler:2.4.7 && bundle install -j "$(nproc)"
|
10
10
|
|
11
11
|
FROM builder AS with-mysql-client
|
12
12
|
USER root
|
@@ -14,11 +14,15 @@ RUN apk add --no-cache mysql-client
|
|
14
14
|
USER app
|
15
15
|
|
16
16
|
FROM ruby:$ruby_version-alpine
|
17
|
-
WORKDIR /app
|
18
17
|
# TODO: remove dependecy of `git` from masking.gemspec:L19
|
19
18
|
RUN apk add --no-cache git
|
20
19
|
RUN addgroup -S app && adduser -S -G app app
|
20
|
+
ENV PATH $PATH:/app/exe
|
21
|
+
WORKDIR /app
|
22
|
+
RUN chown app /app
|
21
23
|
USER app
|
22
24
|
COPY --from=builder /usr/local/bundle/ /usr/local/bundle/
|
23
25
|
COPY --chown=app . ./
|
26
|
+
# workaround: at some reason, ruby-prof is not recognized in Ruby 2.6 image https://app.circleci.com/pipelines/github/kibitan/masking/197/workflows/8cbdb843-a42f-413a-ab2f-9c5f74397d43/jobs/512
|
27
|
+
RUN bundle
|
24
28
|
ENTRYPOINT ["bundle", "exec", "exe/masking"]
|
data/Gemfile
CHANGED
@@ -4,5 +4,25 @@ source 'https://rubygems.org'
|
|
4
4
|
|
5
5
|
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
6
6
|
|
7
|
+
gem 'bundler'
|
8
|
+
gem 'rake'
|
9
|
+
gem 'rake-notes'
|
10
|
+
gem 'ruby-prof'
|
11
|
+
|
12
|
+
# linter/static analyzer
|
13
|
+
gem 'mdl'
|
14
|
+
gem 'rubocop'
|
15
|
+
gem 'rubocop-rspec'
|
16
|
+
|
17
|
+
# test
|
18
|
+
gem 'codecov'
|
19
|
+
gem 'rspec'
|
20
|
+
gem 'simplecov'
|
21
|
+
|
22
|
+
# debug
|
23
|
+
gem 'pry'
|
24
|
+
gem 'pry-byebug'
|
25
|
+
gem 'tapp'
|
26
|
+
|
7
27
|
# Specify your gem's dependencies in masking.gemspec
|
8
28
|
gemspec
|
data/Gemfile.lock
CHANGED
@@ -1,82 +1,98 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
masking (1.
|
4
|
+
masking (1.1.1)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
ast (2.4.
|
10
|
-
byebug (11.
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
coderay (1.1.
|
9
|
+
ast (2.4.2)
|
10
|
+
byebug (11.1.3)
|
11
|
+
chef-utils (18.1.0)
|
12
|
+
concurrent-ruby
|
13
|
+
codecov (0.6.0)
|
14
|
+
simplecov (>= 0.15, < 0.22)
|
15
|
+
coderay (1.1.3)
|
16
16
|
colored (1.2)
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
json (2.3
|
21
|
-
kramdown (2.
|
17
|
+
concurrent-ruby (1.2.2)
|
18
|
+
diff-lcs (1.5.0)
|
19
|
+
docile (1.4.0)
|
20
|
+
json (2.6.3)
|
21
|
+
kramdown (2.4.0)
|
22
|
+
rexml
|
22
23
|
kramdown-parser-gfm (1.1.0)
|
23
24
|
kramdown (~> 2.0)
|
24
|
-
mdl (0.
|
25
|
-
kramdown (~> 2.
|
26
|
-
kramdown-parser-gfm (~> 1.
|
25
|
+
mdl (0.12.0)
|
26
|
+
kramdown (~> 2.3)
|
27
|
+
kramdown-parser-gfm (~> 1.1)
|
27
28
|
mixlib-cli (~> 2.1, >= 2.1.1)
|
28
29
|
mixlib-config (>= 2.2.1, < 4)
|
29
|
-
|
30
|
-
|
31
|
-
mixlib-
|
30
|
+
mixlib-shellout
|
31
|
+
method_source (1.0.0)
|
32
|
+
mixlib-cli (2.1.8)
|
33
|
+
mixlib-config (3.0.27)
|
32
34
|
tomlrb
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
35
|
+
mixlib-shellout (3.2.7)
|
36
|
+
chef-utils
|
37
|
+
parallel (1.22.1)
|
38
|
+
parser (3.2.1.0)
|
39
|
+
ast (~> 2.4.1)
|
40
|
+
pry (0.14.2)
|
41
|
+
coderay (~> 1.1)
|
42
|
+
method_source (~> 1.0)
|
43
|
+
pry-byebug (3.10.1)
|
40
44
|
byebug (~> 11.0)
|
41
|
-
pry (
|
42
|
-
rainbow (3.
|
43
|
-
rake (13.0.
|
45
|
+
pry (>= 0.13, < 0.15)
|
46
|
+
rainbow (3.1.1)
|
47
|
+
rake (13.0.6)
|
44
48
|
rake-notes (0.2.2)
|
45
49
|
colored
|
46
50
|
rake
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
rspec-
|
51
|
-
|
52
|
-
rspec-
|
53
|
-
rspec-
|
51
|
+
regexp_parser (2.7.0)
|
52
|
+
rexml (3.2.5)
|
53
|
+
rspec (3.12.0)
|
54
|
+
rspec-core (~> 3.12.0)
|
55
|
+
rspec-expectations (~> 3.12.0)
|
56
|
+
rspec-mocks (~> 3.12.0)
|
57
|
+
rspec-core (3.12.1)
|
58
|
+
rspec-support (~> 3.12.0)
|
59
|
+
rspec-expectations (3.12.2)
|
54
60
|
diff-lcs (>= 1.2.0, < 2.0)
|
55
|
-
rspec-support (~> 3.
|
56
|
-
rspec-mocks (3.
|
61
|
+
rspec-support (~> 3.12.0)
|
62
|
+
rspec-mocks (3.12.3)
|
57
63
|
diff-lcs (>= 1.2.0, < 2.0)
|
58
|
-
rspec-support (~> 3.
|
59
|
-
rspec-support (3.
|
60
|
-
rubocop (
|
61
|
-
|
64
|
+
rspec-support (~> 3.12.0)
|
65
|
+
rspec-support (3.12.0)
|
66
|
+
rubocop (1.46.0)
|
67
|
+
json (~> 2.3)
|
62
68
|
parallel (~> 1.10)
|
63
|
-
parser (>= 2.
|
69
|
+
parser (>= 3.2.0.0)
|
64
70
|
rainbow (>= 2.2.2, < 4.0)
|
71
|
+
regexp_parser (>= 1.8, < 3.0)
|
72
|
+
rexml (>= 3.2.5, < 4.0)
|
73
|
+
rubocop-ast (>= 1.26.0, < 2.0)
|
65
74
|
ruby-progressbar (~> 1.7)
|
66
|
-
unicode-display_width (>=
|
67
|
-
|
68
|
-
|
69
|
-
|
75
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
76
|
+
rubocop-ast (1.26.0)
|
77
|
+
parser (>= 3.2.1.0)
|
78
|
+
rubocop-capybara (2.17.1)
|
79
|
+
rubocop (~> 1.41)
|
80
|
+
rubocop-rspec (2.18.1)
|
81
|
+
rubocop (~> 1.33)
|
82
|
+
rubocop-capybara (~> 2.17)
|
83
|
+
ruby-prof (1.6.1)
|
84
|
+
ruby-progressbar (1.11.0)
|
85
|
+
simplecov (0.21.2)
|
70
86
|
docile (~> 1.1)
|
71
|
-
|
72
|
-
|
73
|
-
simplecov-html (0.
|
87
|
+
simplecov-html (~> 0.11)
|
88
|
+
simplecov_json_formatter (~> 0.1)
|
89
|
+
simplecov-html (0.12.3)
|
90
|
+
simplecov_json_formatter (0.1.4)
|
74
91
|
tapp (1.5.1)
|
75
92
|
thor
|
76
|
-
thor (1.
|
77
|
-
tomlrb (
|
78
|
-
unicode-display_width (
|
79
|
-
url (0.3.2)
|
93
|
+
thor (1.2.1)
|
94
|
+
tomlrb (2.0.3)
|
95
|
+
unicode-display_width (2.4.2)
|
80
96
|
|
81
97
|
PLATFORMS
|
82
98
|
ruby
|
@@ -92,9 +108,10 @@ DEPENDENCIES
|
|
92
108
|
rake-notes
|
93
109
|
rspec
|
94
110
|
rubocop
|
111
|
+
rubocop-rspec
|
95
112
|
ruby-prof
|
96
113
|
simplecov
|
97
114
|
tapp
|
98
115
|
|
99
116
|
BUNDLED WITH
|
100
|
-
2.
|
117
|
+
2.4.7
|
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# MasKING🤴
|
2
2
|
|
3
|
-
[](https://circleci.com/gh/kibitan/masking/tree/main)
|
4
|
+
[](https://github.com/kibitan/masking/actions?query=workflow%3A%22Acceptance+Test+MySQL%22+branch%3Amain)
|
5
|
+
[](https://github.com/kibitan/masking/actions?query=workflow%3A%22Acceptance+Test+MariaDB%22+branch%3Amain)
|
6
6
|
|
7
|
-
[](https://codecov.io/gh/kibitan/masking)
|
8
8
|
[](https://codeclimate.com/github/kibitan/masking/maintainability)
|
9
9
|
[](https://badge.fury.io/rb/masking)
|
10
10
|
|
@@ -18,12 +18,12 @@ gem install masking
|
|
18
18
|
|
19
19
|
## Requirement
|
20
20
|
|
21
|
-
* Ruby 2.
|
21
|
+
* Ruby 2.6/2.7/3.0/3.1/3.2
|
22
22
|
|
23
|
-
##
|
23
|
+
## Supporting RDBMS
|
24
24
|
|
25
25
|
* MySQL: 5.5<sup>[1](#footnote1)</sup>, 5.6, 5.7, 8.0
|
26
|
-
* MariaDB: 5.5, 10.0<sup>[2](#footnote2)</sup>, 10.1, 10.2, 10.3, 10.4
|
26
|
+
* MariaDB: 5.5, 10.0<sup>[2](#footnote2)</sup>, 10.1, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11
|
27
27
|
|
28
28
|
## Usage
|
29
29
|
|
@@ -47,6 +47,9 @@ gem install masking
|
|
47
47
|
OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+
|
48
48
|
+f/++f/++f/++f/++f/++SH+Dk1hZGUgd2l0aCBHSU1QACwAAAAADAAMAAAFLC
|
49
49
|
AgjoEwnuNAFOhpEMTRiggcz4BNJHrv/zCFcLiwMWYNG84BwwEeECcgggoBADs=
|
50
|
+
# When a column name is suffixed with `?`, the original NULL value will not be anonymized.
|
51
|
+
# This option can be beneficial for simulating SQL execution that closely resembles the original data.
|
52
|
+
nullable_string?: anonymized nullable %{n} string
|
50
53
|
```
|
51
54
|
|
52
55
|
A value will be implicitly converted to a compatible type. If you prefer to explicitly convert, you could use a tag as defined in [YAML Version 1.1](http://yaml.org/spec/current.html#id2503753)
|
@@ -142,7 +145,7 @@ available option via environment variable:
|
|
142
145
|
* `MYSQL_PASSWORD`: password for user(default: `password`)
|
143
146
|
* `MYSQL_DBNAME`: database name(default: `mydb`)
|
144
147
|
|
145
|
-
##### with docker
|
148
|
+
##### with docker-compose
|
146
149
|
|
147
150
|
```bash
|
148
151
|
docker-compose -f docker-compose.yml -f docker-compose/mysql80.yml run -e MYSQL_HOST=mysql80 app acceptance/run_test.sh
|
@@ -160,6 +163,13 @@ The docker-compose file names for other database versions, specify that file.
|
|
160
163
|
* MySQL 5.7: [`docker-compose/mysql57.yml`](./docker-compose/mysql57.yml)
|
161
164
|
* MySQL 5.6: [`docker-compose/mysql56.yml`](./docker-compose/mysql56.yml)
|
162
165
|
* MySQL 5.5<sup>[1](#footnote1)</sup>: [`docker-compose/mysql55.yml`](./docker-compose/mysql55.yml)
|
166
|
+
* MariaDB 10.11: [`docker-compose/mariadb1011.yml`](./docker-compose/mariadb1011.yml)
|
167
|
+
* MariaDB 10.10: [`docker-compose/mariadb1010.yml`](./docker-compose/mariadb1010.yml)
|
168
|
+
* MariaDB 10.9: [`docker-compose/mariadb109.yml`](./docker-compose/mariadb109.yml)
|
169
|
+
* MariaDB 10.8: [`docker-compose/mariadb108.yml`](./docker-compose/mariadb108.yml)
|
170
|
+
* MariaDB 10.7: [`docker-compose/mariadb107.yml`](./docker-compose/mariadb107.yml)
|
171
|
+
* MariaDB 10.6: [`docker-compose/mariadb106.yml`](./docker-compose/mariadb106.yml)
|
172
|
+
* MariaDB 10.5: [`docker-compose/mariadb105.yml`](./docker-compose/mariadb105.yml)
|
163
173
|
* MariaDB 10.4: [`docker-compose/mariadb104.yml`](./docker-compose/mariadb104.yml)
|
164
174
|
* MariaDB 10.3: [`docker-compose/mariadb103.yml`](./docker-compose/mariadb103.yml)
|
165
175
|
* MariaDB 10.2: [`docker-compose/mariadb102.yml`](./docker-compose/mariadb102.yml)
|
@@ -179,6 +189,7 @@ bundle exec mdl *.md
|
|
179
189
|
docker build . -t masking
|
180
190
|
echo "sample stdout" | docker run -i masking
|
181
191
|
docker run masking -v
|
192
|
+
docker run --entrypoint sh -it masking # inside of docker container
|
182
193
|
```
|
183
194
|
|
184
195
|
## Profiling
|
@@ -237,7 +248,7 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
237
248
|
|
238
249
|
## Code of Conduct
|
239
250
|
|
240
|
-
Everyone interacting in the Masking project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/kibitan/masking/blob/
|
251
|
+
Everyone interacting in the Masking project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/kibitan/masking/blob/main/CODE_OF_CONDUCT.md).
|
241
252
|
|
242
253
|
<a name="footnote1">1</a>: <small> MySQL 5.5 is already not supported by [official](https://www.mysql.com/support/supportedplatforms/database.html)</small>
|
243
254
|
|