bright_serializer 0.2.1 → 0.2.2
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/.github/workflows/build.yml +20 -6
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +16 -11
- data/lib/bright_serializer/entity/base.rb +1 -1
- data/lib/bright_serializer/entity/parser.rb +1 -2
- data/lib/bright_serializer/inflector.rb +16 -0
- data/lib/bright_serializer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc92e0a791c3939a0eeb7b4b6ca33bf322a8e0746cc7711da7749a74cc6b00e2
|
4
|
+
data.tar.gz: a5b247fb91b5bb4cf0e150fe7eb290c834658de4884e611ff85a05ddd5a19c7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2dc0f756681d3b650cc8156b6667949e543dac716b9c5f55114f4303024106da4355f5daa56200a94d04ee6e4a16559f9fa519b30231e462097ff8b6a1cdfc71
|
7
|
+
data.tar.gz: 6bcf8c18f406dc4291b7c6eccc038351c353ea4ddc5b1015424527ebbf08203f943cdd7f6d5d24dcbe9b065737844ff78d34a26bb98db9151fb0866ee1dbce0e
|
data/.github/workflows/build.yml
CHANGED
@@ -3,21 +3,35 @@ name: Build
|
|
3
3
|
on: [push]
|
4
4
|
|
5
5
|
jobs:
|
6
|
-
|
6
|
+
Build:
|
7
7
|
|
8
8
|
runs-on: ubuntu-latest
|
9
|
-
|
9
|
+
strategy:
|
10
|
+
matrix:
|
11
|
+
ruby: [2.5, 2.6, 2.7]
|
10
12
|
steps:
|
11
13
|
- uses: actions/checkout@v1
|
12
|
-
- name: Set up Ruby
|
14
|
+
- name: Set up Ruby ${{ matrix.ruby }}
|
13
15
|
uses: actions/setup-ruby@v1
|
14
16
|
with:
|
15
|
-
ruby-version:
|
17
|
+
ruby-version: ${{ matrix.ruby }}
|
16
18
|
- name: Bundle install
|
17
19
|
run: |
|
18
20
|
gem install bundler
|
19
21
|
bundle install --jobs 4 --retry 3
|
20
22
|
- name: Specs
|
21
23
|
run: bundle exec rake
|
22
|
-
|
23
|
-
|
24
|
+
Rubocop:
|
25
|
+
runs-on: ubuntu-latest
|
26
|
+
steps:
|
27
|
+
- uses: actions/checkout@v1
|
28
|
+
- name: Set up Ruby 2.7
|
29
|
+
uses: actions/setup-ruby@v1
|
30
|
+
with:
|
31
|
+
ruby-version: 2.7
|
32
|
+
- name: Bundle install
|
33
|
+
run: |
|
34
|
+
gem install bundler
|
35
|
+
bundle install --jobs 4 --retry 3
|
36
|
+
- name: Rubocop
|
37
|
+
run: bundle exec rubocop --parallel
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,12 @@
|
|
4
4
|
|
5
5
|
* Your contribution
|
6
6
|
|
7
|
+
## 0.2.2 (2020-07-22)
|
8
|
+
|
9
|
+
* Run CI build on all supported Ruby versions (#11)
|
10
|
+
* Update Rubocop 0.78.0 => 0.88.0 and run auto-correction
|
11
|
+
* Deep transform entity keys (#12)
|
12
|
+
|
7
13
|
## 0.2.1 (2020-07-21)
|
8
14
|
|
9
15
|
* Handle set_key_transform inherited from a parent serializer (#10)
|
data/Gemfile.lock
CHANGED
@@ -1,26 +1,27 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bright_serializer (0.2.
|
4
|
+
bright_serializer (0.2.2)
|
5
5
|
oj (~> 3)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
ast (2.4.
|
10
|
+
ast (2.4.1)
|
11
11
|
concurrent-ruby (1.1.5)
|
12
12
|
diff-lcs (1.4.4)
|
13
13
|
faker (2.9.0)
|
14
14
|
i18n (>= 1.6, < 1.8)
|
15
15
|
i18n (1.7.0)
|
16
16
|
concurrent-ruby (~> 1.0)
|
17
|
-
jaro_winkler (1.5.4)
|
18
17
|
oj (3.10.0)
|
19
|
-
parallel (1.19.
|
20
|
-
parser (2.7.
|
21
|
-
ast (~> 2.4.
|
18
|
+
parallel (1.19.2)
|
19
|
+
parser (2.7.1.4)
|
20
|
+
ast (~> 2.4.1)
|
22
21
|
rainbow (3.0.0)
|
23
22
|
rake (13.0.1)
|
23
|
+
regexp_parser (1.7.1)
|
24
|
+
rexml (3.2.4)
|
24
25
|
rspec (3.9.0)
|
25
26
|
rspec-core (~> 3.9.0)
|
26
27
|
rspec-expectations (~> 3.9.0)
|
@@ -34,19 +35,23 @@ GEM
|
|
34
35
|
diff-lcs (>= 1.2.0, < 2.0)
|
35
36
|
rspec-support (~> 3.9.0)
|
36
37
|
rspec-support (3.9.3)
|
37
|
-
rubocop (0.
|
38
|
-
jaro_winkler (~> 1.5.1)
|
38
|
+
rubocop (0.88.0)
|
39
39
|
parallel (~> 1.10)
|
40
|
-
parser (>= 2.
|
40
|
+
parser (>= 2.7.1.1)
|
41
41
|
rainbow (>= 2.2.2, < 4.0)
|
42
|
+
regexp_parser (>= 1.7)
|
43
|
+
rexml
|
44
|
+
rubocop-ast (>= 0.1.0, < 1.0)
|
42
45
|
ruby-progressbar (~> 1.7)
|
43
|
-
unicode-display_width (>= 1.4.0, <
|
46
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
47
|
+
rubocop-ast (0.2.0)
|
48
|
+
parser (>= 2.7.0.1)
|
44
49
|
rubocop-performance (1.5.2)
|
45
50
|
rubocop (>= 0.71.0)
|
46
51
|
rubocop-rspec (1.37.1)
|
47
52
|
rubocop (>= 0.68.1)
|
48
53
|
ruby-progressbar (1.10.1)
|
49
|
-
unicode-display_width (1.
|
54
|
+
unicode-display_width (1.7.0)
|
50
55
|
|
51
56
|
PLATFORMS
|
52
57
|
ruby
|
@@ -59,5 +59,21 @@ class Inflector
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
end
|
62
|
+
|
63
|
+
# File active_support/core_ext/hash/keys.rb, line 156
|
64
|
+
def deep_transform_keys_in_object!(object, &block)
|
65
|
+
case object
|
66
|
+
when Hash
|
67
|
+
object.keys.each do |key| # rubocop:disable Style/HashEachMethods
|
68
|
+
value = object.delete(key)
|
69
|
+
object[yield(key)] = deep_transform_keys_in_object!(value, &block)
|
70
|
+
end
|
71
|
+
object
|
72
|
+
when Array
|
73
|
+
object.map! { |e| deep_transform_keys_in_object!(e, &block) }
|
74
|
+
else
|
75
|
+
object
|
76
|
+
end
|
77
|
+
end
|
62
78
|
end
|
63
79
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bright_serializer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Francis Bastien
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|