foobara 0.0.20 → 0.0.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/projects/command/src/concerns/reflection.rb +1 -1
  4. data/projects/command/src/transformed_command.rb +1 -1
  5. data/projects/command_connectors/src/command_registry/exposed_command.rb +1 -1
  6. data/projects/command_connectors/src/command_registry/exposed_domain.rb +1 -1
  7. data/projects/command_connectors/src/command_registry/exposed_organization.rb +1 -1
  8. data/projects/common/src/error.rb +1 -1
  9. data/projects/common/src/possible_error.rb +1 -1
  10. data/projects/domain/src/domain_module_extension.rb +1 -1
  11. data/projects/domain/src/organization_module_extension.rb +1 -1
  12. data/projects/entity/src/concerns/reflection.rb +1 -1
  13. data/projects/model/src/concerns/reflection.rb +1 -1
  14. data/projects/model/src/extensions/type_declarations/handlers/extend_model_type_declaration/model_class_desugarizer.rb +3 -1
  15. data/projects/type_declarations/src/desugarizer.rb +1 -1
  16. data/projects/type_declarations/src/type_declaration_handler.rb +1 -1
  17. data/projects/type_declarations/src/type_declaration_handler_registry.rb +1 -1
  18. data/projects/type_declarations/src/type_declaration_validator.rb +1 -1
  19. data/projects/types/src/type.rb +1 -1
  20. data/projects/value/src/caster.rb +1 -1
  21. data/projects/value/src/processor/casting.rb +1 -1
  22. data/projects/value/src/processor/pipeline.rb +1 -1
  23. data/projects/value/src/processor/selection.rb +1 -1
  24. data/projects/value/src/processor.rb +2 -2
  25. data/projects/value/src/transformer.rb +1 -1
  26. data/projects/value/src/validator.rb +1 -1
  27. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3687c6cad513f9e95339296d167c404a589a0a6678f5b3d981fd773ee9decce6
4
- data.tar.gz: 03e56b2b52cda67986e229a4de88706f0999d816988d9117fac42157688878c8
3
+ metadata.gz: dc681307752b396bf7baaf20856fbdf5107da406b112b5c15039ca915859a497
4
+ data.tar.gz: d779a8020d0e65156965a9a32c7f8b9f1c0daebbcedb3795917701feb3b7c845
5
5
  SHA512:
6
- metadata.gz: 2b1db3dd06cd337aaa8e6c46fd919717340ee961917c7eb485afdb1b9405408878348c4c9cad668f2de68fa7b5e12643dea554e7d7dad0b9dd79956d307dac63
7
- data.tar.gz: 637e39bb8f1d010c154ea17d330600d938de9448a87694338cd0c01bd56222d9f0b519932db10f6701136677b096eb17d6754bc5dac121f3daf397df28c42437
6
+ metadata.gz: fafb15435c334846fdd3f1d233abfbe8a93b02bba7374f91026555fcd7a3fd97b47fa24825a0e72dcafa0ac64688c9accead19c9c44d427ec62c707e70986016
7
+ data.tar.gz: 9ff12cb0f19aaf131808200a6196681c9c9ddec9febbf0fae0c7ff008439895243da0cf4cb068cb10bb2a162f58049eb35437aaa777a1724d5a3adf1df6d5f4f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [0.0.22] - 2024-12-03
2
+
3
+ - Allow creating entity types from declaration without model_module
4
+
5
+ ## [0.0.21] - 2024-12-02
6
+
7
+ - Allow #foobara_manifest to be called without a to_include Set
8
+
1
9
  ## [0.0.20] - 2024-12-01
2
10
 
3
11
  - Fix delayed_connections bug in command connector
@@ -19,7 +19,7 @@ module Foobara
19
19
  remove_instance_variable("@all") if instance_variable_defined?("@all")
20
20
  end
21
21
 
22
- def foobara_manifest(to_include:)
22
+ def foobara_manifest(to_include: Set.new)
23
23
  depends_on = self.depends_on.map do |command_name|
24
24
  other_command = Foobara::Namespace.global.foobara_lookup!(command_name,
25
25
  mode: Foobara::Namespace::LookupMode::ABSOLUTE)
@@ -156,7 +156,7 @@ module Foobara
156
156
  types
157
157
  end
158
158
 
159
- def foobara_manifest(to_include:)
159
+ def foobara_manifest(to_include: Set.new)
160
160
  types = types_depended_on.select(&:registered?).map do |t|
161
161
  to_include << t
162
162
  t.foobara_manifest_reference
@@ -94,7 +94,7 @@ module Foobara
94
94
  @full_command_symbol ||= Util.underscore_sym(full_command_name)
95
95
  end
96
96
 
97
- def foobara_manifest(to_include:)
97
+ def foobara_manifest(to_include: Set.new)
98
98
  transformed_command_class.foobara_manifest(to_include:).merge(super).merge(
99
99
  Util.remove_blank(
100
100
  scoped_category: :command,
@@ -14,7 +14,7 @@ module Foobara
14
14
  end
15
15
 
16
16
  # TODO: unable to address types here so it is handled as a hack higher up...
17
- def foobara_manifest(to_include:)
17
+ def foobara_manifest(to_include: Set.new)
18
18
  domain_manifest = domain_module.foobara_manifest(to_include: Set.new)
19
19
  mode = Foobara::Namespace::LookupMode::DIRECT
20
20
  commands = foobara_all_command(mode:).map(&:foobara_manifest_reference).sort
@@ -14,7 +14,7 @@ module Foobara
14
14
  end
15
15
 
16
16
  # TODO: unable to address types here so it is handled as a hack higher up...
17
- def foobara_manifest(to_include:)
17
+ def foobara_manifest(to_include: Set.new)
18
18
  organization_manifest = organization_module.foobara_manifest(to_include: Set.new)
19
19
  mode = Foobara::Namespace::LookupMode::DIRECT
20
20
  domains = foobara_all_domain(mode:).map(&:foobara_manifest_reference).sort
@@ -57,7 +57,7 @@ module Foobara
57
57
  }
58
58
  end
59
59
 
60
- def foobara_manifest(to_include:)
60
+ def foobara_manifest(to_include: Set.new)
61
61
  types = types_depended_on.map do |t|
62
62
  to_include << t
63
63
  t.foobara_manifest_reference
@@ -46,7 +46,7 @@ module Foobara
46
46
  end
47
47
 
48
48
  # TODO: technically does not belong in this project but maybe it should
49
- def foobara_manifest(to_include:)
49
+ def foobara_manifest(to_include: Set.new)
50
50
  to_include << error_class
51
51
 
52
52
  if processor
@@ -393,7 +393,7 @@ module Foobara
393
393
  end
394
394
 
395
395
  # TODO: can we kill this skip concept?
396
- def foobara_manifest(to_include:)
396
+ def foobara_manifest(to_include: Set.new)
397
397
  depends_on = foobara_depends_on.map do |name|
398
398
  domain = Domain.to_domain(name)
399
399
  to_include << domain
@@ -36,7 +36,7 @@ module Foobara
36
36
  foobara_all_domain(mode: Namespace::LookupMode::DIRECT)
37
37
  end
38
38
 
39
- def foobara_manifest(to_include:)
39
+ def foobara_manifest(to_include: Set.new)
40
40
  domains = foobara_domains.map do |domain|
41
41
  to_include << domain
42
42
  domain.foobara_manifest_reference
@@ -17,7 +17,7 @@ module Foobara
17
17
  types.map(&:target_class).uniq
18
18
  end
19
19
 
20
- def foobara_manifest(to_include:)
20
+ def foobara_manifest(to_include: Set.new)
21
21
  associations = self.associations.map do |(path, type)|
22
22
  entity_class = type.target_class
23
23
  entity_name = entity_class.full_entity_name
@@ -5,7 +5,7 @@ module Foobara
5
5
  include Concern
6
6
 
7
7
  module ClassMethods
8
- def foobara_manifest(to_include:)
8
+ def foobara_manifest(to_include: Set.new)
9
9
  Util.remove_blank(
10
10
  attributes_type: attributes_type.declaration_data,
11
11
  organization_name:,
@@ -26,10 +26,12 @@ module Foobara
26
26
  mod
27
27
  when ::String, ::Symbol
28
28
  Object.const_get(mod)
29
+ when nil
30
+ Object
29
31
  else
30
32
  # :nocov:
31
33
  raise ArgumentError,
32
- "expected module_module to be a module or module name"
34
+ "expected #{mod} to be a module or module name"
33
35
  # :nocov:
34
36
  end
35
37
 
@@ -10,7 +10,7 @@ module Foobara
10
10
  false
11
11
  end
12
12
 
13
- def foobara_manifest(to_include:)
13
+ def foobara_manifest(to_include: Set.new)
14
14
  # :nocov:
15
15
  super.merge(processor_type: :desugarizer)
16
16
  # :nocov:
@@ -4,7 +4,7 @@ module Foobara
4
4
  module TypeDeclarations
5
5
  class TypeDeclarationHandler < Value::Processor::Pipeline
6
6
  class << self
7
- def foobara_manifest(to_include:)
7
+ def foobara_manifest(to_include: Set.new)
8
8
  # :nocov:
9
9
  super.merge(processor_type: :type_declaration_handler)
10
10
  # :nocov:
@@ -2,7 +2,7 @@ module Foobara
2
2
  module TypeDeclarations
3
3
  class TypeDeclarationHandlerRegistry < Value::Processor::Selection
4
4
  class << self
5
- def foobara_manifest(to_include:)
5
+ def foobara_manifest(to_include: Set.new)
6
6
  # :nocov:
7
7
  super.merge(processor_type: :type_declaration_handler_registry)
8
8
  # :nocov:
@@ -4,7 +4,7 @@ module Foobara
4
4
  include WithRegistries
5
5
 
6
6
  class << self
7
- def foobara_manifest(to_include:)
7
+ def foobara_manifest(to_include: Set.new)
8
8
  # :nocov:
9
9
  super.merge(processor_type: :type_declaration_validator)
10
10
  # :nocov:
@@ -247,7 +247,7 @@ module Foobara
247
247
  scoped_full_name
248
248
  end
249
249
 
250
- def foobara_manifest(to_include:)
250
+ def foobara_manifest(to_include: Set.new)
251
251
  types = []
252
252
 
253
253
  types_depended_on.each do |dependent_type|
@@ -3,7 +3,7 @@ module Foobara
3
3
  # TODO: do we really need these?? Can't just use a transformer?
4
4
  class Caster < Transformer
5
5
  class << self
6
- def foobara_manifest(to_include:)
6
+ def foobara_manifest(to_include: Set.new)
7
7
  super.merge(processor_type: :caster)
8
8
  end
9
9
 
@@ -22,7 +22,7 @@ module Foobara
22
22
  end
23
23
 
24
24
  class << self
25
- def foobara_manifest(to_include:)
25
+ def foobara_manifest(to_include: Set.new)
26
26
  # :nocov:
27
27
  super.merge(processor_type: :casting)
28
28
  # :nocov:
@@ -5,7 +5,7 @@ module Foobara
5
5
  class Processor
6
6
  class Pipeline < Multi
7
7
  class << self
8
- def foobara_manifest(to_include:)
8
+ def foobara_manifest(to_include: Set.new)
9
9
  # :nocov:
10
10
  super.merge(processor_type: :pipeline)
11
11
  # :nocov:
@@ -9,7 +9,7 @@ module Foobara
9
9
  class MoreThanOneApplicableProcessorError < DataError; end
10
10
 
11
11
  class << self
12
- def foobara_manifest(to_include:)
12
+ def foobara_manifest(to_include: Set.new)
13
13
  # :nocov:
14
14
  super.merge(processor_type: :selection)
15
15
  # :nocov:
@@ -25,7 +25,7 @@ module Foobara
25
25
  true
26
26
  end
27
27
 
28
- def foobara_manifest(to_include:)
28
+ def foobara_manifest(to_include: Set.new)
29
29
  errors = error_classes.map do |error_class|
30
30
  to_include << error_class
31
31
  error_class.foobara_manifest_reference
@@ -317,7 +317,7 @@ module Foobara
317
317
 
318
318
  # TODO: is this in the wrong place? Should this be an extension?
319
319
 
320
- def foobara_manifest(to_include:)
320
+ def foobara_manifest(to_include: Set.new)
321
321
  possible_errors = self.possible_errors.map do |possible_error|
322
322
  [possible_error.key.to_s, possible_error.foobara_manifest(to_include:)]
323
323
  end
@@ -10,7 +10,7 @@ module Foobara
10
10
  end
11
11
 
12
12
  class << self
13
- def foobara_manifest(to_include:)
13
+ def foobara_manifest(to_include: Set.new)
14
14
  super.merge(processor_type: :transformer)
15
15
  end
16
16
 
@@ -6,7 +6,7 @@ module Foobara
6
6
  end
7
7
 
8
8
  class << self
9
- def foobara_manifest(to_include:)
9
+ def foobara_manifest(to_include: Set.new)
10
10
  super.merge(processor_type: :transformer)
11
11
  end
12
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-02 00:00:00.000000000 Z
11
+ date: 2024-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: foobara-util