servactory 2.6.0 → 2.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0df96b35bd963790408ba89eb4c6d80b7b19c4edc869ceade70f0d9d660f41ce
4
- data.tar.gz: 97c287969f8358a77903d17b79624b59a06abd8aa94aa469e5d458f99ae50342
3
+ metadata.gz: 64f8eb059214e69b961c2e6a5c91565eff6372eaa64677a5d7da42f8f301d38b
4
+ data.tar.gz: c49125a5572e80d044668bcd70b6f45bd9d4c0c0109fe6ce35238fc1b630d405
5
5
  SHA512:
6
- metadata.gz: 57caa41f80f9df2fa40061dad1337839dfba5dcc69b54e44ac8651bb83ec4e4d034870e7cd78f1d23661cd4ab66153904ed9679e78253a91e5532a7c596f4f11
7
- data.tar.gz: 9e85fcb8bd9994756b6d9519d1a2bbbc68a7bd13254505ae4930552d377a011eb233d70e7fe9abdb23cc52d0f8812294bfb70ce15b5f34b6861cbf763c918461
6
+ metadata.gz: 9c17c8c39353bca7c6efc198472c7c8e088a934ea1e9181522d653580ec3dad9f9046169b38396d1b2508860fe21b3fc1fef1eb0d6d84b7e913b50e78664a8ff
7
+ data.tar.gz: a3555354a011e24848d9cbace96d5dad5db690d9a07b8cb41318b7e5820e24f04194f55b7faee4e38c8f7a521e13a2022f756802ce49c4168211135263980ba6
@@ -61,7 +61,7 @@ en:
61
61
  format:
62
62
  default: "[%{service_class_name}] Internal attribute `%{internal_name}` does not match `%{format_name}` format"
63
63
  wrong_pattern: "[%{service_class_name}] Internal attribute `%{internal_name}` does not match `%{format_name}` format"
64
- unknown: "[%{service_class_name}] Unknown `%{format_name}` format specified for output attribute `%{internal_name}`"
64
+ unknown: "[%{service_class_name}] Unknown `%{format_name}` format specified for internal attribute `%{internal_name}`"
65
65
  min:
66
66
  default: "[%{service_class_name}] Internal attribute `%{internal_name}` received value `%{value}`, which is less than `%{option_value}`"
67
67
  max:
@@ -95,6 +95,7 @@ ru:
95
95
  max:
96
96
  default: "[%{service_class_name}] Выходящий атрибут `%{output_name}` получил значение `%{value}`, которое больше `%{option_value}`"
97
97
  type:
98
- default: "[%{service_class_name}] Неправильный тип выходящего атрибута `%{output_name}`, ожидалось `%{expected_type}`, получено `%{given_type}`"
99
- for_hash:
100
- wrong_element_type: "[%{service_class_name}] Неправильный тип в хеше выходящего атрибута `%{output_name}`, для `%{key_name}` ожидалось `%{expected_type}`, получено `%{given_type}`"
98
+ default_error:
99
+ default: "[%{service_class_name}] Неправильный тип выходящего атрибута `%{output_name}`, ожидалось `%{expected_type}`, получено `%{given_type}`"
100
+ for_hash:
101
+ wrong_element_type: "[%{service_class_name}] Неправильный тип в хеше выходящего атрибута `%{output_name}`, для `%{key_name}` ожидалось `%{expected_type}`, получено `%{given_type}`"
@@ -48,6 +48,8 @@ module ApplicationService
48
48
  # ]
49
49
  # )
50
50
 
51
+ # collection_mode_class_names [ActiveRecord::Relation]
52
+
51
53
  # hash_mode_class_names [CustomHash]
52
54
 
53
55
  # action_shortcuts %i[assign build create save]
@@ -11,14 +11,14 @@ module Servactory
11
11
  def info # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
12
12
  Servactory::Info::Result.new(
13
13
  inputs: collection_of_inputs.to_h do |input|
14
- work = input.class::Actor.new(input)
14
+ actor = input.class::Actor.new(input)
15
15
  inclusion = input.collection_of_options.find_by(name: :inclusion)
16
16
  must = input.collection_of_options.find_by(name: :must)
17
17
 
18
18
  [
19
19
  input.name,
20
20
  {
21
- work: work,
21
+ actor: actor,
22
22
  types: input.types,
23
23
  required: input.required,
24
24
  default: input.default,
@@ -29,14 +29,14 @@ module Servactory
29
29
  end,
30
30
 
31
31
  internals: collection_of_internals.to_h do |internal|
32
- work = internal.class::Actor.new(internal)
32
+ actor = internal.class::Actor.new(internal)
33
33
  inclusion = internal.collection_of_options.find_by(name: :inclusion)
34
34
  must = internal.collection_of_options.find_by(name: :must)
35
35
 
36
36
  [
37
37
  internal.name,
38
38
  {
39
- work: work,
39
+ actor: actor,
40
40
  types: internal.types,
41
41
  inclusion: inclusion.body,
42
42
  must: must.body
@@ -45,14 +45,14 @@ module Servactory
45
45
  end,
46
46
 
47
47
  outputs: collection_of_outputs.to_h do |output|
48
- work = output.class::Actor.new(output)
48
+ actor = output.class::Actor.new(output)
49
49
  inclusion = output.collection_of_options.find_by(name: :inclusion)
50
50
  must = output.collection_of_options.find_by(name: :must)
51
51
 
52
52
  [
53
53
  output.name,
54
54
  {
55
- work: work,
55
+ actor: actor,
56
56
  types: output.types,
57
57
  inclusion: inclusion.body,
58
58
  must: must.body
@@ -145,11 +145,11 @@ module Servactory
145
145
  service_class = Struct.new(:class_name, keyword_init: true)
146
146
  service = service_class.new(class_name: described_class.name)
147
147
 
148
- input_work = attribute_data.fetch(:work)
148
+ input_actor = attribute_data.fetch(:actor)
149
149
 
150
150
  input_required_message = input_required_message.call(
151
151
  service: service,
152
- input: input_work,
152
+ input: input_actor,
153
153
  value: wrong_value
154
154
  )
155
155
  end
@@ -4,7 +4,7 @@ module Servactory
4
4
  module VERSION
5
5
  MAJOR = 2
6
6
  MINOR = 6
7
- PATCH = 0
7
+ PATCH = 1
8
8
  PRE = nil
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join(".")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: servactory
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Sokolov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-13 00:00:00.000000000 Z
11
+ date: 2024-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport