foobara-remote-imports 0.0.8 → 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: 943d393b16e18d991fe5b3b4aa4ab09a8b2ca6e21e6d70b5b346b03dbaf2964b
4
- data.tar.gz: 907118c1657c5bfdbc26c1a86b7b263fd80b993d25bafb0224c256e9df194356
3
+ metadata.gz: f853e097c04d582b9386b368794118328d88ea2ebad96fa63bea2a45ad65c246
4
+ data.tar.gz: b9ffe32fd0b1d702c5f0a2dbf84dcb304ecddd94620bb4dba3d687fe376d17ac
5
5
  SHA512:
6
- metadata.gz: 9f0e1e7f9e6332b417acd8afebd9966c6db2324859495c36f13caec3d3a4f63ed0cc469eda724df7b5555ce1b34558e31528c1edabe430eb99bd1f478ed7a02c
7
- data.tar.gz: 344acd0f4d3af4554d12677a61a3b42b38e994bf94c372345bfc4f343e6863bdc7403cc55fc20921592329221ecda126e3677949230a00186745717a61b9ed72
6
+ metadata.gz: e2d41ba5a38b917665249fe07e2ed9061363e08a99c1af39310c2d784fdc6895c8a16742829c28fe578d4c1dd84e8840c15301c4d8459b32e861064bcda004b6
7
+ data.tar.gz: 1335c94e2da513ca6eaebc5d68519278fba760d552deecf075e3019ef1a2e4e17bb80fb4f4c37fe5c0b386bba1c095dd3a6bc06f12d774287bb54ea28f6c9165
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [0.0.11] - 2025-03-28
2
+
3
+ - Default to deanonymizing imported model classes by default to preserve existing behavior
4
+
5
+ ## [0.0.9] - 2025-01-07
6
+
7
+ - Bump Ruby to 3.4.1
8
+
1
9
  ## [0.0.8] - 2024-12-09
2
10
 
3
11
  - Convert entity into detached_entity when importing
@@ -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,30 +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.8
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-12-10 00:00:00.000000000 Z
10
+ date: 2025-03-28 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: foobara
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
- - - ">="
16
+ - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: '0'
18
+ version: 0.0.88
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
- - - ">="
23
+ - - "~>"
25
24
  - !ruby/object:Gem::Version
26
- version: '0'
27
- description:
25
+ version: 0.0.88
28
26
  email:
29
27
  - azimux@gmail.com
30
28
  executables: []
@@ -52,7 +50,6 @@ metadata:
52
50
  source_code_uri: https://github.com/foobara/remote-imports
53
51
  changelog_uri: https://github.com/foobara/remote-imports/blob/main/CHANGELOG.md
54
52
  rubygems_mfa_required: 'true'
55
- post_install_message:
56
53
  rdoc_options: []
57
54
  require_paths:
58
55
  - lib
@@ -60,15 +57,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
60
57
  requirements:
61
58
  - - ">="
62
59
  - !ruby/object:Gem::Version
63
- version: 3.2.2
60
+ version: 3.4.0
64
61
  required_rubygems_version: !ruby/object:Gem::Requirement
65
62
  requirements:
66
63
  - - ">="
67
64
  - !ruby/object:Gem::Version
68
65
  version: '0'
69
66
  requirements: []
70
- rubygems_version: 3.5.23
71
- signing_key:
67
+ rubygems_version: 3.6.6
72
68
  specification_version: 4
73
69
  summary: Used to import commands/entities/whatever from another system into this one.
74
70
  test_files: []