clean-architecture 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -2
- data/Gemfile.lock +1 -1
- data/lib/clean_architecture/all.rb +0 -2
- data/lib/clean_architecture/entities/all.rb +0 -1
- data/lib/clean_architecture/interfaces/all.rb +0 -2
- data/lib/clean_architecture/version.rb +1 -1
- metadata +1 -8
- data/clean-architecture-1.0.0.gem +0 -0
- data/lib/clean_architecture/commands/all.rb +0 -5
- data/lib/clean_architecture/commands/create_use_case_history_entry.rb +0 -23
- data/lib/clean_architecture/entities/use_case_history_entry.rb +0 -55
- data/lib/clean_architecture/interfaces/persistence.rb +0 -15
- data/lib/clean_architecture/interfaces/use_case_history_entry.rb +0 -39
- data/lib/clean_architecture/strategies/all.rb +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8061fbaf73654a01ae69f7bca713de9ed1f798bd
|
4
|
+
data.tar.gz: b2736c5d0be342ed173d3a983803b791442fabf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc36ab7879a3eb64c81260d5068555fec7c17dd9b0e050749515d0d707a52cc3a2306821cceeb42bf69ede3963c722b0b2370db0c1cd8237f5cbdc4f69ecaed1
|
7
|
+
data.tar.gz: 2a607dab83ad8ab5b60edeaf776f45e6df4e3d648be27c1df27c08988072c6d6d014c15a2c5c9127a4e8cddfe9507c1976328bd284e6726e9ecd00b570e91fed
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -4,13 +4,11 @@
|
|
4
4
|
|
5
5
|
require 'clean_architecture/adapters/all'
|
6
6
|
require 'clean_architecture/checks/all'
|
7
|
-
require 'clean_architecture/commands/all'
|
8
7
|
require 'clean_architecture/entities/all'
|
9
8
|
require 'clean_architecture/interfaces/all'
|
10
9
|
require 'clean_architecture/matchers/all'
|
11
10
|
require 'clean_architecture/queries/all'
|
12
11
|
require 'clean_architecture/serializers/all'
|
13
|
-
require 'clean_architecture/strategies/all'
|
14
12
|
|
15
13
|
require 'clean_architecture/types'
|
16
14
|
require 'clean_architecture/version'
|
@@ -5,10 +5,8 @@
|
|
5
5
|
require 'clean_architecture/interfaces/authorization_parameters'
|
6
6
|
require 'clean_architecture/interfaces/base_parameters'
|
7
7
|
require 'clean_architecture/interfaces/jsonable'
|
8
|
-
require 'clean_architecture/interfaces/persistence'
|
9
8
|
require 'clean_architecture/interfaces/success_payload'
|
10
9
|
require 'clean_architecture/interfaces/targeted_parameters'
|
11
10
|
require 'clean_architecture/interfaces/use_case'
|
12
11
|
require 'clean_architecture/interfaces/use_case_actor'
|
13
|
-
require 'clean_architecture/interfaces/use_case_history_entry'
|
14
12
|
require 'clean_architecture/interfaces/use_case_target'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clean-architecture
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bellroy Tech Team
|
@@ -142,7 +142,6 @@ files:
|
|
142
142
|
- Guardfile
|
143
143
|
- README.md
|
144
144
|
- Rakefile
|
145
|
-
- clean-architecture-1.0.0.gem
|
146
145
|
- clean-architecture.gemspec
|
147
146
|
- generate_require_files.rb
|
148
147
|
- lib/clean-architecture.rb
|
@@ -151,23 +150,18 @@ files:
|
|
151
150
|
- lib/clean_architecture/all.rb
|
152
151
|
- lib/clean_architecture/checks/all.rb
|
153
152
|
- lib/clean_architecture/checks/authorization.rb
|
154
|
-
- lib/clean_architecture/commands/all.rb
|
155
|
-
- lib/clean_architecture/commands/create_use_case_history_entry.rb
|
156
153
|
- lib/clean_architecture/entities/all.rb
|
157
154
|
- lib/clean_architecture/entities/failure_details.rb
|
158
155
|
- lib/clean_architecture/entities/targeted_parameters.rb
|
159
156
|
- lib/clean_architecture/entities/untargeted_parameters.rb
|
160
|
-
- lib/clean_architecture/entities/use_case_history_entry.rb
|
161
157
|
- lib/clean_architecture/interfaces/all.rb
|
162
158
|
- lib/clean_architecture/interfaces/authorization_parameters.rb
|
163
159
|
- lib/clean_architecture/interfaces/base_parameters.rb
|
164
160
|
- lib/clean_architecture/interfaces/jsonable.rb
|
165
|
-
- lib/clean_architecture/interfaces/persistence.rb
|
166
161
|
- lib/clean_architecture/interfaces/success_payload.rb
|
167
162
|
- lib/clean_architecture/interfaces/targeted_parameters.rb
|
168
163
|
- lib/clean_architecture/interfaces/use_case.rb
|
169
164
|
- lib/clean_architecture/interfaces/use_case_actor.rb
|
170
|
-
- lib/clean_architecture/interfaces/use_case_history_entry.rb
|
171
165
|
- lib/clean_architecture/interfaces/use_case_target.rb
|
172
166
|
- lib/clean_architecture/matchers/all.rb
|
173
167
|
- lib/clean_architecture/matchers/use_case_result.rb
|
@@ -178,7 +172,6 @@ files:
|
|
178
172
|
- lib/clean_architecture/serializers/html_response_from_result.rb
|
179
173
|
- lib/clean_architecture/serializers/json_response_from_result.rb
|
180
174
|
- lib/clean_architecture/serializers/success_payload.rb
|
181
|
-
- lib/clean_architecture/strategies/all.rb
|
182
175
|
- lib/clean_architecture/types.rb
|
183
176
|
- lib/clean_architecture/version.rb
|
184
177
|
homepage: https://bellroy.com
|
Binary file
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'clean_architecture/entities/use_case_history_entry'
|
4
|
-
require 'duckface'
|
5
|
-
|
6
|
-
module CleanArchitecture
|
7
|
-
module Commands
|
8
|
-
class CreateUseCaseHistoryEntry
|
9
|
-
extend Forwardable
|
10
|
-
|
11
|
-
def initialize(use_case_target)
|
12
|
-
@use_case_target = use_case_target
|
13
|
-
end
|
14
|
-
|
15
|
-
def result
|
16
|
-
@result ||= begin
|
17
|
-
entry = Entities::UseCaseHistoryEntry.new(@use_case_target)
|
18
|
-
parameters.persistence.create_use_case_history_entry(entry)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,55 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'dry-monads'
|
4
|
-
require 'dry/matcher/result_matcher'
|
5
|
-
require 'duckface'
|
6
|
-
require 'clean_architecture/interfaces/use_case_history_entry'
|
7
|
-
require 'clean_architecture/matchers/use_case_result'
|
8
|
-
|
9
|
-
module CleanArchitecture
|
10
|
-
module Entities
|
11
|
-
class UseCaseHistoryEntry
|
12
|
-
implements_interface Interfaces::UseCaseHistoryEntry
|
13
|
-
extend Forwardable
|
14
|
-
|
15
|
-
def initialize(use_case, use_case_target)
|
16
|
-
@use_case = use_case
|
17
|
-
@use_case_target = use_case_target
|
18
|
-
@use_case_class = @use_case.class
|
19
|
-
@use_case_parameters = @use_case.parameters
|
20
|
-
@use_case_result = @use_case.result
|
21
|
-
end
|
22
|
-
|
23
|
-
def extra_parameters_hash
|
24
|
-
@use_case_parameters.extra_parameters_hash
|
25
|
-
end
|
26
|
-
|
27
|
-
def failure_messages
|
28
|
-
Matchers::UseCaseResult.call(@use_case_result) do |matcher|
|
29
|
-
matcher.success { nil }
|
30
|
-
matcher.failure(&:message)
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def prior_target_state
|
35
|
-
@use_case_target.attribute_hash
|
36
|
-
end
|
37
|
-
|
38
|
-
def succeeded?
|
39
|
-
@use_case_result.success?
|
40
|
-
end
|
41
|
-
|
42
|
-
def target_identifier
|
43
|
-
@use_case_target.identifier
|
44
|
-
end
|
45
|
-
|
46
|
-
def use_case_class_name
|
47
|
-
@use_case_class.name
|
48
|
-
end
|
49
|
-
|
50
|
-
def user_identifier
|
51
|
-
@use_case_parameters.actor.user_identifier
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'duckface'
|
4
|
-
|
5
|
-
module CleanArchitecture
|
6
|
-
module Interfaces
|
7
|
-
module Persistence
|
8
|
-
extend Duckface::ActsAsInterface
|
9
|
-
|
10
|
-
def create_use_case_history_entry(_use_case_history_entry)
|
11
|
-
raise NotImplementedError
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'duckface'
|
4
|
-
|
5
|
-
module CleanArchitecture
|
6
|
-
module Interfaces
|
7
|
-
module UseCaseHistoryEntry
|
8
|
-
extend Duckface::ActsAsInterface
|
9
|
-
|
10
|
-
def extra_parameters_hash
|
11
|
-
raise NotImplementedError
|
12
|
-
end
|
13
|
-
|
14
|
-
def failure_messages
|
15
|
-
raise NotImplementedError
|
16
|
-
end
|
17
|
-
|
18
|
-
def prior_target_state
|
19
|
-
raise NotImplementedError
|
20
|
-
end
|
21
|
-
|
22
|
-
def succeeded?
|
23
|
-
raise NotImplementedError
|
24
|
-
end
|
25
|
-
|
26
|
-
def target_identifier
|
27
|
-
raise NotImplementedError
|
28
|
-
end
|
29
|
-
|
30
|
-
def use_case_class_name
|
31
|
-
raise NotImplementedError
|
32
|
-
end
|
33
|
-
|
34
|
-
def user_identifier
|
35
|
-
raise NotImplementedError
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|