foobara 0.0.73 → 0.0.74
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +1 -1
- data/projects/command_connectors/src/command_connector.rb +0 -2
- data/projects/command_connectors/src/command_registry/exposed_command.rb +19 -0
- data/projects/command_connectors/src/command_registry/exposed_domain.rb +13 -0
- data/projects/command_connectors/src/command_registry.rb +0 -10
- data/projects/model/src/model.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 354b23b90ef7ec29ac1126a3ee0ddda231253be5e33731041f80d77414c64e66
|
4
|
+
data.tar.gz: 2270ba278df777156963416623bb69418b596490cdbda7d40a2464322c17afd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bed611a57a66223eeba89f046a2aefdcaaca8ba7afadcd2a77a63817104c7bb39c449148109f6d0d2a3061fa00fb4665c7c0ca06384ecb0cd81ca7738101d268
|
7
|
+
data.tar.gz: 7463d91432204996f68590e23d79ffba7d0b067d946a37462a5da7a50f4e726383075f0d4d15d6a8639ae8387b24d5d867ba7b8cf74e66705c02287978d2ca75
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
# [0.0.74] - 2025-03-15
|
2
|
+
|
3
|
+
- fix bug where a command connector won't expose the non-global domain of a type if the command it depends on
|
4
|
+
is in the global domain
|
5
|
+
|
1
6
|
# [0.0.73] - 2025-03-11
|
2
7
|
|
3
8
|
- Fix bug preventing false from being used as a default in the Attributes::Dsl
|
data/README.md
CHANGED
@@ -1052,7 +1052,7 @@ Let's install foobara-remote-imports:
|
|
1052
1052
|
$ gem install foobara-remote-imports
|
1053
1053
|
```
|
1054
1054
|
|
1055
|
-
And
|
1055
|
+
And let's create a new script and import our various Capybara commands over HTTP:
|
1056
1056
|
|
1057
1057
|
```ruby
|
1058
1058
|
#!/usr/bin/env ruby
|
@@ -354,8 +354,6 @@ module Foobara
|
|
354
354
|
|
355
355
|
# Drive all of this off of the list of exposed commands...
|
356
356
|
to_include = Set.new
|
357
|
-
to_include << command_registry.exposed_global_organization
|
358
|
-
to_include << command_registry.exposed_global_domain
|
359
357
|
|
360
358
|
command_registry.foobara_each do |exposed_whatever|
|
361
359
|
to_include << exposed_whatever
|
@@ -94,7 +94,26 @@ module Foobara
|
|
94
94
|
@full_command_symbol ||= Util.underscore_sym(full_command_name)
|
95
95
|
end
|
96
96
|
|
97
|
+
def root_registry
|
98
|
+
parent = scoped_namespace
|
99
|
+
parent = parent.scoped_namespace while parent.scoped_namespace
|
100
|
+
parent
|
101
|
+
end
|
102
|
+
|
97
103
|
def foobara_manifest(to_include: Set.new)
|
104
|
+
# A bit of a hack here. We don't have an exposed type class to encapsulate including exposed domains/orgs
|
105
|
+
# which leads to a bug when a global command is exposed that depends on a type in a non-global domain
|
106
|
+
# but there being no other reason to include that non-global domain.
|
107
|
+
transformed_command_class.types_depended_on.select(&:registered?).each do |type|
|
108
|
+
full_domain_name = type.foobara_domain.scoped_full_name
|
109
|
+
|
110
|
+
unless root_registry.foobara_lookup_domain(full_domain_name)
|
111
|
+
exposed_domain = root_registry.build_and_register_exposed_domain(full_domain_name)
|
112
|
+
to_include << exposed_domain
|
113
|
+
to_include << exposed_domain.foobara_organization
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
98
117
|
transformed_command_class.foobara_manifest(to_include:).merge(super).merge(
|
99
118
|
Util.remove_blank(
|
100
119
|
scoped_category: :command,
|
@@ -15,6 +15,8 @@ module Foobara
|
|
15
15
|
|
16
16
|
# TODO: unable to address types here so it is handled as a hack higher up...
|
17
17
|
def foobara_manifest(to_include: Set.new)
|
18
|
+
to_include << foobara_organization
|
19
|
+
|
18
20
|
domain_manifest = domain_module.foobara_manifest(to_include: Set.new)
|
19
21
|
mode = Foobara::Namespace::LookupMode::DIRECT
|
20
22
|
commands = foobara_all_command(mode:).map(&:foobara_manifest_reference).sort
|
@@ -22,6 +24,17 @@ module Foobara
|
|
22
24
|
domain_manifest.merge(commands:)
|
23
25
|
end
|
24
26
|
|
27
|
+
def foobara_organization
|
28
|
+
full_org_name = domain_module.foobara_organization.scoped_full_name
|
29
|
+
root_registry.foobara_lookup_organization(full_org_name)
|
30
|
+
end
|
31
|
+
|
32
|
+
def root_registry
|
33
|
+
parent = scoped_namespace
|
34
|
+
parent = parent.scoped_namespace while parent.scoped_namespace
|
35
|
+
parent
|
36
|
+
end
|
37
|
+
|
25
38
|
def foobara_manifest_reference
|
26
39
|
domain_module.foobara_manifest_reference
|
27
40
|
end
|
@@ -100,16 +100,6 @@ module Foobara
|
|
100
100
|
exposed_organization
|
101
101
|
end
|
102
102
|
|
103
|
-
def exposed_global_domain
|
104
|
-
exposed_global_organization.foobara_lookup_domain("") ||
|
105
|
-
build_and_register_exposed_domain("")
|
106
|
-
end
|
107
|
-
|
108
|
-
def exposed_global_organization
|
109
|
-
foobara_lookup_organization("") ||
|
110
|
-
build_and_register_exposed_organization("")
|
111
|
-
end
|
112
|
-
|
113
103
|
def [](name)
|
114
104
|
if name.is_a?(Class)
|
115
105
|
name.full_command_name
|
data/projects/model/src/model.rb
CHANGED
@@ -182,7 +182,8 @@ module Foobara
|
|
182
182
|
|
183
183
|
if options[:ignore_unexpected_attributes]
|
184
184
|
Thread.foobara_with_var(:foobara_ignore_unexpected_attributes, true) do
|
185
|
-
|
185
|
+
initialize(attributes, options.except(:ignore_unexpected_attributes))
|
186
|
+
return
|
186
187
|
end
|
187
188
|
end
|
188
189
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foobara
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.74
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-03-
|
10
|
+
date: 2025-03-15 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: bigdecimal
|