concurrent_rails 0.1.6 → 0.1.7

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: 83f0c6f9839dd61c1148dcb02f2a0c4b12d61294af1f7f4f86487f0f0d5f3907
4
- data.tar.gz: 2a2a8eddbad74a6a56a6ad7f3b28b46c7c8c1ba7a0c44a30c0a3d0b25496072d
3
+ metadata.gz: fe2277deed1f15f3c47a332667db0b85bbfb0d39d58bcb6539fa0d15d843c55d
4
+ data.tar.gz: 0e347f69da65b60fcbdb63a04cdcb3bac782ba01b6e543db93428ff4c2bdbdc0
5
5
  SHA512:
6
- metadata.gz: 8bb76a46611d36597321ec8b4fd700a86a844f1f489791005e845c2947893c83652d2675d359ccc628fdc810606ade432e58c1406aa410412e1f80f444a33509
7
- data.tar.gz: a5e3a549eb26a86fb9887c3d86ce4aeea71bd604ac8fb42a204b56063d34b7c914f3518bd189fd38a9336f36fc762049905919812eb12d1373cb24139adba76c
6
+ metadata.gz: '079c165494e1eea8ae9c98fe89031c87408808527a3f90eda3c5c5d87598bfb5932b0285acaa99d4e5e714a1012af3676bc16fc9b5929268ff26640b90f4b191'
7
+ data.tar.gz: 97944d3f3db134d08eb894f6f3211a705cb080ec4d4ec331657c94940fd08a08c4f1f46859d430f3c2e5097a1cc54d7de322e9f39a0fcc48de78d49982cd26e8
data/README.md CHANGED
@@ -9,7 +9,7 @@ The goal of this gem is to provide a simple library that allows the developer to
9
9
 
10
10
  ## Usage
11
11
 
12
- This library provides three classes that will help you run tasks in parallel: `ConcurrentRails::Promises`, `ConcurrentRails::Future` and `ConcurrentRails::Multi`
12
+ This library provides three classes that will help you run tasks in parallel: `ConcurrentRails::Promises`, `ConcurrentRails::Future` ([in process of being deprecated by concurrent-ruby](https://github.com/ruby-concurrency/concurrent-ruby#deprecated)) and `ConcurrentRails::Multi`
13
13
 
14
14
  ### Promises
15
15
 
@@ -143,7 +143,7 @@ For more information on how Futures work and how Rails handle multithread check
143
143
  Add this line to your application's Gemfile:
144
144
 
145
145
  ```ruby
146
- gem 'concurrent_rails', '~> 0.1.6'
146
+ gem 'concurrent_rails', '~> 0.1.7'
147
147
  ```
148
148
 
149
149
  And then execute:
@@ -23,6 +23,14 @@ module ConcurrentRails
23
23
  self
24
24
  end
25
25
 
26
+ def chain(*args, &task)
27
+ Rails.application.executor.wrap do
28
+ future_instance.chain(*args, &task)
29
+ end
30
+
31
+ self
32
+ end
33
+
26
34
  %i[value value!].each do |method_name|
27
35
  define_method method_name do |timeout = nil, timeout_value = nil|
28
36
  Rails.application.executor.wrap do
@@ -41,7 +49,7 @@ module ConcurrentRails
41
49
  self
42
50
  end
43
51
 
44
- def_delegators :@future_instance, :state, :reason, :rejected?, :complete?
52
+ def_delegators :@future_instance, :state, :reason, :rejected?, :resolved?
45
53
 
46
54
  private
47
55
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ConcurrentRails
4
- VERSION = '0.1.6'
4
+ VERSION = '0.1.7'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: concurrent_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luiz Eduardo Kowalski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-26 00:00:00.000000000 Z
11
+ date: 2021-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails