masking 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +11 -6
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +14 -1
- data/Dockerfile +5 -3
- data/Gemfile.lock +12 -11
- data/README.md +3 -2
- data/lib/masking/config/target_columns/method.rb +2 -2
- data/lib/masking/config/target_columns.rb +1 -1
- data/lib/masking/version.rb +1 -1
- data/masking.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4d34aeecc48c47e5ad4f96b35f3f8c6afb36a870402e44839a9a4d13af065f1
|
4
|
+
data.tar.gz: 1089fad50f9aaab3afcf32a553c0cba62754ddf05a630f35f6e928e5a205d090
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f37b50a385f56ab9e7359d245dada16a3f619341e41089bbaafd97a42d2f73d471ea12c014cec410adc1575fdc764c1b88065850decaa992fa0bbd95926919fa
|
7
|
+
data.tar.gz: d071b2b682a2f20a5cb9e5a04ce91901ba4066520ea740058730d19205376e90f23f5e26721bd17fe75657332551bd145a09870fcfb077a5cecfadc06bb5b76b
|
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
|
@@ -18,6 +18,14 @@ test_attributes: &test_attributes
|
|
18
18
|
command: docker run --entrypoint sh -e CI -e CODECOV_TOKEN masking-$RUBY_VERSION-$CIRCLE_SHA1 -c "bundle exec rspec"
|
19
19
|
|
20
20
|
jobs:
|
21
|
+
test-ruby31:
|
22
|
+
<<: *test_attributes
|
23
|
+
environment:
|
24
|
+
RUBY_VERSION: '3.1'
|
25
|
+
test-ruby30:
|
26
|
+
<<: *test_attributes
|
27
|
+
environment:
|
28
|
+
RUBY_VERSION: '3.0'
|
21
29
|
test-ruby27:
|
22
30
|
<<: *test_attributes
|
23
31
|
environment:
|
@@ -26,14 +34,11 @@ jobs:
|
|
26
34
|
<<: *test_attributes
|
27
35
|
environment:
|
28
36
|
RUBY_VERSION: '2.6'
|
29
|
-
test-ruby25:
|
30
|
-
<<: *test_attributes
|
31
|
-
environment:
|
32
|
-
RUBY_VERSION: '2.5'
|
33
37
|
|
34
38
|
workflows:
|
35
39
|
'CircleCI: build':
|
36
40
|
jobs:
|
37
41
|
- test-ruby26
|
38
|
-
- test-ruby25
|
39
42
|
- test-ruby27
|
43
|
+
- test-ruby30
|
44
|
+
- test-ruby31
|
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.1.3
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [v1.1.0] - 2023-02-25 Happy #ruby30th Birthday🎉
|
11
|
+
|
12
|
+
### Added
|
13
|
+
|
14
|
+
- add Ruby 3.0 support [#55](https://github.com/kibitan/masking/pull/55)
|
15
|
+
- add Ruby 3.1 support [#60](https://github.com/kibitan/masking/pull/60)
|
16
|
+
|
17
|
+
### Security
|
18
|
+
|
19
|
+
- chore(deps): bump kramdown from 2.1.0 to 2.3.0 [#54](https://github.com/kibitan/masking/pull/54)
|
20
|
+
|
10
21
|
## [v1.0.1] - 2019-12-31
|
11
22
|
|
12
23
|
### Added
|
@@ -56,7 +67,9 @@ $ bin/benchmark.rb
|
|
56
67
|
|
57
68
|
Initial release version. 🎉
|
58
69
|
|
59
|
-
[Unreleased]: https://github.com/kibitan/masking/compare/v1.
|
70
|
+
[Unreleased]: https://github.com/kibitan/masking/compare/v1.1.0...HEAD
|
71
|
+
[v1.1.0]: https://github.com/kibitan/masking/compare/v1.0.1...v1.1.0
|
72
|
+
[v1.0.1]: https://github.com/kibitan/masking/compare/v1.0.0...v1.0.1
|
60
73
|
[v1.0.0]: https://github.com/kibitan/masking/compare/v0.0.3...v1.0.0
|
61
74
|
[v0.0.3]: https://github.com/kibitan/masking/compare/v0.0.2...v0.0.3
|
62
75
|
[v0.0.2]: https://github.com/kibitan/masking/compare/v0.0.1...v0.0.2
|
data/Dockerfile
CHANGED
@@ -2,11 +2,11 @@ ARG ruby_version=2.6
|
|
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,10 +14,12 @@ 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 . ./
|
data/Gemfile.lock
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
masking (1.0
|
4
|
+
masking (1.1.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
9
|
ast (2.4.0)
|
10
10
|
byebug (11.0.1)
|
11
|
-
codecov (0.
|
11
|
+
codecov (0.2.12)
|
12
12
|
json
|
13
13
|
simplecov
|
14
|
-
url
|
15
14
|
coderay (1.1.2)
|
16
15
|
colored (1.2)
|
17
16
|
diff-lcs (1.3)
|
18
17
|
docile (1.3.2)
|
19
18
|
jaro_winkler (1.5.4)
|
20
|
-
json (2.3.
|
21
|
-
kramdown (2.
|
19
|
+
json (2.3.1)
|
20
|
+
kramdown (2.3.0)
|
21
|
+
rexml
|
22
22
|
kramdown-parser-gfm (1.1.0)
|
23
23
|
kramdown (~> 2.0)
|
24
24
|
mdl (0.8.0)
|
@@ -44,6 +44,7 @@ GEM
|
|
44
44
|
rake-notes (0.2.2)
|
45
45
|
colored
|
46
46
|
rake
|
47
|
+
rexml (3.2.4)
|
47
48
|
rspec (3.9.0)
|
48
49
|
rspec-core (~> 3.9.0)
|
49
50
|
rspec-expectations (~> 3.9.0)
|
@@ -66,17 +67,17 @@ GEM
|
|
66
67
|
unicode-display_width (>= 1.4.0, < 1.7)
|
67
68
|
ruby-prof (1.1.0)
|
68
69
|
ruby-progressbar (1.10.1)
|
69
|
-
simplecov (0.
|
70
|
+
simplecov (0.20.0)
|
70
71
|
docile (~> 1.1)
|
71
|
-
|
72
|
-
|
73
|
-
simplecov-html (0.
|
72
|
+
simplecov-html (~> 0.11)
|
73
|
+
simplecov_json_formatter (~> 0.1)
|
74
|
+
simplecov-html (0.12.3)
|
75
|
+
simplecov_json_formatter (0.1.2)
|
74
76
|
tapp (1.5.1)
|
75
77
|
thor
|
76
78
|
thor (1.0.1)
|
77
79
|
tomlrb (1.2.9)
|
78
80
|
unicode-display_width (1.6.0)
|
79
|
-
url (0.3.2)
|
80
81
|
|
81
82
|
PLATFORMS
|
82
83
|
ruby
|
@@ -97,4 +98,4 @@ DEPENDENCIES
|
|
97
98
|
tapp
|
98
99
|
|
99
100
|
BUNDLED WITH
|
100
|
-
2.
|
101
|
+
2.4.7
|
data/README.md
CHANGED
@@ -18,7 +18,7 @@ gem install masking
|
|
18
18
|
|
19
19
|
## Requirement
|
20
20
|
|
21
|
-
* Ruby 2.
|
21
|
+
* Ruby 2.6/2.7/3.0/3.1
|
22
22
|
|
23
23
|
## Supported RDBMS
|
24
24
|
|
@@ -142,7 +142,7 @@ available option via environment variable:
|
|
142
142
|
* `MYSQL_PASSWORD`: password for user(default: `password`)
|
143
143
|
* `MYSQL_DBNAME`: database name(default: `mydb`)
|
144
144
|
|
145
|
-
##### with docker
|
145
|
+
##### with docker-compose
|
146
146
|
|
147
147
|
```bash
|
148
148
|
docker-compose -f docker-compose.yml -f docker-compose/mysql80.yml run -e MYSQL_HOST=mysql80 app acceptance/run_test.sh
|
@@ -179,6 +179,7 @@ bundle exec mdl *.md
|
|
179
179
|
docker build . -t masking
|
180
180
|
echo "sample stdout" | docker run -i masking
|
181
181
|
docker run masking -v
|
182
|
+
docker run --entrypoint sh -it masking # inside of docker container
|
182
183
|
```
|
183
184
|
|
184
185
|
## Profiling
|
@@ -18,7 +18,7 @@ module Masking
|
|
18
18
|
|
19
19
|
private
|
20
20
|
|
21
|
-
# rubocop:disable Layout/
|
21
|
+
# rubocop:disable Layout/HashAlignment
|
22
22
|
MAPPING = {
|
23
23
|
::String => StringBinaryDistinctor,
|
24
24
|
::Integer => Integer,
|
@@ -29,7 +29,7 @@ module Masking
|
|
29
29
|
::FalseClass => Boolean,
|
30
30
|
::NilClass => Null
|
31
31
|
}.freeze
|
32
|
-
# rubocop:enable Layout/
|
32
|
+
# rubocop:enable Layout/HashAlignment
|
33
33
|
|
34
34
|
def mapping(klass)
|
35
35
|
MAPPING[klass] || raise(UnknownType)
|
@@ -34,7 +34,7 @@ module Masking
|
|
34
34
|
private
|
35
35
|
|
36
36
|
def data
|
37
|
-
@data ||= YAML.safe_load(file_path.read, [Date, Time])
|
37
|
+
@data ||= YAML.safe_load(file_path.read, permitted_classes: [Date, Time])
|
38
38
|
rescue Psych::SyntaxError
|
39
39
|
raise Masking::Error::ConfigFileIsNotValidYaml
|
40
40
|
end
|
data/lib/masking/version.rb
CHANGED
data/masking.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = ['lib']
|
25
25
|
|
26
|
-
spec.required_ruby_version = '>= 2.
|
26
|
+
spec.required_ruby_version = '>= 2.6'
|
27
27
|
|
28
28
|
spec.add_development_dependency 'bundler'
|
29
29
|
spec.add_development_dependency 'rake'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: masking
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chikahiro Tokoro
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -266,7 +266,7 @@ homepage: https://github.com/kibitan/masking
|
|
266
266
|
licenses:
|
267
267
|
- MIT
|
268
268
|
metadata: {}
|
269
|
-
post_install_message:
|
269
|
+
post_install_message:
|
270
270
|
rdoc_options: []
|
271
271
|
require_paths:
|
272
272
|
- lib
|
@@ -274,15 +274,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
274
274
|
requirements:
|
275
275
|
- - ">="
|
276
276
|
- !ruby/object:Gem::Version
|
277
|
-
version: '2.
|
277
|
+
version: '2.6'
|
278
278
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
279
279
|
requirements:
|
280
280
|
- - ">="
|
281
281
|
- !ruby/object:Gem::Version
|
282
282
|
version: '0'
|
283
283
|
requirements: []
|
284
|
-
rubygems_version: 3.
|
285
|
-
signing_key:
|
284
|
+
rubygems_version: 3.3.26
|
285
|
+
signing_key:
|
286
286
|
specification_version: 4
|
287
287
|
summary: Command line tool for anonymizing databese records
|
288
288
|
test_files: []
|