mushin 0.38.0 → 0.39.0
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/mushin/test_helper.rb +2 -1
- data/lib/mushin/version.rb +1 -1
- metadata +1 -2
- data/lib/mushin/builtin/ssd/ssd.rb +0 -50
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c70ab8dda9c15021622fa563a9a284ee4e0e9133
|
4
|
+
data.tar.gz: 3b5a60b4b7df06397fb2752cba090deb72076aa0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f14b5d77201776afc4dd23d6face91ce2754360ab3d890313345761a3261c62ca11e53d1d122d38df3b954c3591571c446169641010910cc47d569fc41b3b838
|
7
|
+
data.tar.gz: f1dc92dade921ab8cb3e94447c80aeb4da1b0ad21b77e1e98b4cda9815c70c13f249ea9bedc51594b3b78bf960079891b908066db21f8ede9c8fd4123be4915d
|
data/lib/mushin/test_helper.rb
CHANGED
data/lib/mushin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mushin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.39.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zotherstupidguy
|
@@ -144,7 +144,6 @@ files:
|
|
144
144
|
- exe/generator.rb
|
145
145
|
- exe/mushin
|
146
146
|
- lib/mushin.rb
|
147
|
-
- lib/mushin/builtin/ssd/ssd.rb
|
148
147
|
- lib/mushin/domain.rb
|
149
148
|
- lib/mushin/ext.rb
|
150
149
|
- lib/mushin/logger.rb
|
@@ -1,50 +0,0 @@
|
|
1
|
-
require 'ssd'
|
2
|
-
|
3
|
-
module SSD
|
4
|
-
module Internal
|
5
|
-
class SomeError < RuntimeError
|
6
|
-
end
|
7
|
-
|
8
|
-
def write path, key, value
|
9
|
-
SSD.write(path, key, value)
|
10
|
-
end
|
11
|
-
|
12
|
-
def read path, key
|
13
|
-
SSD.read(path, key)
|
14
|
-
end
|
15
|
-
|
16
|
-
def dump path, key
|
17
|
-
SSD.dump(path, key)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
class Main < Mushin::Ext
|
22
|
-
include Internal
|
23
|
-
|
24
|
-
def initialize app=nil, opts={}, params={}
|
25
|
-
@app = app
|
26
|
-
@opts = opts
|
27
|
-
@params = params
|
28
|
-
end
|
29
|
-
|
30
|
-
def call env
|
31
|
-
#NOTE Utter Generated Code: used to provide you an env hash variable
|
32
|
-
env ||= Hash.new #if env.nil?
|
33
|
-
|
34
|
-
$log.debug "#{self} ------ Inbound maniuplation"
|
35
|
-
@app.call(env)
|
36
|
-
|
37
|
-
if @opts[:cqrs] == :cqrs_query then
|
38
|
-
env[:query_results] = SSD.read(@opts[:path], @params[:id])
|
39
|
-
elsif @opts[:cqrs] == :cqrs_command then
|
40
|
-
write @opts[:path], env[:id], env
|
41
|
-
else
|
42
|
-
$log.warn "SSD store was called but not used"
|
43
|
-
end
|
44
|
-
|
45
|
-
$log.debug "#{self} ------ Outbound maniuplation"
|
46
|
-
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
end
|