rails_async_methods 0.2.1 → 0.2.3
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 +4 -4
- data/README.md +8 -0
- data/lib/rails_async_methods/async_method.rb +2 -2
- data/lib/rails_async_methods/version.rb +1 -1
- data/lib/rails_async_methods.rb +4 -0
- metadata +16 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9f96a95549f328c27349e1f788067873a5075118c33ff88cd764a2801d340d51
|
|
4
|
+
data.tar.gz: 8da8acdf8679fcfedb24df37b7669ef72aa123e7c2dee44ecfea27b802b5e343
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4f3647d528c2c31fd6d7ff1a0b457b6f9433861643af130822189b417a89380925c3b6a0f9d34bc4922a9e4d33d713dc6b6634707ecc527e38e060fc020b40c7
|
|
7
|
+
data.tar.gz: 03f086cbec190ae136c3e08ee2056872971a0aa658e014f0da635a3e017692e2bd1ec99d8799bc1efb80b9ad35a7947d885cb72d432addb8fdf5ebcb11c91e97
|
data/README.md
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
# RailsAsyncMethods
|
|
2
|
+
|
|
3
|
+
> **Deprecated / Sunset:** `rails_async_methods` is deprecated and no longer actively maintained.
|
|
4
|
+
>
|
|
5
|
+
> **Security & correctness notice (`0.2.x`):** Releases `<= 0.2.x` have known security and correctness defects, including `module_eval` parameter-name shadowing (`method_name` / `argument`), an un-allowlisted `AbstractJob#perform` `public_send` dispatcher, silent default-argument clobbering (`nil`), and ActiveRecord transaction-commit race conditions.
|
|
6
|
+
>
|
|
7
|
+
> - For production Rails apps, use standard `ApplicationJob` classes directly (with Solid Queue, Sidekiq, or GoodJob).
|
|
8
|
+
> - If you want to vendor or fork a security-hardened, zero-`eval` implementation of this pattern for Ruby 3.3+ and Rails 7.2/8.x, see the [`rewrite` branch](https://github.com/benngarcia/rails_async_methods/tree/rewrite).
|
|
9
|
+
|
|
2
10
|
Rails Async Methods is an opinionated gem meant to remove boilerplate while creating Rails ActiveJobs. It provides a declarative interface for converting any model method into an asychronous method by providing an abstracted wrapper around rails ActiveJob API.
|
|
3
11
|
|
|
4
12
|
## Usage
|
|
@@ -18,7 +18,7 @@ module RailsAsyncMethods
|
|
|
18
18
|
active_job_arguments = RailsAsyncMethods::ActiveJobOptionsParser.new(opts)
|
|
19
19
|
|
|
20
20
|
if parsed_method_arguments.empty?
|
|
21
|
-
define_method "#{active_job_arguments.prefix
|
|
21
|
+
define_method "#{active_job_arguments.prefix}#{method_name.to_s}" do
|
|
22
22
|
raise NotPersistedError, 'Instance must be persisted to run asynchronously' unless persisted?
|
|
23
23
|
raise TypeError, 'Cannot pass a block to an asynchronous method' if block_given?
|
|
24
24
|
|
|
@@ -43,4 +43,4 @@ module RailsAsyncMethods
|
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
|
-
end
|
|
46
|
+
end
|
data/lib/rails_async_methods.rb
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
require "rails_async_methods/version"
|
|
2
2
|
require "rails_async_methods/core_ext"
|
|
3
3
|
|
|
4
|
+
warn "[rails_async_methods] DEPRECATED: This gem is sunset and no longer maintained. " \
|
|
5
|
+
"See https://github.com/benngarcia/rails_async_methods and the security-hardened " \
|
|
6
|
+
"reference implementation at https://github.com/benngarcia/rails_async_methods/tree/rewrite"
|
|
7
|
+
|
|
4
8
|
module RailsAsyncMethods
|
|
5
9
|
autoload :AsyncMethod, 'rails_async_methods/async_method'
|
|
6
10
|
autoload :AsyncWrapper, 'rails_async_methods/wrapper/async_wrapper'
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_async_methods
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- benngarcia
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: activesupport
|
|
@@ -94,8 +93,8 @@ dependencies:
|
|
|
94
93
|
- - ">="
|
|
95
94
|
- !ruby/object:Gem::Version
|
|
96
95
|
version: '0'
|
|
97
|
-
description:
|
|
98
|
-
|
|
96
|
+
description: 'DEPRECATED: rails_async_methods is sunset. See https://github.com/benngarcia/rails_async_methods
|
|
97
|
+
for details and the security-hardened rewrite branch.'
|
|
99
98
|
email:
|
|
100
99
|
- beng4606@gmail.com
|
|
101
100
|
executables: []
|
|
@@ -120,7 +119,16 @@ licenses:
|
|
|
120
119
|
metadata:
|
|
121
120
|
homepage_uri: https://github.com/benngarcia/rails_async_methods
|
|
122
121
|
changelog_uri: https://github.com/benngarcia/rails_async_methods/blob/master/CHANGELOG.md
|
|
123
|
-
post_install_message:
|
|
122
|
+
post_install_message: |
|
|
123
|
+
================================================================================
|
|
124
|
+
[DEPRECATED] rails_async_methods is sunset and no longer actively maintained.
|
|
125
|
+
|
|
126
|
+
Releases <= 0.2.x contain known security and correctness issues (including
|
|
127
|
+
module_eval parameter shadowing and un-allowlisted job dispatch).
|
|
128
|
+
|
|
129
|
+
- Production apps: use standard ActiveJob / ApplicationJob classes directly.
|
|
130
|
+
- Reference fix: https://github.com/benngarcia/rails_async_methods/tree/rewrite
|
|
131
|
+
================================================================================
|
|
124
132
|
rdoc_options: []
|
|
125
133
|
require_paths:
|
|
126
134
|
- lib
|
|
@@ -135,9 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
135
143
|
- !ruby/object:Gem::Version
|
|
136
144
|
version: '0'
|
|
137
145
|
requirements: []
|
|
138
|
-
rubygems_version: 3.
|
|
139
|
-
signing_key:
|
|
146
|
+
rubygems_version: 3.6.9
|
|
140
147
|
specification_version: 4
|
|
141
|
-
summary: Quickly
|
|
142
|
-
y'know DRY.
|
|
148
|
+
summary: "[DEPRECATED] Quickly create async callers and receivers for your Rails methods."
|
|
143
149
|
test_files: []
|