convenient_service 0.10.0 → 0.10.1
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bea27107b54aa89400ea5c24d48db2087287b5c4d4aea9bdf3f860dc626bf864
|
|
4
|
+
data.tar.gz: 58a10038fa38887094a47b7dc00745244ac9ce0ef8daa5d1afa1fc8fd6ef893f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: faade4af5c03737c1954bfba9cbd9eaa5e31b13856e527cfcfb6e05db3f645729b81b65be8ed22e5f678845b1c3024224b9fe42eccb0bc3b27ed24ae5d8a2dec
|
|
7
|
+
data.tar.gz: 55fef97517812e04cf89eed571570728fd9a9f1ba2504422e3399600d5d71e27cc2723ced664b1eed147f0289b1cf0d0963805c8ffed45c0dfc173f0b4646505
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.10.1](https://github.com/marian13/convenient_service/compare/v0.10.0...v0.10.1) (2023-03-02)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **can_have_stubbed_result:** add thread-safety ([1962dcc](https://github.com/marian13/convenient_service/commit/1962dccdea29fb36c1b581e312329f41bb23c179))
|
|
9
|
+
|
|
3
10
|
## [0.10.0](https://github.com/marian13/convenient_service/compare/v0.9.0...v0.10.0) (2023-03-01)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -22,7 +22,24 @@ module ConvenientService
|
|
|
22
22
|
def stubbed_results
|
|
23
23
|
return Support::Cache.new unless Support::Gems::RSpec.current_example
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
##
|
|
26
|
+
# IMPORTANT: ivar name with class and current thread enforces thread safety since there is no resource to share.
|
|
27
|
+
#
|
|
28
|
+
# TODO: Thread safety specs.
|
|
29
|
+
#
|
|
30
|
+
# NOTE: `self` is a service class in the current context. For example:
|
|
31
|
+
#
|
|
32
|
+
# before do
|
|
33
|
+
# stub_service(ConvenientService::Examples::Standard::Gemfile::Services::RunShell)
|
|
34
|
+
# .with_arguments(command: node_available_command)
|
|
35
|
+
# .to return_result(node_available_status)
|
|
36
|
+
# end
|
|
37
|
+
#
|
|
38
|
+
# # Then `self` is `ConvenientService::Examples::Standard::Gemfile::Services::RunShell`.
|
|
39
|
+
#
|
|
40
|
+
ivar_name = "@__convenient_service_stubbed_results__#{object_id}__#{Thread.current.object_id}__"
|
|
41
|
+
|
|
42
|
+
cache = Utils::Object.instance_variable_fetch(::RSpec.current_example, ivar_name) { Support::Cache.new }
|
|
26
43
|
|
|
27
44
|
cache.scope(self)
|
|
28
45
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: convenient_service
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.10.
|
|
4
|
+
version: 0.10.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Marian Kostyk
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-03-
|
|
11
|
+
date: 2023-03-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: appraisal
|