concurrent_rails 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c9f6c5865a512a981fb3be8f87dadffbc2751c0bb8937b4929af57b3fa691a7
4
- data.tar.gz: 40e7a30066f9cb04a4093fef697e0e36733d6ca9c7302cbe4b3af4ad7d7e29e7
3
+ metadata.gz: 87ad625b78cf38b613761735ca3ca8ad7dbf12f16f807290082bf1a7081ad383
4
+ data.tar.gz: 723e320ec707747381e1d8b7f6b81f801c02643d2d18f4e714330041eeff49a5
5
5
  SHA512:
6
- metadata.gz: 31ba76250826eab804ac7941e6bd33bf9887d367bcf4dcd1b7dca306b3c44287ca1d5c9c75396e7ed8b88168675251ca8df597b4b175c1aa5cee1287fbbb9181
7
- data.tar.gz: 3beebfc9b8dc305b555dca571570737247c0409dd67976d0a526d6f37ae64531c2fedafb4de62ef3edb90e867db3ace8131abfa152998b1ff047534c62d7d251
6
+ metadata.gz: 0fa50d7cfad90990b29f75bdcf3f6e15dc8252774259b4d65af62f37cd36a4ed46b0ff5b091a39a8f0e0f54625e90d5444489dd6d4ea13b44d9c474d783c56d2
7
+ data.tar.gz: 3a75c1ccd1f4821827359c672c991b0ef071a2dc41a274447c1117c51bc52bc9cc41fec35cde38ef6d79b31d4047b419240ae99775c415bff66240433b05f340
data/README.md CHANGED
@@ -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.3'
146
+ gem 'concurrent_rails', '~> 0.1.5'
147
147
  ```
148
148
 
149
149
  And then execute:
@@ -15,15 +15,17 @@ module ConcurrentRails
15
15
  self
16
16
  end
17
17
 
18
- def value
19
- Rails.application.executor.wrap do
20
- result = nil
18
+ %i[value value!].each do |method_name|
19
+ define_method method_name do
20
+ Rails.application.executor.wrap do
21
+ result = nil
21
22
 
22
- ActiveSupport::Dependencies.interlock.permit_concurrent_loads do
23
- result = future.value
24
- end
23
+ ActiveSupport::Dependencies.interlock.permit_concurrent_loads do
24
+ result = future.__send__(method_name)
25
+ end
25
26
 
26
- result
27
+ result
28
+ end
27
29
  end
28
30
  end
29
31
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ConcurrentRails
4
- VERSION = '0.1.4'
4
+ VERSION = '0.1.5'
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.4
4
+ version: 0.1.5
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-20 00:00:00.000000000 Z
11
+ date: 2021-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -75,7 +75,7 @@ licenses:
75
75
  metadata:
76
76
  homepage_uri: https://github.com/luizkowalski/concurrent_rails
77
77
  source_code_uri: https://github.com/luizkowalski/concurrent_rails
78
- changelog_uri: https://github.com/luizkowalski/concurrent_rails/CHANGELOG.md
78
+ changelog_uri: https://github.com/luizkowalski/concurrent_rails/blob/master/CHANGELOG.md
79
79
  post_install_message:
80
80
  rdoc_options: []
81
81
  require_paths: