masking 1.0.1 → 1.1.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: 8aa45bdedacc8108e37fb65b293936f242e4b7121216d28efb45d7c0c58be632
4
- data.tar.gz: a7286cfa3cdfe8eab59d65434659238cfaa20c71a186694dc59f772c0668f327
3
+ metadata.gz: f4d34aeecc48c47e5ad4f96b35f3f8c6afb36a870402e44839a9a4d13af065f1
4
+ data.tar.gz: 1089fad50f9aaab3afcf32a553c0cba62754ddf05a630f35f6e928e5a205d090
5
5
  SHA512:
6
- metadata.gz: 30bc83a25cec0e15687b4c98a04f387f11ef56f76808784ef4edb3da827954470c671ba70dcc17e388f914c550b4ce2833352eb05ff777066ae250f428af470a
7
- data.tar.gz: c3fe305d12996ad52d0cf640cda3d37b8d772af15b188e226045f55d38fd160f0670d03f55e2cd34f18054718e5cf4984af5a2f7d7e2f0cb0db9fd634e3e774c
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: circleci/buildpack-deps:trusty
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
@@ -3,7 +3,7 @@ AllCops:
3
3
  - 'vendor/**/*'
4
4
  - 'spec/fixtures/**/*'
5
5
  - 'tmp/**/*'
6
- TargetRubyVersion: 2.5
6
+ TargetRubyVersion: 2.6
7
7
 
8
8
  Metrics/LineLength:
9
9
  Max: 120
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.0
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.0.0...HEAD
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.1.2 && bundle install -j "$(nproc)"
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.1)
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.1.16)
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.0)
21
- kramdown (2.1.0)
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.17.1)
70
+ simplecov (0.20.0)
70
71
  docile (~> 1.1)
71
- json (>= 1.8, < 3)
72
- simplecov-html (~> 0.10.0)
73
- simplecov-html (0.10.2)
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.1.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.5/2.6/2.7
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/AlignHash
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/AlignHash
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Masking
4
- VERSION = '1.0.1'
4
+ VERSION = '1.1.0'
5
5
  end
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.5'
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.1
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: 2019-12-31 00:00:00.000000000 Z
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.5'
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.1.2
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: []