foobara-remote-imports 0.0.9 → 0.0.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7717fdab6149b75d7ad8264a2eca16c6eda0a5511701dd14b82495ea911405d
4
- data.tar.gz: 1f465d2a7ccd458b665f0b95f08bdcdc71e1d2b808feba8309921963a02756ec
3
+ metadata.gz: f853e097c04d582b9386b368794118328d88ea2ebad96fa63bea2a45ad65c246
4
+ data.tar.gz: b9ffe32fd0b1d702c5f0a2dbf84dcb304ecddd94620bb4dba3d687fe376d17ac
5
5
  SHA512:
6
- metadata.gz: b94e278e3b03297163c37f780b3bd393aa909cac377e4efb1d1314d82d4be8e5ba4a7201f8c243b782267ac99bf5d281f304703ce56d8e69440a83594fe480fa
7
- data.tar.gz: 2c244f74a798926288b72816a62a46010e1508198ecacd487ef39cda77b52e9375044c9b7fdaef31c947ab9404f9787958717d97febaec6aff6343355117d1ef
6
+ metadata.gz: e2d41ba5a38b917665249fe07e2ed9061363e08a99c1af39310c2d784fdc6895c8a16742829c28fe578d4c1dd84e8840c15301c4d8459b32e861064bcda004b6
7
+ data.tar.gz: 1335c94e2da513ca6eaebc5d68519278fba760d552deecf075e3019ef1a2e4e17bb80fb4f4c37fe5c0b386bba1c095dd3a6bc06f12d774287bb54ea28f6c9165
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.0.11] - 2025-03-28
2
+
3
+ - Default to deanonymizing imported model classes by default to preserve existing behavior
4
+
1
5
  ## [0.0.9] - 2025-01-07
2
6
 
3
7
  - Bump Ruby to 3.4.1
@@ -145,6 +145,7 @@ module Foobara
145
145
  # :nocov:
146
146
  end
147
147
  end
148
+
148
149
  halt!
149
150
  else
150
151
  # :nocov:
@@ -35,7 +35,8 @@ module Foobara
35
35
  cache: { type: :boolean, default: true },
36
36
  cache_path: { type: :string, default: "tmp/cache/foobara-remote-imports" },
37
37
  to_import: :duck,
38
- already_imported: { type: :duck, allow_nil: true }
38
+ already_imported: { type: :duck, allow_nil: true },
39
+ deanonymize_models: { type: :boolean, default: true }
39
40
  )
40
41
 
41
42
  klass.result :duck
@@ -9,6 +9,7 @@ module Foobara
9
9
  root_manifest.types
10
10
  end
11
11
 
12
+ # TODO: break this method up?
12
13
  def import_object_from_manifest
13
14
  existing_type = Foobara.foobara_root_namespace.foobara_lookup_type(
14
15
  manifest_to_import.reference,
@@ -57,6 +58,7 @@ module Foobara
57
58
  # create the entity class, which should be considered a bug.
58
59
  declaration_data = manifest_to_import.declaration_data
59
60
 
61
+ # TODO: how do we solve this for :active_record type??
60
62
  if declaration_data["type"] == "entity"
61
63
  declaration_data = Util.deep_dup(declaration_data)
62
64
 
@@ -80,12 +82,20 @@ module Foobara
80
82
 
81
83
  type = domain.foobara_type_from_strict_stringified_declaration(declaration_data)
82
84
 
85
+ if deanonymize_models? && type.extends?(:model)
86
+ Foobara::Model.deanonymize_class(type.target_class)
87
+ end
88
+
83
89
  unless domain.foobara_registered?(type)
84
90
  domain.foobara_register_type(manifest_to_import.scoped_path, type)
85
91
  end
86
92
 
87
93
  type
88
94
  end
95
+
96
+ def deanonymize_models?
97
+ deanonymize_models
98
+ end
89
99
  end
90
100
  end
91
101
  end
metadata CHANGED
@@ -1,28 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara-remote-imports
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-07 00:00:00.000000000 Z
10
+ date: 2025-03-28 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: foobara
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - ">="
16
+ - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '0'
18
+ version: 0.0.88
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
- - - ">="
23
+ - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: '0'
25
+ version: 0.0.88
26
26
  email:
27
27
  - azimux@gmail.com
28
28
  executables: []
@@ -64,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  - !ruby/object:Gem::Version
65
65
  version: '0'
66
66
  requirements: []
67
- rubygems_version: 3.6.2
67
+ rubygems_version: 3.6.6
68
68
  specification_version: 4
69
69
  summary: Used to import commands/entities/whatever from another system into this one.
70
70
  test_files: []