mutils 1.1.7 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/master.yml +7 -1
- data/.github/workflows/pr.yml +7 -1
- data/.github/workflows/release.yml +1 -1
- data/.gitignore +2 -1
- data/.rubocop.yml +2 -2
- data/.travis.yml +0 -1
- data/CHANGELOG.md +28 -0
- data/Gemfile.lock +22 -22
- data/README.md +2 -0
- data/Version +1 -1
- data/lib/mutils/serialization/results/attributes.rb +4 -1
- data/mutils.gemspec +1 -1
- data/package-lock.json +1549 -3056
- data/package.json +7 -7
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1e38f18d697f9a7dff3192712e9612bcf8da298f785129fcc9a43ada6e00d56
|
4
|
+
data.tar.gz: bdae09e0ff5700b1c245fd8296756141bbf817602b2dd90e01bb7158799bb966
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b341eda42e946f3ae9888b289b70fdcce263e6d3f4d933b17636dcb1905d1a846f19b35ffe865e1823b7995252a1ba9ad63c33381c61c53fb1486e40e6e99877
|
7
|
+
data.tar.gz: dc53c939a566414cae43a65dd94c7c5f59d874eb255b559f0a5f03015a0da27fe920bc939c88e34955da360a01e2c62ead9cbe2bc0d24e030b085b2b066c47e5
|
@@ -7,7 +7,13 @@ jobs:
|
|
7
7
|
runs-on: ubuntu-20.04
|
8
8
|
strategy:
|
9
9
|
matrix:
|
10
|
-
ruby:
|
10
|
+
ruby:
|
11
|
+
- "3.0"
|
12
|
+
- "2.7"
|
13
|
+
- "2.6"
|
14
|
+
include:
|
15
|
+
- ruby: "3.0"
|
16
|
+
coverage: "true"
|
11
17
|
name: Test with ruby ${{ matrix.ruby }}
|
12
18
|
steps:
|
13
19
|
- uses: actions/checkout@v2
|
data/.github/workflows/pr.yml
CHANGED
@@ -9,7 +9,13 @@ jobs:
|
|
9
9
|
runs-on: ubuntu-20.04
|
10
10
|
strategy:
|
11
11
|
matrix:
|
12
|
-
ruby:
|
12
|
+
ruby:
|
13
|
+
- "3.0"
|
14
|
+
- "2.7"
|
15
|
+
- "2.6"
|
16
|
+
include:
|
17
|
+
- ruby: "3.0"
|
18
|
+
coverage: "true"
|
13
19
|
name: Test with ruby ${{ matrix.ruby }}
|
14
20
|
steps:
|
15
21
|
- uses: actions/checkout@v2
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,31 @@
|
|
1
|
+
## [1.2.2](https://github.com/Code-Vedas/mutils/compare/v1.2.1...v1.2.2) (2021-11-26)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* deps ([a778c53](https://github.com/Code-Vedas/mutils/commit/a778c533db613936e26cbd92caea75c8e87347d6))
|
7
|
+
|
8
|
+
## [1.2.1](https://github.com/Code-Vedas/mutils/compare/v1.2.0...v1.2.1) (2021-08-20)
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* dropping ruby 2.5 support ([#172](https://github.com/Code-Vedas/mutils/issues/172)) ([a74d02c](https://github.com/Code-Vedas/mutils/commit/a74d02c4f6b126092e18a94aaa4ebd62e48c22e9))
|
14
|
+
|
15
|
+
# [1.2.0](https://github.com/Code-Vedas/mutils/compare/v1.1.8...v1.2.0) (2021-08-20)
|
16
|
+
|
17
|
+
|
18
|
+
### Features
|
19
|
+
|
20
|
+
* attribute can accept Proc without params ([c014fef](https://github.com/Code-Vedas/mutils/commit/c014fef841426673d1f409b56a1c2548222fd2f5))
|
21
|
+
|
22
|
+
## [1.1.8](https://github.com/Code-Vedas/mutils/compare/v1.1.7...v1.1.8) (2021-08-20)
|
23
|
+
|
24
|
+
|
25
|
+
### Bug Fixes
|
26
|
+
|
27
|
+
* deps ([4bec0e0](https://github.com/Code-Vedas/mutils/commit/4bec0e0e3a33ec5aa3f3ca28936bb09e3fde1203))
|
28
|
+
|
1
29
|
## [1.1.7](https://github.com/Code-Vedas/mutils/compare/v1.1.6...v1.1.7) (2021-01-28)
|
2
30
|
|
3
31
|
|
data/Gemfile.lock
CHANGED
@@ -7,13 +7,13 @@ GIT
|
|
7
7
|
PATH
|
8
8
|
remote: .
|
9
9
|
specs:
|
10
|
-
mutils (1.1
|
10
|
+
mutils (1.2.1)
|
11
11
|
dry-inflector
|
12
12
|
|
13
13
|
GEM
|
14
14
|
remote: https://rubygems.org/
|
15
15
|
specs:
|
16
|
-
ast (2.4.
|
16
|
+
ast (2.4.2)
|
17
17
|
benchmark-malloc (0.2.0)
|
18
18
|
benchmark-perf (0.6.0)
|
19
19
|
benchmark-trend (0.4.0)
|
@@ -24,20 +24,20 @@ GEM
|
|
24
24
|
thor (>= 0.19.4, < 2.0)
|
25
25
|
tins (~> 1.6)
|
26
26
|
diff-lcs (1.4.4)
|
27
|
-
docile (1.
|
28
|
-
dry-inflector (0.2.
|
29
|
-
json (2.
|
30
|
-
json (2.
|
31
|
-
parallel (1.
|
32
|
-
parser (3.0.
|
27
|
+
docile (1.4.0)
|
28
|
+
dry-inflector (0.2.1)
|
29
|
+
json (2.6.1)
|
30
|
+
json (2.6.1-java)
|
31
|
+
parallel (1.21.0)
|
32
|
+
parser (3.0.3.0)
|
33
33
|
ast (~> 2.4.1)
|
34
34
|
pluginator (1.5.0)
|
35
35
|
pre-commit (0.39.0)
|
36
36
|
pluginator (~> 1.5)
|
37
37
|
rainbow (3.0.0)
|
38
|
-
rake (13.0.
|
39
|
-
regexp_parser (2.
|
40
|
-
rexml (3.2.
|
38
|
+
rake (13.0.6)
|
39
|
+
regexp_parser (2.1.1)
|
40
|
+
rexml (3.2.5)
|
41
41
|
rspec (3.10.0)
|
42
42
|
rspec-core (~> 3.10.0)
|
43
43
|
rspec-expectations (~> 3.10.0)
|
@@ -47,27 +47,27 @@ GEM
|
|
47
47
|
benchmark-perf (~> 0.6)
|
48
48
|
benchmark-trend (~> 0.4)
|
49
49
|
rspec (>= 3.0)
|
50
|
-
rspec-core (3.10.
|
50
|
+
rspec-core (3.10.1)
|
51
51
|
rspec-support (~> 3.10.0)
|
52
|
-
rspec-expectations (3.10.
|
52
|
+
rspec-expectations (3.10.1)
|
53
53
|
diff-lcs (>= 1.2.0, < 2.0)
|
54
54
|
rspec-support (~> 3.10.0)
|
55
55
|
rspec-json_expectations (2.2.0)
|
56
|
-
rspec-mocks (3.10.
|
56
|
+
rspec-mocks (3.10.2)
|
57
57
|
diff-lcs (>= 1.2.0, < 2.0)
|
58
58
|
rspec-support (~> 3.10.0)
|
59
|
-
rspec-support (3.10.
|
60
|
-
rubocop (1.
|
59
|
+
rspec-support (3.10.3)
|
60
|
+
rubocop (1.23.0)
|
61
61
|
parallel (~> 1.10)
|
62
62
|
parser (>= 3.0.0.0)
|
63
63
|
rainbow (>= 2.2.2, < 4.0)
|
64
64
|
regexp_parser (>= 1.8, < 3.0)
|
65
65
|
rexml
|
66
|
-
rubocop-ast (>= 1.
|
66
|
+
rubocop-ast (>= 1.12.0, < 2.0)
|
67
67
|
ruby-progressbar (~> 1.7)
|
68
68
|
unicode-display_width (>= 1.4.0, < 3.0)
|
69
|
-
rubocop-ast (1.
|
70
|
-
parser (>=
|
69
|
+
rubocop-ast (1.13.0)
|
70
|
+
parser (>= 3.0.1.1)
|
71
71
|
ruby-progressbar (1.11.0)
|
72
72
|
simplecov (0.16.1)
|
73
73
|
docile (~> 1.1)
|
@@ -77,10 +77,10 @@ GEM
|
|
77
77
|
sync (0.5.0)
|
78
78
|
term-ansicolor (1.7.1)
|
79
79
|
tins (~> 1.0)
|
80
|
-
thor (1.0
|
81
|
-
tins (1.
|
80
|
+
thor (1.1.0)
|
81
|
+
tins (1.29.1)
|
82
82
|
sync
|
83
|
-
unicode-display_width (2.
|
83
|
+
unicode-display_width (2.1.0)
|
84
84
|
|
85
85
|
PLATFORMS
|
86
86
|
java
|
data/README.md
CHANGED
@@ -74,6 +74,8 @@ class UserSerializer < Mutils::Serialization::BaseSerializer
|
|
74
74
|
attributes :id, :first_name, :last_name, :email
|
75
75
|
## OR
|
76
76
|
attribute :email, {always_include: true} ## this will allow to selectively include email
|
77
|
+
## OR
|
78
|
+
attribute :email, &:email ## this will call email attribute from User
|
77
79
|
end
|
78
80
|
```
|
79
81
|
### Relations
|
data/Version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
v1.
|
1
|
+
v1.2.2
|
@@ -9,7 +9,10 @@ module Mutils
|
|
9
9
|
module Attributes
|
10
10
|
def fetch_block_attributes(attributes, result_hash)
|
11
11
|
attributes&.each do |key, s_options|
|
12
|
-
|
12
|
+
arg = [scope]
|
13
|
+
arg << options[:params] || {} unless s_options[:block].parameters.flatten.include?(:rest)
|
14
|
+
|
15
|
+
result_hash[key] = s_options[:block].call(*arg)
|
13
16
|
end
|
14
17
|
end
|
15
18
|
|
data/mutils.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.bindir = 'exe'
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ['lib']
|
23
|
-
spec.required_ruby_version = '>= 2.
|
23
|
+
spec.required_ruby_version = '>= 2.6.0'
|
24
24
|
spec.required_rubygems_version = '>= 1.8.11'
|
25
25
|
spec.add_dependency('dry-inflector')
|
26
26
|
spec.add_development_dependency 'bundler', '~> 2.0'
|