mutils 1.2.6 → 1.3.1

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: ba0d177914b79c45fb3da60966cfaad27381fb071f1d547ed164fdd6b36b4ff0
4
- data.tar.gz: 2b43060e32d381cf74b3e6e46d8d54c74951aad5ac22a72d56e6be59585e24b5
3
+ metadata.gz: 9500befb8ae25cbbd9b556f261526a70d83d9e0dffe74f8be11ebd67df85b931
4
+ data.tar.gz: 7a642d1a099dc3215de5d9e699ba99a122ad3c0500eedd437b607358aa845b14
5
5
  SHA512:
6
- metadata.gz: bdf0e0225d311ffb32a28444715fdd67d906e0621eb427bd735fe7f00186334284069cbb5f6adb9bbe11ffa268b82ceb16a34fe23d16fba83c69213e229d21d7
7
- data.tar.gz: 5ba7fdd5317995172a7437612cb51506eb0d495ba5f82218de8b3b944391051e204dd920bbaabab409e60e9802912274aafdd5144a07c7622bef66b3836de100
6
+ metadata.gz: ab26bab722a8fe17eaee2d731977ab0b873c63a8de388beea06e3bcbc98a5b607b3ee6340040000c569ee7a8528077edb0a79a58cfaab111bed3eb4dc5b455be
7
+ data.tar.gz: 0ba67211f4aa34437f74d919baa4bae500d8ec626a7ad7a69c733b41cb0d395093f5692c0f1d62aa10a69370fd3a02e90d3a9bec71bdc8eb53b3d6ef0d62b574
@@ -0,0 +1,66 @@
1
+ name: "CodeQL"
2
+
3
+ on:
4
+ push:
5
+ branches: [ "*" ]
6
+ pull_request:
7
+ # The branches below must be a subset of the branches above
8
+ branches: [ "*" ]
9
+ merge_group:
10
+ schedule:
11
+ - cron: '26 6 * * 5'
12
+
13
+ jobs:
14
+ analyze:
15
+ name: Analyze
16
+ runs-on: ubuntu-latest
17
+ permissions:
18
+ actions: read
19
+ contents: read
20
+ security-events: write
21
+
22
+ strategy:
23
+ fail-fast: false
24
+ matrix:
25
+ language: [ 'ruby' ]
26
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
27
+ # Use only 'java' to analyze code written in Java, Kotlin or both
28
+ # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
29
+ # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
30
+
31
+ steps:
32
+ - name: Checkout repository
33
+ uses: actions/checkout@v3
34
+
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.
43
+
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
46
+
47
+
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
52
+
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
55
+
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.
58
+
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}}"
@@ -4,13 +4,13 @@ on:
4
4
  jobs:
5
5
  create_release:
6
6
  name: Create Release
7
- runs-on: ubuntu-20.04
7
+ runs-on: ubuntu-latest
8
8
  steps:
9
- - uses: actions/checkout@v2
9
+ - uses: actions/checkout@v3
10
10
  - name: Use Node.js
11
11
  uses: actions/setup-node@v1
12
12
  with:
13
- node-version: 18.x
13
+ node-version: 20.x
14
14
  - uses: ruby/setup-ruby@v1
15
15
  with:
16
16
  ruby-version: 3.0
@@ -2,9 +2,10 @@ name: Test Master
2
2
  on:
3
3
  push:
4
4
  branches: [master]
5
+ merge_group:
5
6
  jobs:
6
7
  testing:
7
- runs-on: ubuntu-20.04
8
+ runs-on: ubuntu-latest
8
9
  strategy:
9
10
  matrix:
10
11
  ruby:
@@ -12,13 +13,12 @@ jobs:
12
13
  - "3.1"
13
14
  - "3.0"
14
15
  - "2.7"
15
- - "2.6"
16
16
  include:
17
17
  - ruby: "3.0"
18
18
  coverage: "true"
19
19
  name: Test with ruby ${{ matrix.ruby }}
20
20
  steps:
21
- - uses: actions/checkout@v2
21
+ - uses: actions/checkout@v3
22
22
  - uses: ruby/setup-ruby@v1
23
23
  with:
24
24
  ruby-version: ${{ matrix.ruby }}
@@ -1,4 +1,4 @@
1
- name: Publish Gem
1
+ name: Publish Gem (Manual)
2
2
  on:
3
3
  workflow_dispatch:
4
4
  inputs:
@@ -17,7 +17,7 @@ jobs:
17
17
  echo "release_password=${{secrets.RELEASE_PASSWORD}}" >> $GITHUB_ENV
18
18
  - name: Checkout
19
19
  if: github.event.inputs.release_password == env.release_password
20
- uses: actions/checkout@v2
20
+ uses: actions/checkout@v3
21
21
  - uses: ruby/setup-ruby@v1
22
22
  if: github.event.inputs.release_password == env.release_password
23
23
  with:
@@ -1,12 +1,10 @@
1
1
  name: Pull Requests
2
2
  on:
3
- push:
4
- branches:
5
- - "*"
6
- - "!master"
3
+ pull_request:
4
+ branches: [ "master" ]
7
5
  jobs:
8
6
  testing:
9
- runs-on: ubuntu-20.04
7
+ runs-on: ubuntu-latest
10
8
  strategy:
11
9
  matrix:
12
10
  ruby:
@@ -14,13 +12,12 @@ jobs:
14
12
  - "3.1"
15
13
  - "3.0"
16
14
  - "2.7"
17
- - "2.6"
18
15
  include:
19
16
  - ruby: "3.2"
20
17
  coverage: "true"
21
18
  name: Test with ruby ${{ matrix.ruby }}
22
19
  steps:
23
- - uses: actions/checkout@v2
20
+ - uses: actions/checkout@v3
24
21
  - uses: ruby/setup-ruby@v1
25
22
  with:
26
23
  ruby-version: ${{ matrix.ruby }}
data/.releaserc CHANGED
@@ -31,7 +31,7 @@ generateNotes:
31
31
  - type: fix
32
32
  section: Bug Fixes
33
33
  - type: perf
34
- section: Performance Improvments
34
+ section: Performance Improvements
35
35
  - type: refactor
36
36
  section: Refactors
37
37
  - type: revert
data/.rubocop.yml CHANGED
@@ -1,7 +1,8 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
 
3
3
  AllCops:
4
- TargetRubyVersion: "2.6.0"
4
+ TargetRubyVersion: "2.7.0"
5
+ NewCops: enable
5
6
  Exclude:
6
7
  - 'spec/**/*'
7
8
  - 'test/**/*'
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.3.1](https://github.com/Code-Vedas/mutils/compare/v1.3.0...v1.3.1) (2024-04-02)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **maintenance:** maintenance release ([19ef41d](https://github.com/Code-Vedas/mutils/commit/19ef41d754f6b398e4955e8ba40359bf91c3bddd))
7
+
8
+ # [1.3.0](https://github.com/Code-Vedas/mutils/compare/v1.2.6...v1.3.0) (2023-03-01)
9
+
10
+
11
+ ### Features
12
+
13
+ * remove ruby 2.6 support ([0a3cb1f](https://github.com/Code-Vedas/mutils/commit/0a3cb1f657ce4f3a8a153a012933dcb826a74cef))
14
+
1
15
  ## [1.2.6](https://github.com/Code-Vedas/mutils/compare/v1.2.5...v1.2.6) (2023-02-23)
2
16
 
3
17
 
data/Gemfile CHANGED
@@ -3,9 +3,11 @@
3
3
  source 'https://rubygems.org'
4
4
 
5
5
  # Specify your gem's dependencies in mutils.gemspec
6
+ gem 'bundler', '~> 2.0'
6
7
  gem 'coveralls', '>= 0.8.23'
7
8
  gem 'json', '>= 2.3.1'
8
9
  gem 'pre-commit', require: false
10
+ gem 'rake', '~> 13.2'
9
11
  gem 'rspec'
10
12
  gem 'rspec-benchmark'
11
13
  gem 'rspec-json_expectations'
data/Gemfile.lock CHANGED
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: .
9
9
  specs:
10
- mutils (1.2.6)
10
+ mutils (1.3.1)
11
11
  dry-inflector
12
12
 
13
13
  GEM
@@ -23,53 +23,58 @@ GEM
23
23
  term-ansicolor (~> 1.3)
24
24
  thor (>= 0.19.4, < 2.0)
25
25
  tins (~> 1.6)
26
- diff-lcs (1.5.0)
26
+ diff-lcs (1.5.1)
27
27
  docile (1.4.0)
28
28
  dry-inflector (1.0.0)
29
- json (2.6.3)
30
- json (2.6.3-java)
31
- parallel (1.22.1)
32
- parser (3.2.1.0)
29
+ json (2.7.1)
30
+ json (2.7.1-java)
31
+ language_server-protocol (3.17.0.3)
32
+ parallel (1.24.0)
33
+ parser (3.3.0.5)
33
34
  ast (~> 2.4.1)
35
+ racc
34
36
  pluginator (1.5.0)
35
- pre-commit (0.39.0)
37
+ pre-commit (0.40.0)
36
38
  pluginator (~> 1.5)
39
+ racc (1.7.3)
40
+ racc (1.7.3-java)
37
41
  rainbow (3.1.1)
38
- rake (13.0.6)
39
- regexp_parser (2.7.0)
40
- rexml (3.2.5)
41
- rspec (3.12.0)
42
- rspec-core (~> 3.12.0)
43
- rspec-expectations (~> 3.12.0)
44
- rspec-mocks (~> 3.12.0)
42
+ rake (13.2.0)
43
+ regexp_parser (2.9.0)
44
+ rexml (3.2.6)
45
+ rspec (3.13.0)
46
+ rspec-core (~> 3.13.0)
47
+ rspec-expectations (~> 3.13.0)
48
+ rspec-mocks (~> 3.13.0)
45
49
  rspec-benchmark (0.6.0)
46
50
  benchmark-malloc (~> 0.2)
47
51
  benchmark-perf (~> 0.6)
48
52
  benchmark-trend (~> 0.4)
49
53
  rspec (>= 3.0)
50
- rspec-core (3.12.0)
51
- rspec-support (~> 3.12.0)
52
- rspec-expectations (3.12.0)
54
+ rspec-core (3.13.0)
55
+ rspec-support (~> 3.13.0)
56
+ rspec-expectations (3.13.0)
53
57
  diff-lcs (>= 1.2.0, < 2.0)
54
- rspec-support (~> 3.12.0)
58
+ rspec-support (~> 3.13.0)
55
59
  rspec-json_expectations (2.2.0)
56
- rspec-mocks (3.12.0)
60
+ rspec-mocks (3.13.0)
57
61
  diff-lcs (>= 1.2.0, < 2.0)
58
- rspec-support (~> 3.12.0)
59
- rspec-support (3.12.0)
60
- rubocop (1.46.0)
62
+ rspec-support (~> 3.13.0)
63
+ rspec-support (3.13.0)
64
+ rubocop (1.62.1)
61
65
  json (~> 2.3)
66
+ language_server-protocol (>= 3.17.0)
62
67
  parallel (~> 1.10)
63
- parser (>= 3.2.0.0)
68
+ parser (>= 3.3.0.2)
64
69
  rainbow (>= 2.2.2, < 4.0)
65
70
  regexp_parser (>= 1.8, < 3.0)
66
71
  rexml (>= 3.2.5, < 4.0)
67
- rubocop-ast (>= 1.26.0, < 2.0)
72
+ rubocop-ast (>= 1.31.1, < 2.0)
68
73
  ruby-progressbar (~> 1.7)
69
74
  unicode-display_width (>= 2.4.0, < 3.0)
70
- rubocop-ast (1.26.0)
71
- parser (>= 3.2.1.0)
72
- ruby-progressbar (1.11.0)
75
+ rubocop-ast (1.31.2)
76
+ parser (>= 3.3.0.4)
77
+ ruby-progressbar (1.13.0)
73
78
  simplecov (0.16.1)
74
79
  docile (~> 1.1)
75
80
  json (>= 1.8, < 3)
@@ -81,7 +86,7 @@ GEM
81
86
  thor (1.2.1)
82
87
  tins (1.31.0)
83
88
  sync
84
- unicode-display_width (2.4.2)
89
+ unicode-display_width (2.5.0)
85
90
 
86
91
  PLATFORMS
87
92
  java
@@ -93,7 +98,7 @@ DEPENDENCIES
93
98
  json (>= 2.3.1)
94
99
  mutils!
95
100
  pre-commit
96
- rake (~> 13.0)
101
+ rake (~> 13.2)
97
102
  rspec
98
103
  rspec-benchmark
99
104
  rspec-json_expectations
data/README.md CHANGED
@@ -1,8 +1,7 @@
1
1
  [![Maintainability](https://api.codeclimate.com/v1/badges/42e8a34f839ca0c5ec45/maintainability)](https://codeclimate.com/github/code-vedas/mutils/maintainability)
2
2
  ![](https://ruby-gem-downloads-badge.herokuapp.com/mutils?type=total&color=brightgreen)
3
3
  [![Gem Version](https://badge.fury.io/rb/mutils.svg)](https://badge.fury.io/rb/mutils)
4
- [![Coverage Status](https://coveralls.io/repos/github/Code-Vedas/mutils/badge.svg?branch=master)](https://coveralls.io/github/Code-Vedas/mutils?branch=master)
5
- ![Master](https://github.com/Code-Vedas/mutils/workflows/Master/badge.svg?branch=master)
4
+ [![Coverage Status](https://badge.coveralls.io/repos/github/Code-Vedas/mutils/badge.svg?branch=master)](https://badge.coveralls.io/github/Code-Vedas/mutils?branch=master)
6
5
 
7
6
  # Mutils
8
7
  ## Introduction
data/Version CHANGED
@@ -1 +1 @@
1
- v1.2.6
1
+ v1.3.1
@@ -24,8 +24,8 @@ module Mutils
24
24
  class_name = options[:serializer]
25
25
  if class_name.nil?
26
26
  raise "Serializer is Required for belongs_to :#{relationship_name}." \
27
- "\nDefine it like:\n#{option_name} :#{relationship_name}, " \
28
- 'serializer: SERIALIZER_CLASS'
27
+ "\nDefine it like:\n#{option_name} :#{relationship_name}, " \
28
+ 'serializer: SERIALIZER_CLASS'
29
29
  end
30
30
  raise "Serializer class not defined for relationship: #{relationship_name}" unless class_exists? class_name
31
31
 
@@ -10,7 +10,7 @@ module Mutils
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)
13
+ (arg << options[:params]) || {} unless s_options[:block].parameters.flatten.include?(:rest)
14
14
 
15
15
  result_hash[key] = s_options[:block].call(*arg)
16
16
  end
data/mutils.gemspec CHANGED
@@ -20,14 +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.6.0'
23
+ spec.required_ruby_version = '>= 2.7.0'
24
24
  spec.required_rubygems_version = '>= 1.8.11'
25
25
  spec.add_dependency('dry-inflector')
26
- spec.add_development_dependency 'bundler', '~> 2.0'
27
- spec.add_development_dependency 'rake', '~> 13.0'
28
26
 
29
27
  spec.metadata = {
30
28
  'bug_tracker_uri' => 'https://github.com/code-vedas/mutils/issues',
31
- 'source_code_uri' => "https://github.com/code-vedas/mutils/tree/v#{Mutils::VERSION}"
29
+ 'source_code_uri' => "https://github.com/code-vedas/mutils/tree/v#{Mutils::VERSION}",
30
+ 'rubygems_mfa_required' => 'true'
32
31
  }
33
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mutils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.6
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nitesh Purohit
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-23 00:00:00.000000000 Z
11
+ date: 2024-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-inflector
@@ -24,34 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '2.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '2.0'
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '13.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '13.0'
55
27
  description: mutils Utilities for rails app
56
28
  email:
57
29
  - nitesh.purohit.it@gmail.com
@@ -66,6 +38,7 @@ files:
66
38
  - ".github/ISSUE_TEMPLATE/feature_request.md"
67
39
  - ".github/PULL_REQUEST_TEMPLATE.md"
68
40
  - ".github/dependabot.yml"
41
+ - ".github/workflows/codeql.yml"
69
42
  - ".github/workflows/create-release.yml"
70
43
  - ".github/workflows/master.yml"
71
44
  - ".github/workflows/publish-gem.yml"
@@ -76,7 +49,6 @@ files:
76
49
  - ".rspec"
77
50
  - ".rubocop.yml"
78
51
  - ".rubocop_todo.yml"
79
- - ".travis.yml"
80
52
  - CHANGELOG.md
81
53
  - CODE_OF_CONDUCT.md
82
54
  - Gemfile
@@ -113,8 +85,9 @@ licenses:
113
85
  - MIT
114
86
  metadata:
115
87
  bug_tracker_uri: https://github.com/code-vedas/mutils/issues
116
- source_code_uri: https://github.com/code-vedas/mutils/tree/v1.2.6
117
- post_install_message:
88
+ source_code_uri: https://github.com/code-vedas/mutils/tree/v1.3.1
89
+ rubygems_mfa_required: 'true'
90
+ post_install_message:
118
91
  rdoc_options: []
119
92
  require_paths:
120
93
  - lib
@@ -122,15 +95,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
122
95
  requirements:
123
96
  - - ">="
124
97
  - !ruby/object:Gem::Version
125
- version: 2.6.0
98
+ version: 2.7.0
126
99
  required_rubygems_version: !ruby/object:Gem::Requirement
127
100
  requirements:
128
101
  - - ">="
129
102
  - !ruby/object:Gem::Version
130
103
  version: 1.8.11
131
104
  requirements: []
132
- rubygems_version: 3.4.7
133
- signing_key:
105
+ rubygems_version: 3.1.4
106
+ signing_key:
134
107
  specification_version: 4
135
108
  summary: mutils Utilities for rails app
136
109
  test_files: []
data/.travis.yml DELETED
@@ -1,27 +0,0 @@
1
- #rvm:
2
- # - 2.6.3
3
- # - 2.6.5
4
- # - 2.7.0
5
- # - 2.7.1
6
- # - jruby-9.2.13.0
7
- #sudo: false
8
- #language: ruby
9
- #cache: bundler
10
- #before_install:
11
- # - gem install bundler -v 2.0.1
12
- # - gem install rspec
13
- # - nvm use 11
14
- # - npm install
15
- #script: bundle exec rubocop lib && bundle exec rspec
16
- #branches:
17
- # only: master
18
- #bundler_args: --with=development,test --jobs=3 --retry=3
19
- #jobs:
20
- # include:
21
- # - stage: release
22
- # rvm: 2.6.5
23
- # script: npx semantic-release
24
- #stages:
25
- # - test
26
- # - name: release
27
- # if: (NOT type IN (pull_request)) AND (branch = master)