foobara 0.0.40 → 0.0.42
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/projects/builtin_types/src/builtin_types.rb +1 -0
- data/projects/domain/src/domain.rb +19 -0
- data/projects/model/src/model.rb +1 -16
- data/projects/monorepo/lib/foobara/monorepo/project.rb +2 -2
- data/projects/monorepo/lib/foobara/monorepo.rb +2 -2
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7b24f7f9af98e9e8e466db8a6cf173a23ec9ff6c9b79f9300a24d30e9706f48
|
4
|
+
data.tar.gz: e55ff2870498406775063852ccca4650da55ef6d6027db5702b2b0275a42624f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a7998ddfa98ed8d45017a23aff622f95e8defd67d82a3fcb1a4ab6bd5c7f5de263793a6e7b3cff2572333a7842d4bceaa6431d24cf031929fa0d258cb68174c
|
7
|
+
data.tar.gz: 5c0f21ab259a5d31c208bb2c74fbfa040d7dfb13caed4bdfb365f789b9a9cb0eb153d5bb3d8fa17deee56207c53626ca7747843296dc50bc9a16c851f8f6265d
|
data/CHANGELOG.md
CHANGED
@@ -36,6 +36,25 @@ module Foobara
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
+
def domain_through_modules(mod)
|
40
|
+
mod = Util.module_for(mod)
|
41
|
+
|
42
|
+
while mod
|
43
|
+
if mod.foobara_domain?
|
44
|
+
namespace = mod
|
45
|
+
break
|
46
|
+
end
|
47
|
+
|
48
|
+
mod = Util.module_for(mod)
|
49
|
+
end
|
50
|
+
|
51
|
+
if namespace&.foobara_domain?
|
52
|
+
namespace
|
53
|
+
else
|
54
|
+
GlobalDomain
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
39
58
|
def create(full_domain_name)
|
40
59
|
if Domain.to_domain(full_domain_name)
|
41
60
|
raise DomainAlreadyExistsError, "Domain #{full_domain_name} already exists"
|
data/projects/model/src/model.rb
CHANGED
@@ -66,22 +66,7 @@ module Foobara
|
|
66
66
|
if model_type
|
67
67
|
model_type.foobara_domain
|
68
68
|
else
|
69
|
-
|
70
|
-
|
71
|
-
while mod
|
72
|
-
if mod.foobara_domain?
|
73
|
-
namespace = mod
|
74
|
-
break
|
75
|
-
end
|
76
|
-
|
77
|
-
mod = Util.module_for(mod)
|
78
|
-
end
|
79
|
-
|
80
|
-
if namespace&.foobara_domain?
|
81
|
-
namespace
|
82
|
-
else
|
83
|
-
GlobalDomain
|
84
|
-
end
|
69
|
+
Domain.domain_through_modules(self)
|
85
70
|
end
|
86
71
|
end
|
87
72
|
|
@@ -7,9 +7,9 @@ module Foobara
|
|
7
7
|
|
8
8
|
# TODO: we should move these concepts out of "Monorepo" and maybe into Foobara because we sometimes need to
|
9
9
|
# be able to install!/reset foobara code that's been extracted into a gem
|
10
|
-
def initialize(symbol, project_path:
|
10
|
+
def initialize(symbol, project_path: nil)
|
11
11
|
self.symbol = symbol
|
12
|
-
self.project_path = project_path
|
12
|
+
self.project_path = project_path || "#{__dir__}/../../../../../projects/#{symbol}"
|
13
13
|
end
|
14
14
|
|
15
15
|
def require_path
|
@@ -27,14 +27,14 @@ module Foobara
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
-
def project(symbol)
|
30
|
+
def project(symbol, project_path: nil)
|
31
31
|
if all_projects.key?(symbol)
|
32
32
|
# :nocov:
|
33
33
|
raise ArgumentError, "Project #{symbol} already loaded"
|
34
34
|
# :nocov:
|
35
35
|
end
|
36
36
|
|
37
|
-
project = Project.new(symbol)
|
37
|
+
project = Project.new(symbol, project_path:)
|
38
38
|
project.load
|
39
39
|
|
40
40
|
all_projects[symbol] = project
|
metadata
CHANGED
@@ -1,14 +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.42
|
5
5
|
platform: ruby
|
6
|
-
original_platform: ''
|
7
6
|
authors:
|
8
7
|
- Miles Georgi
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
10
|
+
date: 2024-12-24 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: foobara-util
|
@@ -422,7 +421,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
422
421
|
- !ruby/object:Gem::Version
|
423
422
|
version: '0'
|
424
423
|
requirements: []
|
425
|
-
rubygems_version: 3.6.
|
424
|
+
rubygems_version: 3.6.2
|
426
425
|
specification_version: 4
|
427
426
|
summary: A command-centric and discoverable software framework with a focus on domain
|
428
427
|
concepts and abstracting away integration code
|