foobara-remote-imports 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/src/foobara/remote_imports/import_type.rb +17 -6
- 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: 14960ddd884c70b7da1a13b4bdfca3d279e78a7adfcfac326ac48f1dd7b6d7a0
|
4
|
+
data.tar.gz: 9ba3375256447c5011fce6eb3bcbd503715fd35ef472cda52338f9e6c8fc09d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 232acb59d51f451b6213992c42c8295218075ef83803207a1868cff6c44d07a4dc4ca51de9221fa5c7f18aa530bfa1f2f73a722673cfdfc3c696a5803c636295
|
7
|
+
data.tar.gz: 2acbfcc7c1e8177f28d244edfdc7fb6c1a73582446f2fdbac25af7272eb7136fb4552ea165e06637012f45473a15387eca6c804903fb1cd3e021ecf32e868a56
|
data/CHANGELOG.md
CHANGED
@@ -56,15 +56,26 @@ module Foobara
|
|
56
56
|
# Warning: cannot desugarize this because unfortunately desugarizing an entity declaration will actually
|
57
57
|
# create the entity class, which should be considered a bug.
|
58
58
|
declaration_data = manifest_to_import.declaration_data
|
59
|
-
base_type_manifest = manifest_to_import.base_type
|
60
59
|
|
61
|
-
if
|
62
|
-
|
60
|
+
if declaration_data["type"] == "entity"
|
61
|
+
declaration_data = Util.deep_dup(declaration_data)
|
63
62
|
|
64
|
-
|
65
|
-
|
66
|
-
|
63
|
+
declaration_data["type"] = "detached_entity"
|
64
|
+
declaration_data["mutable"] = false
|
65
|
+
|
66
|
+
primary_key_attribute = declaration_data["primary_key"]
|
67
|
+
required = declaration_data["attributes_declaration"]["required"]
|
68
|
+
|
69
|
+
required << primary_key_attribute unless required.include?(primary_key_attribute)
|
70
|
+
|
71
|
+
model_base_class = declaration_data["model_base_class"]
|
72
|
+
unless model_base_class == "Foobara::Entity"
|
73
|
+
# :nocov:
|
74
|
+
raise "Expected model base class to be Foobara::Entity, but was #{model_base_class}"
|
75
|
+
# :nocov:
|
67
76
|
end
|
77
|
+
|
78
|
+
declaration_data["model_base_class"] = "Foobara::DetachedEntity"
|
68
79
|
end
|
69
80
|
|
70
81
|
type = domain.foobara_type_from_strict_stringified_declaration(declaration_data)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foobara-remote-imports
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
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-
|
11
|
+
date: 2024-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foobara
|