remove_reserved_keywords_extensions 1.0.0.pre.rc.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 20b3ea5086a0e1decaaf288c55834d427af0047867af1269963f731d32dd357b
4
+ data.tar.gz: ba9928d0382d429238aab12a336bce21708ae96af2017af067d1c24b85d4e84a
5
+ SHA512:
6
+ metadata.gz: 3a919ff3865a414f32f05ec58c285a11a8d7d9c9dd8dcb5ac5a87bfd4db39899122a00ab6546387d92dbe42a5c996890b0d0d36d6296556d2b0c7df32431120f
7
+ data.tar.gz: 897f78fd7e65111f60bb5fbd0cce3fbdd785a239583ded478d238cc5751a6ae963be3d4bf2e7cab07c3f8bb425f3f81955d97fd06ba22f1535c85e2a1ceadac0
data/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ Unreleased Changes
2
+ ------------------
3
+
4
+ 1.0.0 (2023-05-16)
5
+ ------------------
6
+
7
+ * Inital release
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Marcus Wyatt
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.0-rc.1
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ ActiveJob::Base.class_eval do
4
+ # Removes any reserved keywords that can't be passed along.
5
+ #
6
+ # @param arguments [...]
7
+ #
8
+ # @return [String, Numeric, Hash, Array, nil]
9
+ #
10
+ def remove_reserved_keywords(arguments)
11
+ case arguments
12
+ when String, Numeric
13
+ arguments
14
+ when Hash
15
+ arguments.each_with_object({}) do |(key, value), obj|
16
+ next if key.start_with?('_aj')
17
+
18
+ obj[key] = remove_reserved_keywords(value)
19
+ end
20
+ when Array
21
+ arguments.map do |arg|
22
+ remove_reserved_keywords(arg)
23
+ end
24
+ end
25
+ end
26
+ end
metadata ADDED
@@ -0,0 +1,49 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: remove_reserved_keywords_extensions
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0.pre.rc.1
5
+ platform: ruby
6
+ authors:
7
+ - Marcus Wyatt
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-05-16 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email:
15
+ - mwyatt@brandsinsurance.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - CHANGELOG.md
21
+ - LICENSE.txt
22
+ - VERSION
23
+ - lib/remove_reserved_keywords_extension.rb
24
+ homepage: https://github.com/BrandsInsurance/rails-extensions
25
+ licenses:
26
+ - MIT
27
+ metadata:
28
+ rubygems_mfa_required: 'true'
29
+ source_code_uri: https://github.com/BrandsInsurance/rails-extensions/tree/main/gems/remove_reserved_keywords_extension
30
+ post_install_message:
31
+ rdoc_options: []
32
+ require_paths:
33
+ - lib
34
+ required_ruby_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: 3.0.1
39
+ required_rubygems_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">"
42
+ - !ruby/object:Gem::Version
43
+ version: 1.3.1
44
+ requirements: []
45
+ rubygems_version: 3.2.15
46
+ signing_key:
47
+ specification_version: 4
48
+ summary: Add `remove_reserved_keywords` to ActiveJob::Base
49
+ test_files: []