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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e6703412ff83f3bf22e99012b33eabda2b55f6d239bd378169b1d7eb54d4bec9
4
- data.tar.gz: 8de80668a2b45c3170a29e58d34732eb2ffc074cab6d8561d91a3c592070589d
3
+ metadata.gz: a1e38f18d697f9a7dff3192712e9612bcf8da298f785129fcc9a43ada6e00d56
4
+ data.tar.gz: bdae09e0ff5700b1c245fd8296756141bbf817602b2dd90e01bb7158799bb966
5
5
  SHA512:
6
- metadata.gz: 7406f3d580f1c57018cd7f304f2e4dfcb83fe82a7920c692f479dea9cbc228773325e7de61b1e794da67b2b43254b025680c9943bd049e34802e67d27f0bea5d
7
- data.tar.gz: 56c89ecb9329cf4b5587c4327e0db4d788691d58bea395a87e3956e0b595795cbff4c0fdb1226fe6c96b616283731520a395297d094f492506748f92022829ff
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: [2.5, 2.6, 2.7, jruby, truffleruby]
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
@@ -9,7 +9,13 @@ jobs:
9
9
  runs-on: ubuntu-20.04
10
10
  strategy:
11
11
  matrix:
12
- ruby: [2.5, 2.6, 2.7, jruby, truffleruby]
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
@@ -11,7 +11,7 @@ jobs:
11
11
  - name: Use Node.js
12
12
  uses: actions/setup-node@v1
13
13
  with:
14
- node-version: 13.x
14
+ node-version: 14.x
15
15
  - uses: ruby/setup-ruby@v1
16
16
  with:
17
17
  ruby-version: 2.7
data/.gitignore CHANGED
@@ -11,4 +11,5 @@
11
11
  .rspec_status
12
12
  .idea/*
13
13
  *.gem
14
- /node_modules
14
+ /node_modules
15
+ .DS_Store
data/.rubocop.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
 
3
3
  AllCops:
4
- TargetRubyVersion: "2.5.0"
4
+ TargetRubyVersion: "2.6.0"
5
5
  Exclude:
6
6
  - 'spec/**/*'
7
- - 'test/**/*'
7
+ - 'test/**/*'
data/.travis.yml CHANGED
@@ -1,5 +1,4 @@
1
1
  #rvm:
2
- # - 2.5
3
2
  # - 2.6.3
4
3
  # - 2.6.5
5
4
  # - 2.7.0
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.6)
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.1)
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.3.2)
28
- dry-inflector (0.2.0)
29
- json (2.5.1)
30
- json (2.5.1-java)
31
- parallel (1.20.1)
32
- parser (3.0.0.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.3)
39
- regexp_parser (2.0.3)
40
- rexml (3.2.4)
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.0)
50
+ rspec-core (3.10.1)
51
51
  rspec-support (~> 3.10.0)
52
- rspec-expectations (3.10.0)
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.0)
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.0)
60
- rubocop (1.8.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.2.0, < 2.0)
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.4.0)
70
- parser (>= 2.7.1.5)
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.1)
81
- tins (1.24.1)
80
+ thor (1.1.0)
81
+ tins (1.29.1)
82
82
  sync
83
- unicode-display_width (2.0.0)
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.7
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
- result_hash[key] = s_options[:block].call(scope, options[:params] || {})
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.5.0'
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'