hecks-memory-database 0.1.9 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hecks-memory-database.rb +11 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5232af5c5243842fb5ad2869ec02d20d0eed8c4
|
4
|
+
data.tar.gz: 7001389cc03500f6569555eb99773b9b286f71f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf1a1e4ad25ad8a57512db70314abdfc1700b9bd13502f0a80933427edc132a69c732e6b161615723412db8a0f999a480cf7056e84ac818308fa99902e000165
|
7
|
+
data.tar.gz: cc7fbfc7ad8fe5de57d76d7c8204f6c318a5a75a1ea0886eb6018c7e095cff4c00802788eb1f244a0048152dce9b10b13b5ff51a9598b90cb54dc46e987b6fe2
|
@@ -1,18 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
module
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
module HecksAdapters
|
3
|
+
# The default database adapter
|
4
|
+
class MemoryDatabase
|
5
|
+
def initialize(domain:)
|
6
|
+
@repositories = domain.repositories
|
7
|
+
end
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
def [](module_name)
|
10
|
+
@repositories[module_name.to_s.downcase.to_sym]
|
11
|
+
end
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
end
|
13
|
+
def delete_all
|
14
|
+
@repositories.values.each(&:delete_all)
|
16
15
|
end
|
17
16
|
end
|
18
17
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hecks-memory-database
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Young
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Hecks Memory Database
|
14
14
|
email: chris@example.com
|