dry-effects 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/LICENSE +1 -1
- data/README.md +4 -12
- data/dry-effects.gemspec +1 -1
- data/lib/dry/effects/effects/resolve.rb +1 -1
- data/lib/dry/effects/extensions/active_support/tagged_logging.rb +14 -8
- data/lib/dry/effects/extensions/auto_inject.rb +1 -1
- data/lib/dry/effects/initializer.rb +9 -3
- data/lib/dry/effects/providers/random.rb +1 -1
- data/lib/dry/effects/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '019d3a5a4ceac14c0bf1fc045315034746b2076f82e17c8cd43d1e4d15453a73'
|
4
|
+
data.tar.gz: 7c6bc85d0688ff60a98152a50f0bd27e2ee7cbd45379a33be51584bfad456c3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a900139589cf38dcdacb469021826ade7e435a9229243ae9392b76fc0cfcca6762ef48373e5a2d7b4a16f7ae51cb769c7f1de1559c92c14d8bdd3725def5932
|
7
|
+
data.tar.gz: 91d5e392c86b9a91b5bef272914d4a647790606716de5722d4cccd555584bdfb33e7cdaa6fb653ffa870b33f21481fa4a057babf85131077d9a85cca65b25c6d
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
<!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
|
2
2
|
|
3
|
+
## 0.4.1
|
4
|
+
|
5
|
+
|
6
|
+
### Changed
|
7
|
+
|
8
|
+
- Workaround for a clash with Object#with (@tallica + @flash-gordon)
|
9
|
+
|
10
|
+
[Compare v0.4.0...main](https://github.com/dry-rb/dry-effects/compare/v0.4.0...main)
|
11
|
+
|
3
12
|
## 0.4.0
|
4
13
|
|
5
14
|
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,29 +1,21 @@
|
|
1
1
|
<!--- this file is synced from dry-rb/template-gem project -->
|
2
2
|
[gem]: https://rubygems.org/gems/dry-effects
|
3
3
|
[actions]: https://github.com/dry-rb/dry-effects/actions
|
4
|
-
[codacy]: https://www.codacy.com/gh/dry-rb/dry-effects
|
5
|
-
[chat]: https://dry-rb.zulipchat.com
|
6
|
-
[inchpages]: http://inch-ci.org/github/dry-rb/dry-effects
|
7
4
|
|
8
|
-
# dry-effects [![
|
9
|
-
|
10
|
-
[![Gem Version](https://badge.fury.io/rb/dry-effects.svg)][gem]
|
11
|
-
[![CI Status](https://github.com/dry-rb/dry-effects/workflows/ci/badge.svg)][actions]
|
12
|
-
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/158a8a584a3845eba4a67a71ad540210)][codacy]
|
13
|
-
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/158a8a584a3845eba4a67a71ad540210)][codacy]
|
14
|
-
[![Inline docs](http://inch-ci.org/github/dry-rb/dry-effects.svg?branch=main)][inchpages]
|
5
|
+
# dry-effects [![Gem Version](https://badge.fury.io/rb/dry-effects.svg)][gem] [![CI Status](https://github.com/dry-rb/dry-effects/workflows/ci/badge.svg)][actions]
|
15
6
|
|
16
7
|
## Links
|
17
8
|
|
18
9
|
* [User documentation](https://dry-rb.org/gems/dry-effects)
|
19
10
|
* [API documentation](http://rubydoc.info/gems/dry-effects)
|
11
|
+
* [Forum](https://discourse.dry-rb.org)
|
20
12
|
|
21
13
|
## Supported Ruby versions
|
22
14
|
|
23
15
|
This library officially supports the following Ruby versions:
|
24
16
|
|
25
|
-
* MRI `>=
|
26
|
-
* jruby `>= 9.
|
17
|
+
* MRI `>= 3.0.0`
|
18
|
+
* jruby `>= 9.4` (not tested on CI)
|
27
19
|
|
28
20
|
## License
|
29
21
|
|
data/dry-effects.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.metadata["source_code_uri"] = "https://github.com/dry-rb/dry-effects"
|
27
27
|
spec.metadata["bug_tracker_uri"] = "https://github.com/dry-rb/dry-effects/issues"
|
28
28
|
|
29
|
-
spec.required_ruby_version = ">=
|
29
|
+
spec.required_ruby_version = ">= 3.0.0"
|
30
30
|
|
31
31
|
# to update dependencies edit project.yml
|
32
32
|
spec.add_runtime_dependency "concurrent-ruby", "~> 1.0"
|
@@ -2,12 +2,18 @@
|
|
2
2
|
|
3
3
|
require "active_support/tagged_logging"
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
begin
|
6
|
+
require "active_support/isolated_execution_state"
|
7
|
+
|
8
|
+
# it's not needed when state is already isolated
|
9
|
+
rescue LoadError
|
10
|
+
ActiveSupport::TaggedLogging::Formatter.prepend(Module.new {
|
11
|
+
def current_tags
|
12
|
+
thread_key = @thread_key ||= "activesupport_tagged_logging_tags:#{object_id}"
|
13
|
+
unless Thread.current.thread_variable_get(thread_key)
|
14
|
+
Thread.current.thread_variable_set(thread_key, [])
|
15
|
+
end
|
16
|
+
Thread.current.thread_variable_get(thread_key)
|
10
17
|
end
|
11
|
-
|
12
|
-
|
13
|
-
})
|
18
|
+
})
|
19
|
+
end
|
@@ -5,7 +5,7 @@ require "dry/auto_inject"
|
|
5
5
|
require "dry/auto_inject/version"
|
6
6
|
|
7
7
|
if Gem::Version.new(Dry::AutoInject::VERSION) < Gem::Version.new("0.10.0")
|
8
|
-
raise
|
8
|
+
raise "dry-effects requires dry-auto_inject >= 0.10.0"
|
9
9
|
end
|
10
10
|
|
11
11
|
module Dry
|
@@ -64,9 +64,15 @@ module Dry
|
|
64
64
|
|
65
65
|
# @api private
|
66
66
|
def self.extended(base)
|
67
|
-
base.
|
68
|
-
|
69
|
-
|
67
|
+
base.module_eval do
|
68
|
+
if method_defined?(:with)
|
69
|
+
undef_method(:with)
|
70
|
+
end
|
71
|
+
|
72
|
+
extend(::Dry::Initializer)
|
73
|
+
extend(DefineWithHook)
|
74
|
+
include(InstanceMethods)
|
75
|
+
end
|
70
76
|
end
|
71
77
|
|
72
78
|
# @api private
|
data/lib/dry/effects/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-effects
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikita Shilnikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -211,14 +211,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
211
211
|
requirements:
|
212
212
|
- - ">="
|
213
213
|
- !ruby/object:Gem::Version
|
214
|
-
version:
|
214
|
+
version: 3.0.0
|
215
215
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
216
216
|
requirements:
|
217
217
|
- - ">="
|
218
218
|
- !ruby/object:Gem::Version
|
219
219
|
version: '0'
|
220
220
|
requirements: []
|
221
|
-
rubygems_version: 3.
|
221
|
+
rubygems_version: 3.3.26
|
222
222
|
signing_key:
|
223
223
|
specification_version: 4
|
224
224
|
summary: Algebraic effects
|