dry-effects 0.1.4 → 0.1.5

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: 8b0de29697072219c4159b2d7eb371b04ee20ae17895cd06158ea4d7bc29bf1e
4
- data.tar.gz: 0021bd3593b13b70da9780acc2b66f11f32b2bf61a7878f5b88ca7e168590b08
3
+ metadata.gz: 54136f3755a4e11e553c0afaabce55a5566994988eae215c553bed29868b33ec
4
+ data.tar.gz: 1d01bd43fc5e9be72beec2b8754caf75313ba5c9b765c8740de21e3d01c00b21
5
5
  SHA512:
6
- metadata.gz: 9900386d6f4ca0d157d4514f15c4229ed611540186be2f821b0cc80c909fcc838c9a91806c369b4d21d300a6b9ecaccc62adfa0b16458a5732a7d477fa59efca
7
- data.tar.gz: 9c4ebd87d7b929941b43699dbd466e282e7636b7c06c064088a2203461febd81396bf749863eda6829034c1b579702a59637bee4a750464f28cb8efd3cf3cbd1
6
+ metadata.gz: 3f73d5618defff4f54656fa968c93cca50d9f9a47105500e3063bae2a8a9a78a64ec2b29638eaa3bfbeb1f98fc5ccf35862ab50f8dd8a24c75045f88daf59f68
7
+ data.tar.gz: 193b6ecc66f060765df8bb3e982bac4b5867e85114f840611a06f31451dcdb7a3d6f8d09137cf33ac36473530aa88848fad13e0f29c9df4fe96c1168d402c33d
@@ -1,14 +1,17 @@
1
- # v0.1.4 - 2020-01-07
1
+ ## 0.1.4 2020-01-07
2
2
 
3
- ## Fixed
3
+
4
+ ### Fixed
4
5
 
5
6
  - Some calls of effect builders were updated to prevent keyword warnings on 2.7 (flash-gordon)
6
7
 
8
+
7
9
  [Compare v0.1.3...v0.1.4](https://github.com/dry-rb/dry-effects/compare/v0.1.3...v0.1.4)
8
10
 
9
- # v0.1.3 - 2019-12-20
11
+ ## 0.1.3 2019-12-20
10
12
 
11
- ## Added
13
+
14
+ ### Added
12
15
 
13
16
  - Options for the random provider. You can pass a `seed` or a proc that will be used to generate random values. It is expected the value returned from the proc is within the `0.0...1.0` range (flash-gordon)
14
17
  ```ruby
@@ -16,19 +19,23 @@
16
19
  with_random(proc {|prev = 0.0| (prev + 0.1) % 1 }) { ... }
17
20
  ```
18
21
 
22
+
19
23
  [Compare v0.1.2...v0.1.3](https://github.com/dry-rb/dry-effects/compare/v0.1.2...v0.1.3)
20
24
 
21
- # v0.1.2 - 2019-12-15
25
+ ## 0.1.2 2019-12-15
22
26
 
23
- ## Fixed
27
+
28
+ ### Fixed
24
29
 
25
30
  - Keyword warnings issued by Ruby 2.7 (flash-gordon)
26
31
 
32
+
27
33
  [Compare v0.1.1...v0.1.2](https://github.com/dry-rb/dry-effects/compare/v0.1.1...v0.1.2)
28
34
 
29
- # v0.1.1 - 2019-11-30
35
+ ## 0.1.1 2019-11-30
30
36
 
31
- ## Added
37
+
38
+ ### Added
32
39
 
33
40
  - Extension for RSpec. Some features of RSpec require access to thread-local storage. This extension patches RSpec so that storage is shared between the root fiber and dry-effects context (flash-gordon)
34
41
 
@@ -39,8 +46,9 @@
39
46
  Dry::Effects.load_extensions(:rspec)
40
47
  ```
41
48
 
49
+
42
50
  [Compare v0.1.0...v0.1.1](https://github.com/dry-rb/dry-effects/compare/v0.1.0...v0.1.1)
43
51
 
44
- # v0.1.0 - 2019-09-28
52
+ ## 0.1.0 2019-09-28
45
53
 
46
54
  Initial release.
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ # this file is managed by dry-rb/devtools project
2
3
 
3
4
  lib = File.expand_path('lib', __dir__)
4
5
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
@@ -6,44 +7,35 @@ require 'dry/effects/version'
6
7
 
7
8
  Gem::Specification.new do |spec|
8
9
  spec.name = 'dry-effects'
9
- spec.version = Dry::Effects::VERSION
10
- spec.authors = ['Nikita Shilnikov']
11
- spec.email = ['fg@flashgordon.ru']
10
+ spec.authors = ["Nikita Shilnikov"]
11
+ spec.email = ["fg@flashgordon.ru"]
12
+ spec.license = 'MIT'
13
+ spec.version = Dry::Effects::VERSION.dup
12
14
 
13
- spec.summary = 'Algebraic effects.'
15
+ spec.summary = "Algebraic effects"
14
16
  spec.description = spec.summary
15
- spec.homepage = 'https://github.com/dry-rb/dry-effects'
16
- spec.license = 'MIT'
17
+ spec.homepage = 'https://dry-rb.org/gems/dry-effects'
18
+ spec.files = Dir["CHANGELOG.md", "LICENSE", "README.md", "dry-effects.gemspec", "lib/**/*"]
19
+ spec.bindir = 'bin'
20
+ spec.executables = []
21
+ spec.require_paths = ['lib']
17
22
 
18
- # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
19
- # to allow pushing to a single host or delete this section to allow pushing to any host.
20
- if spec.respond_to?(:metadata)
21
- spec.metadata['allowed_push_host'] = 'https://rubygems.org'
22
- spec.metadata['homepage_uri'] = spec.homepage
23
- spec.metadata['source_code_uri'] = 'https://github.com/dry-rb/dry-effects'
24
- spec.metadata['bug_tracker_uri'] = 'https://github.com/dry-rb/dry-effects/issues'
25
- else
26
- raise 'RubyGems 2.0 or newer is required to protect against ' \
27
- 'public gem pushes.'
28
- end
23
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
24
+ spec.metadata['changelog_uri'] = 'https://github.com/dry-rb/dry-effects/blob/master/CHANGELOG.md'
25
+ spec.metadata['source_code_uri'] = 'https://github.com/dry-rb/dry-effects'
26
+ spec.metadata['bug_tracker_uri'] = 'https://github.com/dry-rb/dry-effects/issues'
29
27
 
30
- # Specify which files should be added to the gem when it is released.
31
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
32
- spec.files = Dir.chdir(File.expand_path(__dir__)) do
33
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|bin)/}) }
34
- end
35
- spec.bindir = 'exe'
36
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
37
- spec.require_paths = ['lib']
38
- spec.required_ruby_version = '>= 2.4'
28
+ spec.required_ruby_version = ">= 2.4.0"
29
+
30
+ # to update dependencies edit project.yml
31
+ spec.add_runtime_dependency "concurrent-ruby", "~> 1.0"
32
+ spec.add_runtime_dependency "dry-container", "~> 0.7", ">= 0.7.2"
33
+ spec.add_runtime_dependency "dry-core", "~> 0.4", ">= 0.4.7"
34
+ spec.add_runtime_dependency "dry-equalizer", "~> 0.2", ">= 0.2.2"
35
+ spec.add_runtime_dependency "dry-inflector", "~> 0.1", ">= 0.1.2"
36
+ spec.add_runtime_dependency "dry-initializer", "~> 3.0"
39
37
 
40
- spec.add_runtime_dependency 'concurrent-ruby', '~> 1.0'
41
- spec.add_runtime_dependency 'dry-container', '~> 0.7', '>= 0.7.2'
42
- spec.add_runtime_dependency 'dry-core', '~> 0.4', '>= 0.4.7'
43
- spec.add_runtime_dependency 'dry-equalizer', '~> 0.2', '>= 0.2.2'
44
- spec.add_runtime_dependency 'dry-inflector', '~> 0.1', '>= 0.1.2'
45
- spec.add_runtime_dependency 'dry-initializer', '~> 3.0'
46
- spec.add_development_dependency 'bundler'
47
- spec.add_development_dependency 'rake', '~> 10.0'
48
- spec.add_development_dependency 'rspec', '~> 3.0'
38
+ spec.add_development_dependency "bundler"
39
+ spec.add_development_dependency "rake"
40
+ spec.add_development_dependency "rspec"
49
41
  end
@@ -15,3 +15,11 @@ end
15
15
  Dry::Effects.register_extension(:rspec) do
16
16
  require 'dry/effects/extensions/rspec'
17
17
  end
18
+
19
+ Dry::Effects.register_extension(:active_support_tagged_logging) do
20
+ require 'dry/effects/extensions/active_support/tagged_logging'
21
+ end
22
+
23
+ Dry::Effects.register_extension(:active_support) do
24
+ Dry::Effects.load_extensions(:active_support_tagged_logging)
25
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/tagged_logging'
4
+
5
+ ActiveSupport::TaggedLogging::Formatter.prepend(Module.new {
6
+ def current_tags
7
+ thread_key = @thread_key ||= "activesupport_tagged_logging_tags:#{object_id}"
8
+ unless Thread.current.thread_variable_get(thread_key)
9
+ Thread.current.thread_variable_set(thread_key, [])
10
+ end
11
+ Thread.current.thread_variable_get(thread_key)
12
+ end
13
+ })
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Dry
4
4
  module Effects
5
- VERSION = '0.1.4'
5
+ VERSION = '0.1.5'
6
6
  end
7
7
  end
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.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikita Shilnikov
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-07 00:00:00.000000000 Z
11
+ date: 2020-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -136,70 +136,41 @@ dependencies:
136
136
  name: rake
137
137
  requirement: !ruby/object:Gem::Requirement
138
138
  requirements:
139
- - - "~>"
139
+ - - ">="
140
140
  - !ruby/object:Gem::Version
141
- version: '10.0'
141
+ version: '0'
142
142
  type: :development
143
143
  prerelease: false
144
144
  version_requirements: !ruby/object:Gem::Requirement
145
145
  requirements:
146
- - - "~>"
146
+ - - ">="
147
147
  - !ruby/object:Gem::Version
148
- version: '10.0'
148
+ version: '0'
149
149
  - !ruby/object:Gem::Dependency
150
150
  name: rspec
151
151
  requirement: !ruby/object:Gem::Requirement
152
152
  requirements:
153
- - - "~>"
153
+ - - ">="
154
154
  - !ruby/object:Gem::Version
155
- version: '3.0'
155
+ version: '0'
156
156
  type: :development
157
157
  prerelease: false
158
158
  version_requirements: !ruby/object:Gem::Requirement
159
159
  requirements:
160
- - - "~>"
160
+ - - ">="
161
161
  - !ruby/object:Gem::Version
162
- version: '3.0'
163
- description: Algebraic effects.
162
+ version: '0'
163
+ description: Algebraic effects
164
164
  email:
165
165
  - fg@flashgordon.ru
166
166
  executables: []
167
167
  extensions: []
168
168
  extra_rdoc_files: []
169
169
  files:
170
- - ".codeclimate.yml"
171
- - ".github/ISSUE_TEMPLATE/----please-don-t-ask-for-support-via-issues.md"
172
- - ".github/ISSUE_TEMPLATE/---bug-report.md"
173
- - ".github/ISSUE_TEMPLATE/---feature-request.md"
174
- - ".github/workflows/ci.yml"
175
- - ".github/workflows/docsite.yml"
176
- - ".github/workflows/sync_configs.yml"
177
- - ".gitignore"
178
- - ".rspec"
179
- - ".rubocop.yml"
180
170
  - CHANGELOG.md
181
- - CODE_OF_CONDUCT.md
182
- - CONTRIBUTING.md
183
- - Gemfile
184
- - Gemfile.devtools
185
171
  - LICENSE
186
172
  - README.md
187
- - Rakefile
188
- - docsite/source/effects.html.md
189
- - docsite/source/effects/cache.html.md
190
- - docsite/source/effects/current_time.html.md
191
- - docsite/source/effects/defer.html.md
192
- - docsite/source/effects/env.html.md
193
- - docsite/source/effects/interrupt.html.md
194
- - docsite/source/effects/parallel.html.md
195
- - docsite/source/effects/reader.html.md
196
- - docsite/source/effects/resolve.html.md
197
- - docsite/source/effects/state.html.md
198
- - docsite/source/effects/timeout.html.md
199
- - docsite/source/index.html.md
200
173
  - dry-effects.gemspec
201
- - examples/cmp.rb
202
- - examples/state.rb
203
174
  - lib/dry/effects.rb
204
175
  - lib/dry/effects/all.rb
205
176
  - lib/dry/effects/constructors.rb
@@ -225,6 +196,7 @@ files:
225
196
  - lib/dry/effects/effects/timestamp.rb
226
197
  - lib/dry/effects/errors.rb
227
198
  - lib/dry/effects/extensions.rb
199
+ - lib/dry/effects/extensions/active_support/tagged_logging.rb
228
200
  - lib/dry/effects/extensions/auto_inject.rb
229
201
  - lib/dry/effects/extensions/rspec.rb
230
202
  - lib/dry/effects/extensions/system.rb
@@ -259,13 +231,12 @@ files:
259
231
  - lib/dry/effects/providers/timestamp.rb
260
232
  - lib/dry/effects/stack.rb
261
233
  - lib/dry/effects/version.rb
262
- - project.yml
263
- homepage: https://github.com/dry-rb/dry-effects
234
+ homepage: https://dry-rb.org/gems/dry-effects
264
235
  licenses:
265
236
  - MIT
266
237
  metadata:
267
238
  allowed_push_host: https://rubygems.org
268
- homepage_uri: https://github.com/dry-rb/dry-effects
239
+ changelog_uri: https://github.com/dry-rb/dry-effects/blob/master/CHANGELOG.md
269
240
  source_code_uri: https://github.com/dry-rb/dry-effects
270
241
  bug_tracker_uri: https://github.com/dry-rb/dry-effects/issues
271
242
  post_install_message:
@@ -276,15 +247,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
276
247
  requirements:
277
248
  - - ">="
278
249
  - !ruby/object:Gem::Version
279
- version: '2.4'
250
+ version: 2.4.0
280
251
  required_rubygems_version: !ruby/object:Gem::Requirement
281
252
  requirements:
282
253
  - - ">="
283
254
  - !ruby/object:Gem::Version
284
255
  version: '0'
285
256
  requirements: []
286
- rubygems_version: 3.1.2
257
+ rubygems_version: 3.0.3
287
258
  signing_key:
288
259
  specification_version: 4
289
- summary: Algebraic effects.
260
+ summary: Algebraic effects
290
261
  test_files: []
@@ -1,12 +0,0 @@
1
- # this file is managed by dry-rb/devtools project
2
-
3
- version: "2"
4
-
5
- exclude_patterns:
6
- - "benchmarks/"
7
- - "examples/"
8
- - "spec/"
9
-
10
- plugins:
11
- rubocop:
12
- enabled: true
@@ -1,10 +0,0 @@
1
- ---
2
- name: "⚠️ Please don't ask for support via issues"
3
- about: See CONTRIBUTING.md for more information
4
- title: ''
5
- labels: ''
6
- assignees: ''
7
-
8
- ---
9
-
10
-
@@ -1,30 +0,0 @@
1
- ---
2
- name: "\U0001F41B Bug report"
3
- about: See CONTRIBUTING.md for more information
4
- title: ''
5
- labels: bug
6
- assignees: ''
7
-
8
- ---
9
-
10
- **Before you submit this: WE ONLY ACCEPT BUG REPORTS AND FEATURE REQUESTS**
11
-
12
- For more information see `CONTRIBUTING.md`.
13
-
14
- **Describe the bug**
15
-
16
- A clear and concise description of what the bug is.
17
-
18
- **To Reproduce**
19
-
20
- Provide detailed steps to reproduce, an executable script would be best.
21
-
22
- **Expected behavior**
23
-
24
- A clear and concise description of what you expected to happen.
25
-
26
- **Your environment**
27
-
28
- - Affects my production application: **YES/NO**
29
- - Ruby version: ...
30
- - OS: ...
@@ -1,18 +0,0 @@
1
- ---
2
- name: "\U0001F6E0 Feature request"
3
- about: See CONTRIBUTING.md for more information
4
- title: ''
5
- labels: feature
6
- assignees: ''
7
-
8
- ---
9
-
10
- Summary of what the feature is supposed to do.
11
-
12
- ## Examples
13
-
14
- Code examples showing how the feature could be used.
15
-
16
- ## Resources
17
-
18
- Additional information, like a link to the discussion forum thread where the feature was discussed etc.
@@ -1,52 +0,0 @@
1
- # this file is managed by dry-rb/devtools project
2
-
3
- name: ci
4
-
5
- on:
6
- push:
7
- paths:
8
- - .github/workflows/ci.yml
9
- - lib/**
10
- - spec/**
11
- - Rakefile
12
- - Gemfile
13
- - Gemfile.devtools
14
- - "*.gemspec"
15
- - ".rubocop.yml"
16
- pull_request:
17
- branches:
18
- - master
19
-
20
- jobs:
21
- tests:
22
- runs-on: ubuntu-latest
23
- strategy:
24
- fail-fast: false
25
- matrix:
26
- ruby:
27
- - "2.7"
28
- - "2.6"
29
- - "2.5"
30
- - "2.4"
31
- - "jruby"
32
- include:
33
- - ruby: "2.6"
34
- coverage: "true"
35
- steps:
36
- - uses: actions/checkout@v1
37
- - name: Set up Ruby
38
- uses: eregon/use-ruby-action@master
39
- with:
40
- ruby-version: ${{matrix.ruby}}
41
- - name: Install latest bundler
42
- run: |
43
- gem install bundler
44
- bundle config set without 'tools benchmarks docs'
45
- - name: Bundle install
46
- run: bundle install --jobs 4 --retry 3
47
- - name: Run all tests
48
- env:
49
- COVERAGE: ${{matrix.coverage}}
50
- CODACY_RUN_LOCAL: true
51
- CODACY_PROJECT_TOKEN: ${{secrets.CODACY_PROJECT_TOKEN}}
52
- run: bundle exec rake