mutils 1.3.3 → 1.3.5

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.
@@ -2,13 +2,12 @@ name: "CodeQL"
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ "*" ]
5
+ branches: ["*"]
6
6
  pull_request:
7
7
  # The branches below must be a subset of the branches above
8
- branches: [ "*" ]
9
- merge_group:
8
+ branches: ["*"]
10
9
  schedule:
11
- - cron: '26 6 * * 5'
10
+ - cron: "26 6 * * 5"
12
11
 
13
12
  jobs:
14
13
  analyze:
@@ -22,45 +21,44 @@ jobs:
22
21
  strategy:
23
22
  fail-fast: false
24
23
  matrix:
25
- language: [ 'ruby' ]
24
+ language: ["ruby"]
26
25
  # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
27
26
  # Use only 'java' to analyze code written in Java, Kotlin or both
28
27
  # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
29
28
  # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
30
29
 
31
30
  steps:
32
- - name: Checkout repository
33
- uses: actions/checkout@v3
31
+ - name: Checkout repository
32
+ uses: actions/checkout@v6
34
33
 
35
- # Initializes the CodeQL tools for scanning.
36
- - name: Initialize CodeQL
37
- uses: github/codeql-action/init@v2
38
- with:
39
- languages: ${{ matrix.language }}
40
- # If you wish to specify custom queries, you can do so here or in a config file.
41
- # By default, queries listed here will override any specified in a config file.
42
- # Prefix the list here with "+" to use these queries and those in the config file.
34
+ # Initializes the CodeQL tools for scanning.
35
+ - name: Initialize CodeQL
36
+ uses: github/codeql-action/init@v4
37
+ with:
38
+ languages: ${{ matrix.language }}
39
+ # If you wish to specify custom queries, you can do so here or in a config file.
40
+ # By default, queries listed here will override any specified in a config file.
41
+ # Prefix the list here with "+" to use these queries and those in the config file.
43
42
 
44
- # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
45
- # queries: security-extended,security-and-quality
43
+ # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
44
+ # queries: security-extended,security-and-quality
46
45
 
46
+ # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
47
+ # If this step fails, then you should remove it and run the build manually (see below)
48
+ - name: Autobuild
49
+ uses: github/codeql-action/autobuild@v4
47
50
 
48
- # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
49
- # If this step fails, then you should remove it and run the build manually (see below)
50
- - name: Autobuild
51
- uses: github/codeql-action/autobuild@v2
51
+ # ℹ️ Command-line programs to run using the OS shell.
52
+ # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
52
53
 
53
- # ℹ️ Command-line programs to run using the OS shell.
54
- # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
54
+ # If the Autobuild fails above, remove it and uncomment the following three lines.
55
+ # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
55
56
 
56
- # If the Autobuild fails above, remove it and uncomment the following three lines.
57
- # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
57
+ # - run: |
58
+ # echo "Run, Build Application using script"
59
+ # ./location_of_script_within_repo/buildscript.sh
58
60
 
59
- # - run: |
60
- # echo "Run, Build Application using script"
61
- # ./location_of_script_within_repo/buildscript.sh
62
-
63
- - name: Perform CodeQL Analysis
64
- uses: github/codeql-action/analyze@v2
65
- with:
66
- category: "/language:${{matrix.language}}"
61
+ - name: Perform CodeQL Analysis
62
+ uses: github/codeql-action/analyze@v4
63
+ with:
64
+ category: "/language:${{matrix.language}}"
@@ -0,0 +1,27 @@
1
+ name: Release Drafter
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ types: [opened, reopened, synchronize]
9
+
10
+ permissions:
11
+ contents: write
12
+ pull-requests: read
13
+
14
+ jobs:
15
+ release_drafter:
16
+ permissions:
17
+ contents: write
18
+ pull-requests: write
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: release-drafter/release-drafter@v6
22
+ with:
23
+ config-name: release-drafter.yml
24
+ disable-releaser: ${{ github.event_name != 'push' }}
25
+ disable-autolabeler: ${{ github.event_name != 'pull_request' }}
26
+ env:
27
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,43 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ test:
10
+ name: Run RSpec
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Checkout
14
+ uses: actions/checkout@v6
15
+ - name: Set up Ruby
16
+ uses: ruby/setup-ruby@v1
17
+ with:
18
+ bundler-cache: true
19
+ - name: RSpec
20
+ run: bin/rspec
21
+
22
+ push:
23
+ runs-on: ubuntu-latest
24
+ needs: test
25
+ permissions:
26
+ contents: write
27
+ id-token: write
28
+ environment: release
29
+ steps:
30
+ - uses: actions/checkout@v6
31
+ with:
32
+ persist-credentials: false
33
+ - name: Set up Ruby
34
+ uses: ruby/setup-ruby@v1
35
+ with:
36
+ bundler-cache: true
37
+ ruby-version: ruby
38
+ - name: Configure RubyGems Credentials
39
+ uses: rubygems/configure-rubygems-credentials@main
40
+ - name: Release
41
+ run: |
42
+ gem build mutils.gemspec
43
+ gem push mutils-*.gem
data/.rubocop.yml CHANGED
@@ -1,8 +1,13 @@
1
- inherit_from: .rubocop_todo.yml
2
-
1
+ plugins:
2
+ - rubocop-rake
3
+ - rubocop-rspec
3
4
  AllCops:
4
- TargetRubyVersion: "2.7.0"
5
5
  NewCops: enable
6
- Exclude:
7
- - 'spec/**/*'
8
- - 'test/**/*'
6
+ TargetRubyVersion: 3.2
7
+ SuggestExtensions: true
8
+ Metrics/MethodLength:
9
+ Max: 20
10
+ RSpec/MultipleExpectations:
11
+ Max: 10
12
+ RSpec/ExampleLength:
13
+ Max: 15
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.4.3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,54 @@
1
+ ## [1.3.5](https://github.com/Code-Vedas/mutils/compare/v1.3.4...v1.3.5) (2026-02-14)
2
+
3
+ ## 🧰 Maintenance
4
+
5
+ - build: bump json from 2.16.0 to 2.18.0 @[dependabot[bot]](https://github.com/apps/dependabot) (#369)
6
+ - build: bump rubocop from 1.81.7 to 1.82.0 @[dependabot[bot]](https://github.com/apps/dependabot) (#371)
7
+ - build: bump actions/upload-artifact from 5 to 6 @[dependabot[bot]](https://github.com/apps/dependabot) (#370)
8
+ - build: bump actions/checkout from 5 to 6 @[dependabot[bot]](https://github.com/apps/dependabot) (#366)
9
+ - build: bump rubocop-rspec from 3.7.0 to 3.8.0 @[dependabot[bot]](https://github.com/apps/dependabot) (#365)
10
+ - build: bump json from 2.15.2 to 2.16.0 @[dependabot[bot]](https://github.com/apps/dependabot) (#364)
11
+ - build: bump rubocop from 1.81.6 to 1.81.7 @[dependabot[bot]](https://github.com/apps/dependabot) (#363)
12
+ - build: bump rake from 13.3.0 to 13.3.1 @[dependabot[bot]](https://github.com/apps/dependabot) (#362)
13
+ - build: bump actions/upload-artifact from 4 to 5 @[dependabot[bot]](https://github.com/apps/dependabot) (#361)
14
+ - build: bump json from 2.15.1 to 2.15.2 @[dependabot[bot]](https://github.com/apps/dependabot) (#360)
15
+ - build: bump rubocop from 1.81.1 to 1.81.6 @[dependabot[bot]](https://github.com/apps/dependabot) (#358)
16
+ - build: bump rspec from 3.13.1 to 3.13.2 @[dependabot[bot]](https://github.com/apps/dependabot) (#359)
17
+ - build: bump benchmark from 0.4.1 to 0.5.0 @[dependabot[bot]](https://github.com/apps/dependabot) (#357)
18
+ - build: bump github/codeql-action from 3 to 4 @[dependabot[bot]](https://github.com/apps/dependabot) (#356)
19
+ - build: bump json from 2.15.0 to 2.15.1 @[dependabot[bot]](https://github.com/apps/dependabot) (#355)
20
+ - build: bump rubocop from 1.80.2 to 1.81.1 @[dependabot[bot]](https://github.com/apps/dependabot) (#354)
21
+ - build: bump json from 2.14.1 to 2.15.0 @[dependabot[bot]](https://github.com/apps/dependabot) (#352)
22
+ - build: bump json from 2.13.2 to 2.14.1 @[dependabot[bot]](https://github.com/apps/dependabot) (#351)
23
+ - build: bump rubocop from 1.79.2 to 1.80.2 @[dependabot[bot]](https://github.com/apps/dependabot) (#350)
24
+ - build: bump rubocop-rspec from 3.6.0 to 3.7.0 @[dependabot[bot]](https://github.com/apps/dependabot) (#349)
25
+
26
+ ## [1.3.4](https://github.com/Code-Vedas/mutils/compare/v1.3.3...v1.3.4) (2025-08-17)
27
+
28
+ ## 🧰 Maintenance
29
+
30
+ - build: bump dry-inflector from 1.1.0 to 1.2.0 @[dependabot[bot]](https://github.com/apps/dependabot) (#345)
31
+ - build: bump actions/checkout from 3 to 5 @[dependabot[bot]](https://github.com/apps/dependabot) (#344)
32
+ - build: bump github/codeql-action from 2 to 3 @[dependabot[bot]](https://github.com/apps/dependabot) (#343)
33
+ - build: bump rubocop from 1.77.0 to 1.79.2 @[dependabot[bot]](https://github.com/apps/dependabot) (#341)
34
+ - build: bump json from 2.12.2 to 2.13.2 @[dependabot[bot]](https://github.com/apps/dependabot) (#340)
35
+ - build(deps): bump rubocop from 1.75.8 to 1.77.0 @[dependabot[bot]](https://github.com/apps/dependabot) (#339)
36
+ - build(deps): bump rubocop from 1.75.2 to 1.75.8 @[dependabot[bot]](https://github.com/apps/dependabot) (#334)
37
+ - build(deps): bump rspec from 3.13.0 to 3.13.1 @[dependabot[bot]](https://github.com/apps/dependabot) (#333)
38
+ - build(deps): bump json from 2.9.1 to 2.12.2 @[dependabot[bot]](https://github.com/apps/dependabot) (#332)
39
+ - build(deps): bump rubocop from 1.69.2 to 1.75.2 @[dependabot[bot]](https://github.com/apps/dependabot) (#329)
40
+ - build(deps): bump json from 2.8.2 to 2.9.1 @[dependabot[bot]](https://github.com/apps/dependabot) (#315)
41
+ - build(deps): bump rubocop from 1.68.0 to 1.69.2 @[dependabot[bot]](https://github.com/apps/dependabot) (#314)
42
+ - build(deps): bump json from 2.7.6 to 2.8.2 @[dependabot[bot]](https://github.com/apps/dependabot) (#310)
43
+ - build(deps): bump json from 2.7.5 to 2.7.6 @[dependabot[bot]](https://github.com/apps/dependabot) (#308)
44
+ - build(deps): bump rubocop from 1.67.0 to 1.68.0 @[dependabot[bot]](https://github.com/apps/dependabot) (#307)
45
+ - build(deps): bump json from 2.7.2 to 2.7.5 @[dependabot[bot]](https://github.com/apps/dependabot) (#306)
46
+ - build(deps): bump rubocop from 1.66.1 to 1.67.0 @[dependabot[bot]](https://github.com/apps/dependabot) (#303)
47
+
48
+ ## ⚙️ CI
49
+
50
+ - ci: Refactor CI/CD pipelines and project configuration @niteshpurohit (#342)
51
+
1
52
  ## [1.3.3](https://github.com/Code-Vedas/mutils/compare/v1.3.2...v1.3.3) (2024-09-05)
2
53
 
3
54
 
data/Gemfile CHANGED
@@ -3,14 +3,16 @@
3
3
  source 'https://rubygems.org'
4
4
 
5
5
  # Specify your gem's dependencies in mutils.gemspec
6
- gem 'bundler', '~> 2.0'
6
+ gem 'benchmark'
7
+ gem 'bundler'
7
8
  gem 'coveralls', '>= 0.8.23'
8
- gem 'json', '>= 2.3.1'
9
- gem 'pre-commit', require: false
10
- gem 'rake', '~> 13.2'
9
+ gem 'json'
10
+ gem 'rake'
11
11
  gem 'rspec'
12
12
  gem 'rspec-benchmark'
13
13
  gem 'rspec-json_expectations'
14
- gem 'rubocop', '>= 1.63.3'
14
+ gem 'rubocop'
15
+ gem 'rubocop-rake'
16
+ gem 'rubocop-rspec'
15
17
  gem 'simplecov-lcov', git: 'https://github.com/niteshpurohit/simplecov-lcov'
16
18
  gemspec
data/Gemfile.lock CHANGED
@@ -7,43 +7,50 @@ GIT
7
7
  PATH
8
8
  remote: .
9
9
  specs:
10
- mutils (1.3.3)
10
+ mutils (1.3.5)
11
11
  dry-inflector
12
12
 
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
- ast (2.4.2)
16
+ ast (2.4.3)
17
+ benchmark (0.5.0)
17
18
  benchmark-malloc (0.2.0)
18
19
  benchmark-perf (0.6.0)
19
20
  benchmark-trend (0.4.0)
20
- bigdecimal (3.1.8)
21
- bigdecimal (3.1.8-java)
21
+ bigdecimal (4.0.1)
22
+ bigdecimal (4.0.1-java)
22
23
  coveralls (0.8.23)
23
24
  json (>= 1.8, < 3)
24
25
  simplecov (~> 0.16.1)
25
26
  term-ansicolor (~> 1.3)
26
27
  thor (>= 0.19.4, < 2.0)
27
28
  tins (~> 1.6)
28
- diff-lcs (1.5.1)
29
+ diff-lcs (1.6.2)
29
30
  docile (1.4.1)
30
- dry-inflector (1.1.0)
31
- json (2.7.2)
32
- json (2.7.2-java)
33
- language_server-protocol (3.17.0.3)
34
- parallel (1.26.3)
35
- parser (3.3.5.0)
31
+ dry-inflector (1.3.1)
32
+ io-console (0.8.2)
33
+ io-console (0.8.2-java)
34
+ json (2.18.1)
35
+ json (2.18.1-java)
36
+ language_server-protocol (3.17.0.5)
37
+ lint_roller (1.1.0)
38
+ mize (0.6.1)
39
+ parallel (1.27.0)
40
+ parser (3.3.10.1)
36
41
  ast (~> 2.4.1)
37
42
  racc
38
- pluginator (1.5.0)
39
- pre-commit (0.40.0)
40
- pluginator (~> 1.5)
43
+ prism (1.9.0)
41
44
  racc (1.8.1)
42
45
  racc (1.8.1-java)
43
46
  rainbow (3.1.1)
44
- rake (13.2.1)
45
- regexp_parser (2.9.2)
46
- rspec (3.13.0)
47
+ rake (13.3.1)
48
+ readline (0.0.4)
49
+ reline
50
+ regexp_parser (2.11.3)
51
+ reline (0.6.3)
52
+ io-console (~> 0.5)
53
+ rspec (3.13.2)
47
54
  rspec-core (~> 3.13.0)
48
55
  rspec-expectations (~> 3.13.0)
49
56
  rspec-mocks (~> 3.13.0)
@@ -52,28 +59,36 @@ GEM
52
59
  benchmark-perf (~> 0.6)
53
60
  benchmark-trend (~> 0.4)
54
61
  rspec (>= 3.0)
55
- rspec-core (3.13.1)
62
+ rspec-core (3.13.6)
56
63
  rspec-support (~> 3.13.0)
57
- rspec-expectations (3.13.2)
64
+ rspec-expectations (3.13.5)
58
65
  diff-lcs (>= 1.2.0, < 2.0)
59
66
  rspec-support (~> 3.13.0)
60
67
  rspec-json_expectations (2.2.0)
61
- rspec-mocks (3.13.1)
68
+ rspec-mocks (3.13.7)
62
69
  diff-lcs (>= 1.2.0, < 2.0)
63
70
  rspec-support (~> 3.13.0)
64
- rspec-support (3.13.1)
65
- rubocop (1.66.1)
71
+ rspec-support (3.13.7)
72
+ rubocop (1.84.2)
66
73
  json (~> 2.3)
67
- language_server-protocol (>= 3.17.0)
74
+ language_server-protocol (~> 3.17.0.2)
75
+ lint_roller (~> 1.1.0)
68
76
  parallel (~> 1.10)
69
77
  parser (>= 3.3.0.2)
70
78
  rainbow (>= 2.2.2, < 4.0)
71
- regexp_parser (>= 2.4, < 3.0)
72
- rubocop-ast (>= 1.32.2, < 2.0)
79
+ regexp_parser (>= 2.9.3, < 3.0)
80
+ rubocop-ast (>= 1.49.0, < 2.0)
73
81
  ruby-progressbar (~> 1.7)
74
- unicode-display_width (>= 2.4.0, < 3.0)
75
- rubocop-ast (1.32.3)
76
- parser (>= 3.3.1.0)
82
+ unicode-display_width (>= 2.4.0, < 4.0)
83
+ rubocop-ast (1.49.0)
84
+ parser (>= 3.3.7.2)
85
+ prism (~> 1.7)
86
+ rubocop-rake (0.7.1)
87
+ lint_roller (~> 1.1)
88
+ rubocop (>= 1.72.1)
89
+ rubocop-rspec (3.9.0)
90
+ lint_roller (~> 1.1)
91
+ rubocop (~> 1.81)
77
92
  ruby-progressbar (1.13.0)
78
93
  simplecov (0.16.1)
79
94
  docile (~> 1.1)
@@ -81,29 +96,35 @@ GEM
81
96
  simplecov-html (~> 0.10.0)
82
97
  simplecov-html (0.10.2)
83
98
  sync (0.5.0)
84
- term-ansicolor (1.11.2)
85
- tins (~> 1.0)
86
- thor (1.3.2)
87
- tins (1.33.0)
99
+ term-ansicolor (1.11.3)
100
+ tins (~> 1)
101
+ thor (1.5.0)
102
+ tins (1.51.1)
88
103
  bigdecimal
104
+ mize (~> 0.6)
105
+ readline
89
106
  sync
90
- unicode-display_width (2.5.0)
107
+ unicode-display_width (3.2.0)
108
+ unicode-emoji (~> 4.1)
109
+ unicode-emoji (4.2.0)
91
110
 
92
111
  PLATFORMS
93
112
  java
94
113
  ruby
95
114
 
96
115
  DEPENDENCIES
97
- bundler (~> 2.0)
116
+ benchmark
117
+ bundler
98
118
  coveralls (>= 0.8.23)
99
- json (>= 2.3.1)
119
+ json
100
120
  mutils!
101
- pre-commit
102
- rake (~> 13.2)
121
+ rake
103
122
  rspec
104
123
  rspec-benchmark
105
124
  rspec-json_expectations
106
- rubocop (>= 1.63.3)
125
+ rubocop
126
+ rubocop-rake
127
+ rubocop-rspec
107
128
  simplecov-lcov!
108
129
 
109
130
  BUNDLED WITH
data/Version CHANGED
@@ -1 +1 @@
1
- v1.3.3
1
+ v1.3.5
data/bin/rspec ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rspec' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
12
+
13
+ bundle_binstub = File.expand_path('bundle', __dir__)
14
+
15
+ if File.file?(bundle_binstub)
16
+ if File.read(bundle_binstub, 300).include?('This file was generated by Bundler')
17
+ load(bundle_binstub)
18
+ else
19
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21
+ end
22
+ end
23
+
24
+ require 'rubygems'
25
+ require 'bundler/setup'
26
+
27
+ load Gem.bin_path('rspec-core', 'rspec')
data/bin/rubocop ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rubocop' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
12
+
13
+ bundle_binstub = File.expand_path('bundle', __dir__)
14
+
15
+ if File.file?(bundle_binstub)
16
+ if File.read(bundle_binstub, 300).include?('This file was generated by Bundler')
17
+ load(bundle_binstub)
18
+ else
19
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21
+ end
22
+ end
23
+
24
+ require 'rubygems'
25
+ require 'bundler/setup'
26
+
27
+ load Gem.bin_path('rubocop', 'rubocop')
@@ -25,7 +25,9 @@ module Mutils
25
25
  end
26
26
 
27
27
  def attribute(method_name, options = {}, &proc)
28
- raise "if: should be a Proc object for attribute #{method_name}" if options[:if] && !options[:if].instance_of?(Proc)
28
+ if options[:if] && !options[:if].instance_of?(Proc)
29
+ raise "if: should be a Proc object for attribute #{method_name}"
30
+ end
29
31
 
30
32
  if proc.instance_of? Proc
31
33
  self.attributes_to_serialize_blocks = {} if attributes_to_serialize_blocks.nil?
@@ -9,7 +9,9 @@ module Mutils
9
9
  # Module Relations
10
10
  module Relations
11
11
  def relationship(relationship_name, options = {})
12
- raise "if: should be a Proc object for attribute #{relationship_name}" if options[:if] && !options[:if].instance_of?(Proc)
12
+ if options[:if] && !options[:if].instance_of?(Proc)
13
+ raise "if: should be a Proc object for attribute #{relationship_name}"
14
+ end
13
15
 
14
16
  options = prepare_options(relationship_name, options, __callee__)
15
17
  self.relationships = {} if relationships.nil?
@@ -10,13 +10,17 @@ module Mutils
10
10
  def hash_relationships(relationships_array, result_hash)
11
11
  relationships = relationships_array&.compact
12
12
  relationships&.each do |key, s_options|
13
- object = scope.send(key)
14
- name = s_options[:label]
15
- Lib::Helper.instance.collection?(object) && (name = Lib::Helper.instance.pluralize(name))
16
- name = name.to_sym
17
- check_if_included(s_options, key) && (result_hash[name] = Lib::Helper.instance.constantize(s_options[:serializer]).new(object).to_h)
13
+ hash_relationship(key, s_options, result_hash)
18
14
  end
19
15
  end
16
+
17
+ def hash_relationship(key, s_options, result_hash)
18
+ object = scope.send(key)
19
+ name = s_options[:label]
20
+ Lib::Helper.instance.collection?(object) && (name = Lib::Helper.instance.pluralize(name))
21
+ name = name.to_sym
22
+ check_if_included(s_options, key) && (result_hash[name] = Lib::Helper.instance.constantize(s_options[:serializer]).new(object).to_h)
23
+ end
20
24
  end
21
25
  end
22
26
  end
@@ -2,6 +2,5 @@
2
2
 
3
3
  # Version
4
4
  module Mutils
5
- version_file_path = File.join(File.dirname(__FILE__), '../../Version')
6
- VERSION = File.read(version_file_path).split("\n").first.gsub('v', '')
5
+ VERSION = '1.3.5'
7
6
  end
data/mutils.gemspec CHANGED
@@ -20,13 +20,13 @@ 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.7.0'
24
- spec.required_rubygems_version = '>= 1.8.11'
23
+ spec.required_ruby_version = '>= 3.2'
25
24
  spec.add_dependency('dry-inflector')
26
25
 
27
26
  spec.metadata = {
28
27
  'bug_tracker_uri' => 'https://github.com/code-vedas/mutils/issues',
29
- 'source_code_uri' => "https://github.com/code-vedas/mutils/tree/v#{Mutils::VERSION}",
28
+ 'source_code_uri' => 'https://github.com/Code-Vedas/mutils.git',
29
+ 'homepage_uri' => 'https://github.com/code-vedas/mutils',
30
30
  'rubygems_mfa_required' => 'true'
31
31
  }
32
32
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mutils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nitesh Purohit
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-09-05 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: dry-inflector
@@ -32,23 +31,26 @@ extensions: []
32
31
  extra_rdoc_files: []
33
32
  files:
34
33
  - ".codeclimate.yml"
35
- - ".github/CONTRIBUTING.md"
36
- - ".github/ISSUE_TEMPLATE.md"
34
+ - ".github/FUNDING.yml"
37
35
  - ".github/ISSUE_TEMPLATE/bug_report.md"
36
+ - ".github/ISSUE_TEMPLATE/documentation_issue.md"
38
37
  - ".github/ISSUE_TEMPLATE/feature_request.md"
38
+ - ".github/ISSUE_TEMPLATE/question_or_help.md"
39
+ - ".github/ISSUE_TEMPLATE/report_a_security_vulnerability.md"
40
+ - ".github/ISSUE_TEMPLATE/translations.md"
39
41
  - ".github/PULL_REQUEST_TEMPLATE.md"
40
42
  - ".github/dependabot.yml"
43
+ - ".github/release-drafter.yml"
44
+ - ".github/workflows/ci.yml"
41
45
  - ".github/workflows/codeql.yml"
42
- - ".github/workflows/create-release.yml"
43
- - ".github/workflows/master.yml"
44
- - ".github/workflows/publish-gem.yml"
45
- - ".github/workflows/test.yml"
46
+ - ".github/workflows/release-drafter.yml"
47
+ - ".github/workflows/release.yml"
46
48
  - ".gitignore"
47
49
  - ".jrubyrc"
48
50
  - ".releaserc"
49
51
  - ".rspec"
50
52
  - ".rubocop.yml"
51
- - ".rubocop_todo.yml"
53
+ - ".ruby-version"
52
54
  - CHANGELOG.md
53
55
  - CODE_OF_CONDUCT.md
54
56
  - Gemfile
@@ -59,9 +61,9 @@ files:
59
61
  - SECURITY.md
60
62
  - Version
61
63
  - bin/console
64
+ - bin/rspec
65
+ - bin/rubocop
62
66
  - bin/setup
63
- - commitlint.config.js
64
- - gemdeploy.sh
65
67
  - lib/generators/mutils/USAGE
66
68
  - lib/generators/mutils/serializer_generator.rb
67
69
  - lib/generators/mutils/templates/serializer.rb.tt
@@ -85,9 +87,9 @@ licenses:
85
87
  - MIT
86
88
  metadata:
87
89
  bug_tracker_uri: https://github.com/code-vedas/mutils/issues
88
- source_code_uri: https://github.com/code-vedas/mutils/tree/v1.3.3
90
+ source_code_uri: https://github.com/Code-Vedas/mutils.git
91
+ homepage_uri: https://github.com/code-vedas/mutils
89
92
  rubygems_mfa_required: 'true'
90
- post_install_message:
91
93
  rdoc_options: []
92
94
  require_paths:
93
95
  - lib
@@ -95,15 +97,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
97
  requirements:
96
98
  - - ">="
97
99
  - !ruby/object:Gem::Version
98
- version: 2.7.0
100
+ version: '3.2'
99
101
  required_rubygems_version: !ruby/object:Gem::Requirement
100
102
  requirements:
101
103
  - - ">="
102
104
  - !ruby/object:Gem::Version
103
- version: 1.8.11
105
+ version: '0'
104
106
  requirements: []
105
- rubygems_version: 3.5.14
106
- signing_key:
107
+ rubygems_version: 4.0.3
107
108
  specification_version: 4
108
109
  summary: mutils Utilities for rails app
109
110
  test_files: []