foobara-active-record-type 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: ef9d7117540d6792f07286b6d6c73ef07124f69cfdb33cd2456614c2d7712ead
4
- data.tar.gz: 8d3479a3abd3fe8aa0e52dbaaf27b17d99c6e41e85c9edf5948097e2d3494a9c
3
+ metadata.gz: 1a325eb468219f2eb1f4033930b08a6c02cf15363a87fe4194bfbe3bec9098c1
4
+ data.tar.gz: 9a19c1c2e8035274d0db2764c397ff3917f284dab9f3f5badc6b6a5e9dd7dbe9
5
5
  SHA512:
6
- metadata.gz: 2121dcd3d9c61a860347e487631e2e9b5420bcd691f5f97d86d7ef2bd9e93320af60dc66d0c1b878e75ccfac2a819d2fe826d3f17e8b721ba5876a344d2eb7e6
7
- data.tar.gz: fc18a7d564dd316258f0e87317575781a197e31e5cdbf0a725a6dcce622192f573c3b388d995fea0c064ba09dfca90f57e5088a073cf248a37de23c2c02d5012
6
+ metadata.gz: 427fd034fd661cee2f79b6278b9d95a6174a367e818b307735bbedaaa03d5517b7f28e2b3078987bbc47b704b83153333ce607d9866deb9ecacbd2714c9fe6a1
7
+ data.tar.gz: 3e59d009474d55909f040a4ee2fbb2b6142b9c50cb1d5f15c6a8e2be282b05da7606be341b8731541c87e8316b8819f6a12b76def43baef8b1fe21de2a365149
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.0.10] - 2025-01-29
2
+
3
+ - Fix bug causing duplication of domain name in type name
4
+
1
5
  ## [0.0.9] - 2025-01-28
2
6
 
3
7
  - Fix problem with attributes declaration validator breaking things
@@ -16,10 +16,14 @@ module Foobara
16
16
  end
17
17
  end
18
18
 
19
+ domain = Foobara::Domain.domain_through_modules(active_record_class)
20
+
21
+ name = active_record_class.name.gsub(/^#{domain.scoped_full_name}::/, "")
22
+
19
23
  {
20
24
  type: :active_record,
21
25
  model_class: active_record_class.name,
22
- name: active_record_class.name,
26
+ name:,
23
27
  model_base_class: active_record_superclass.name,
24
28
  model_module: Util.module_for(active_record_class)&.name,
25
29
  primary_key: active_record_class.primary_key,
@@ -19,6 +19,9 @@ module Foobara
19
19
  type_name = type.declaration_data[:name]
20
20
 
21
21
  domain = Domain.domain_through_modules(active_record_class)
22
+
23
+ type_name = type_name.gsub(/^#{domain.scoped_full_name}::/, "")
24
+
22
25
  domain.foobara_register_type(type_name, type)
23
26
  end
24
27
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara-active-record-type
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-28 00:00:00.000000000 Z
10
+ date: 2025-01-29 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activerecord