dddr 1.0.4 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dddr/version.rb +1 -1
- data/lib/dddr.rb +6 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 177463ebd64aa4c1b9e98bd1fc4d2ceb6f8d9936e929322e9158edc54b298802
|
4
|
+
data.tar.gz: e86ed4862518bd85a6ff202e700ed6d26f70e52ba305086eec50d170f6c7ed0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c6ffcbe705cf4cf40bf70bfd8260f9063becd992a3c7b01b64c98529e9fa2dad6a968791232e8db4db98612318f6e7c34e0a9919281b6cdd87ca23c4db0f704
|
7
|
+
data.tar.gz: 1f3680ca1595fd98a6bd41f699a179c2d29c5ae2f5729a8ad1f1935e1ade92079a7b84a54e5f211d2e9c21a7c1834ed2c4730aa2503e663e697cc545f74a2723
|
data/lib/dddr/version.rb
CHANGED
data/lib/dddr.rb
CHANGED
@@ -14,7 +14,8 @@ module Dddr
|
|
14
14
|
|
15
15
|
def self.configure
|
16
16
|
configuration.env = ENV["DDDR_ENV"] || "development"
|
17
|
-
configuration.data_dir = "
|
17
|
+
configuration.data_dir = "/var/dddr"
|
18
|
+
configuration.container = "#{File.basename(Dir.pwd)}"
|
18
19
|
yield(configuration) if block_given?
|
19
20
|
end
|
20
21
|
|
@@ -39,6 +40,7 @@ module Dddr
|
|
39
40
|
end
|
40
41
|
|
41
42
|
def const_missing(name)
|
43
|
+
|
42
44
|
@@context = self
|
43
45
|
|
44
46
|
if defined?(self::Queries)
|
@@ -51,8 +53,9 @@ module Dddr
|
|
51
53
|
def initialize(entity_class = @@context)
|
52
54
|
@entity_class = entity_class
|
53
55
|
env = Dddr.configuration.env
|
54
|
-
`mkdir -p #{Dddr.configuration.data_dir}/#{env}
|
55
|
-
|
56
|
+
`sudo mkdir -p #{Dddr.configuration.data_dir}/#{Dddr.configuration.container}/#{env}/`
|
57
|
+
`sudo chown $USER #{Dddr.configuration.data_dir}/#{Dddr.configuration.container}/#{env}/`
|
58
|
+
@name = "#{Dddr.configuration.data_dir}/#{Dddr.configuration.container}/#{env}/#{entity_class.name.downcase}"
|
56
59
|
end
|
57
60
|
|
58
61
|
def add(entity)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dddr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Delaney Burke
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sdbm
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.0'
|
27
27
|
description: |
|
28
|
-
DDDr stands for Domain Driven Design
|
28
|
+
DDDr stands for Domain Driven Design Repository. It's a Ruby gem that simplifies the implementation of data repositories in a Domain-Driven Design (DDD) architecture.
|
29
29
|
It offers a clean interface for abstracting data access, allowing you to focus on your domain logic rather than database operations.
|
30
30
|
With DDDr, you can easily swap out data sources without affecting your core business logic.
|
31
31
|
email:
|
@@ -69,5 +69,5 @@ requirements: []
|
|
69
69
|
rubygems_version: 3.4.21
|
70
70
|
signing_key:
|
71
71
|
specification_version: 4
|
72
|
-
summary: Domain Driven Design
|
72
|
+
summary: Domain Driven Design Repository
|
73
73
|
test_files: []
|