zygote 0.2.0 → 0.2.1
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/zygote/http.rb +12 -10
- data/lib/zygote/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1794f74c3eaddf466e1e54fd81c865b0c96a91b1
|
4
|
+
data.tar.gz: 8f8a6caf1fa59292c851bf3dd9ec05c98ed6e075
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfbcb9866f6a48298e3b43daff3dc1d93ac956b1bb86e95d08834abf905fe372eabcaa60fbd6ab978a633ea018380590b25bfa8c5fc973ded08e1903b88a2c0b
|
7
|
+
data.tar.gz: 4966a83bd5b009330cc1174b823da8aeaaa145724e4718ecdbe462c716fa65b3e7a9e9e0a764ccab561de7fac53b60c36a2d25343ad16dab652be5a0ec075605
|
data/lib/zygote/http.rb
CHANGED
@@ -38,16 +38,18 @@ class ZygoteWeb < Sinatra::Base
|
|
38
38
|
body { erb :menu, locals: { opts: ZygoteWeb.cell_config.merge('params' => cleaned || {}) } }
|
39
39
|
end
|
40
40
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
41
|
+
[ :aget, :apost ].each do |method|
|
42
|
+
send method, %r{/cell/(?<cell>\S*)/(?<action>\S*)$} do
|
43
|
+
# Render an action for a particular cell
|
44
|
+
# Clean params into a simple hash
|
45
|
+
cleaned = clean_params(params.to_h)
|
46
|
+
# Add the cell to the parameters
|
47
|
+
cell = cleaned['cell']
|
48
|
+
# Merge the cleaned params in with any cell options
|
49
|
+
cell_opts = ZygoteWeb.cell_config['index']['cells'][cell] || {}
|
50
|
+
opts = cell_opts.merge('params' => cleaned || {})
|
51
|
+
body { erb :"#{cell}/#{cleaned['action']}".to_sym, locals: { opts: opts } }
|
52
|
+
end
|
51
53
|
end
|
52
54
|
|
53
55
|
# Show the queue for a SKU
|
data/lib/zygote/version.rb
CHANGED