dddr 2.0.1 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d7f242b3643ea6417751a4d0a172114d8f4e4d538740e8a2ef5cbec040e1d0b
4
- data.tar.gz: a46ea8ea402f0aa98c04ccc6b1d321f5d35f344fbb17684526f93d086d333cd6
3
+ metadata.gz: da1458c32e2bba6a0a94f1014aac39675ca2267790a50d7fcb09e1c8af0cc2d9
4
+ data.tar.gz: 96b8c4d7f5d2adea851ba8abd61d5a3e2a5dd587523a0b789459d1e1b9a76d64
5
5
  SHA512:
6
- metadata.gz: 9105134ac2b43915ac26fd493758dc1cdf2e8e6b5f86c7c4af8e971feb7463722d97337054f3957976853d8b0c9245971089c15b82f0328edd142f360c8908ae
7
- data.tar.gz: 772dc22ef446d3d0ec98b81d02ef6ed27107491eccef64bb313677401e29b6c3f64277d3f5090d90c94605a426fa41d3cb7a0c975e43839278e48bcbcdab3f8c
6
+ metadata.gz: 390527b09424ef5cde4da811fbc32cab8823af20001473ca975c4d629842294133676000d9eefe1b1d606ecf286860fa4d5e284b55790bc0f7a4e2e750368ac2
7
+ data.tar.gz: 66c3b7cd6f43cb8d6559e643c3627e9accb7e269d43b9b730398b8ad8b11e8e51047c76759566579a38ccb4847772f043172ef921b4aadcc680719a726794408
data/lib/dddr/sdbm.rb CHANGED
@@ -64,15 +64,15 @@ module Dddr
64
64
  end
65
65
 
66
66
  def to_csv
67
- # env = Dddr.configuration.env
68
- # data_dir = Dddr.configuration.data_dir
69
- # container = Dddr.configuration.container
70
- # CSV.open("#{data_dir}/#{container}/#{env}/#{self.class.name}.csv", "w") do |csv|
71
- # csv = all.first&.to_hash&.keys
72
- # all.each do |entity|
73
- # csv << entity.to_hash.values
74
- # end
75
- # end
67
+ env = Dddr.configuration.env
68
+ data_dir = Dddr.configuration.data_dir
69
+ container = Dddr.configuration.container
70
+ CSV.open("#{data_dir}/#{container}/#{env}/#{self.class.name}.csv", "w") do |csv|
71
+ csv = all.first&.to_hash&.keys
72
+ all.each do |entity|
73
+ csv << entity.to_hash.values
74
+ end
75
+ end
76
76
  end
77
77
 
78
78
 
@@ -160,7 +160,7 @@ module Dddr
160
160
 
161
161
  def from_hash(uid, data_hash)
162
162
  self.uid = uid
163
- data_hash.each do |attribute, value|
163
+ data_hash&.each do |attribute, value|
164
164
  attribute = attribute.to_sym
165
165
  if respond_to?(:"#{attribute}=")
166
166
  send(:"#{attribute}=", value)
data/lib/dddr/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dddr
4
- VERSION = "2.0.1"
4
+ VERSION = "2.0.3"
5
5
  end
data/lib/dddr.rb CHANGED
@@ -47,11 +47,7 @@ module Dddr
47
47
  module Entity
48
48
  def self.included(base)
49
49
  if Dddr.configuration.engine == :sdbm
50
-
51
- puts "Including #{base.name}"
52
-
53
50
  Dddr::ENTITIES << base
54
-
55
51
  include Dddr::Sdbm
56
52
  base.extend(Dddr::Sdbm::ClassMethods)
57
53
  end
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: 2.0.1
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delaney Burke
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-10 00:00:00.000000000 Z
11
+ date: 2024-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sdbm