use_cases 2.0.0 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -6
- data/lib/use_case.rb +0 -1
- data/lib/use_cases/dsl.rb +4 -0
- data/lib/use_cases/step_adapters/abstract.rb +5 -6
- data/lib/use_cases/version.rb +1 -1
- data/use_cases.gemspec +5 -6
- metadata +11 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e64ac5284a76952a2d0da6e2d48ea40b93af03926b5f4d0a23a38698836dfe0
|
4
|
+
data.tar.gz: b9c894909398b9cc287da875175f125319243b0dd077158d27b59e498e184cbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a34740d4caa9274eeed8e76ebc20293c3dc1e962551b35b3c14b885e018135d51a7f27f832b9ca02b0639a6bf4e4e4febcf4567bd7ed6531077940e709f9e84f
|
7
|
+
data.tar.gz: 728d1da8f92f9d375b11172fc68f4b8aab7e4b9efa048a88959bd9996d327a27bda9432948fdd82d8dcae0fab05a64e4127efb343441b7d4f0e8e5b66d1ed31b
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
use_cases (2.0.
|
5
|
-
activesupport
|
6
|
-
dry-
|
7
|
-
dry-
|
8
|
-
dry-
|
9
|
-
dry-validation
|
4
|
+
use_cases (2.0.3)
|
5
|
+
activesupport (>= 5.1)
|
6
|
+
dry-matcher (>= 0.8.1)
|
7
|
+
dry-monads (>= 1.0.0)
|
8
|
+
dry-validation (>= 0.11.0)
|
10
9
|
|
11
10
|
GEM
|
12
11
|
remote: https://rubygems.org/
|
data/lib/use_case.rb
CHANGED
data/lib/use_cases/dsl.rb
CHANGED
@@ -38,18 +38,17 @@ module UseCases
|
|
38
38
|
raise StepArgumentError,
|
39
39
|
"##{step.name} expects #{expected_args_count} arguments it only received #{step_args.count}, make sure your previous step Success() statement has a payload."
|
40
40
|
end
|
41
|
-
|
42
41
|
return args.first(callable_args_count) unless external? && selects_external_args?
|
43
42
|
|
44
43
|
hashed_args(args).values
|
45
44
|
end
|
46
45
|
|
47
|
-
def hashed_args(
|
46
|
+
def hashed_args((prev_result, params, current_user))
|
48
47
|
{
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
}.slice(pass_option)
|
48
|
+
previous_step_result: prev_result,
|
49
|
+
params: params,
|
50
|
+
current_user: current_user,
|
51
|
+
}.slice(*pass_option)
|
53
52
|
end
|
54
53
|
|
55
54
|
def callable_proc
|
data/lib/use_cases/version.rb
CHANGED
data/use_cases.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = "A DSL to encapsulate your domain logic."
|
13
13
|
spec.homepage = "https://github.com/listminut/use_cases"
|
14
14
|
spec.license = "MIT"
|
15
|
-
spec.required_ruby_version = ">= 2.6.
|
15
|
+
spec.required_ruby_version = ">= 2.6.0"
|
16
16
|
|
17
17
|
spec.metadata["homepage_uri"] = spec.homepage
|
18
18
|
spec.metadata["source_code_uri"] = "https://github.com/listminut/use_cases"
|
@@ -30,11 +30,10 @@ Gem::Specification.new do |spec|
|
|
30
30
|
# For more information and examples about making a new gem, checkout our
|
31
31
|
# guide at: https://bundler.io/guides/creating_gem.html
|
32
32
|
|
33
|
-
spec.add_dependency "activesupport"
|
34
|
-
spec.add_dependency "dry-
|
35
|
-
spec.add_dependency "dry-
|
36
|
-
spec.add_dependency "dry-
|
37
|
-
spec.add_dependency "dry-validation"
|
33
|
+
spec.add_dependency "activesupport", ">= 5.1"
|
34
|
+
spec.add_dependency "dry-matcher", ">= 0.8.1"
|
35
|
+
spec.add_dependency "dry-monads", ">= 1.0.0"
|
36
|
+
spec.add_dependency "dry-validation", ">= 0.11.0"
|
38
37
|
|
39
38
|
spec.add_development_dependency "byebug"
|
40
39
|
spec.add_development_dependency "rake"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: use_cases
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ring Twice
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,70 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '5.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: dry-events
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
26
|
+
version: '5.1'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: dry-matcher
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
44
30
|
requirements:
|
45
31
|
- - ">="
|
46
32
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
33
|
+
version: 0.8.1
|
48
34
|
type: :runtime
|
49
35
|
prerelease: false
|
50
36
|
version_requirements: !ruby/object:Gem::Requirement
|
51
37
|
requirements:
|
52
38
|
- - ">="
|
53
39
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
40
|
+
version: 0.8.1
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: dry-monads
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
58
44
|
requirements:
|
59
45
|
- - ">="
|
60
46
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
47
|
+
version: 1.0.0
|
62
48
|
type: :runtime
|
63
49
|
prerelease: false
|
64
50
|
version_requirements: !ruby/object:Gem::Requirement
|
65
51
|
requirements:
|
66
52
|
- - ">="
|
67
53
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
54
|
+
version: 1.0.0
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: dry-validation
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
72
58
|
requirements:
|
73
59
|
- - ">="
|
74
60
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
61
|
+
version: 0.11.0
|
76
62
|
type: :runtime
|
77
63
|
prerelease: false
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
79
65
|
requirements:
|
80
66
|
- - ">="
|
81
67
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
68
|
+
version: 0.11.0
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: byebug
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -197,7 +183,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
197
183
|
requirements:
|
198
184
|
- - ">="
|
199
185
|
- !ruby/object:Gem::Version
|
200
|
-
version: 2.6.
|
186
|
+
version: 2.6.0
|
201
187
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
202
188
|
requirements:
|
203
189
|
- - ">="
|