rampart-core 0.1.1 → 0.1.3
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 +4 -4
- data/lib/rampart/domain/entity.rb +4 -1
- data/lib/rampart/engine_loader.rb +4 -1
- data/lib/rampart/version.rb +1 -3
- 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: 498ffbe558ca941b070948c4f39530085f8c2d1a73917186bd7b6ecab59192ab
|
|
4
|
+
data.tar.gz: 1181ec35e2cd89d2afa0991fa1d6e421a3c43d82099b7eafd97ae88ce8ca6600
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fe575a9f4e72c5c2759bf00f5358fd563464e0074590fbf1e8b5c1c3c44c710ac0e381230646e2713c8e64aed4befaf0e668c55c1d4f1df59d3e75d21cc0a8aa
|
|
7
|
+
data.tar.gz: 0d9cdd05bf982ba344967e37ebd880f7d0139dc32bfa8f7d0276879a99f1344bb0428ace2595d8cc08905292162a1ebeb7b1a14a65cff60614aed0a647cd2d8b
|
|
@@ -3,13 +3,16 @@ require "dry-struct"
|
|
|
3
3
|
module Rampart
|
|
4
4
|
module Domain
|
|
5
5
|
class Entity < Dry::Struct
|
|
6
|
+
# All entities have an id attribute
|
|
7
|
+
attribute :id, Rampart::Types::String
|
|
8
|
+
|
|
6
9
|
# Entities have identity and can be compared by id
|
|
7
10
|
def ==(other)
|
|
8
11
|
other.is_a?(self.class) && other.id == id
|
|
9
12
|
end
|
|
10
13
|
|
|
11
14
|
alias_method :eql?, :==
|
|
12
|
-
|
|
15
|
+
|
|
13
16
|
def hash
|
|
14
17
|
[self.class, id].hash
|
|
15
18
|
end
|
|
@@ -88,9 +88,12 @@ module Rampart
|
|
|
88
88
|
Dir.glob(dir.join(pattern)).sort.each do |file|
|
|
89
89
|
next if File.directory?(file)
|
|
90
90
|
if Rails.env.development? || Rails.env.test?
|
|
91
|
+
# support auto-reloading in development and test environments
|
|
91
92
|
load file.to_s
|
|
92
93
|
else
|
|
93
|
-
|
|
94
|
+
# In eager load environments (CI/production), Zeitwerk has already loaded these files.
|
|
95
|
+
# Using require instead of load prevents re-execution and duplicate definitions.
|
|
96
|
+
require file.to_s
|
|
94
97
|
end
|
|
95
98
|
end
|
|
96
99
|
end
|
data/lib/rampart/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rampart-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rampart Team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-01-
|
|
11
|
+
date: 2026-01-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: dry-types
|