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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b78db9a651e1cda67167ffa88e926df3cab9fd62
4
- data.tar.gz: ba8540429aa499f8613f0b1964d2a50886bf9155
3
+ metadata.gz: 1794f74c3eaddf466e1e54fd81c865b0c96a91b1
4
+ data.tar.gz: 8f8a6caf1fa59292c851bf3dd9ec05c98ed6e075
5
5
  SHA512:
6
- metadata.gz: e792b386ece097ebdbe99cc518d2ae714389d04637bf8c24f8185ce4b830b2e3f78705c70c7721d7b1a153afb0cae3f8c3d8e14a7de04346b0d9316db0a18243
7
- data.tar.gz: c02407331e5644fba8699cb9f98e5388f85923abb1dea8f83a2c05ed1ffdec42f206a5f338eec9258486b079d8a105041d718574d37157c3d34518fb18c59c23
6
+ metadata.gz: cfbcb9866f6a48298e3b43daff3dc1d93ac956b1bb86e95d08834abf905fe372eabcaa60fbd6ab978a633ea018380590b25bfa8c5fc973ded08e1903b88a2c0b
7
+ data.tar.gz: 4966a83bd5b009330cc1174b823da8aeaaa145724e4718ecdbe462c716fa65b3e7a9e9e0a764ccab561de7fac53b60c36a2d25343ad16dab652be5a0ec075605
@@ -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
- # Render an action for a particular cell
42
- aget %r{/cell/(?<cell>\S*)/(?<action>\S*)$} do
43
- # Clean params into a simple hash
44
- cleaned = clean_params(params.to_h)
45
- # Add the cell to the parameters
46
- cell = cleaned['cell']
47
- # Merge the cleaned params in with any cell options
48
- cell_opts = ZygoteWeb.cell_config['index']['cells'][cell] || {}
49
- opts = cell_opts.merge('params' => cleaned || {})
50
- body { erb :"#{cell}/#{cleaned['action']}".to_sym, locals: { opts: opts } }
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
@@ -1,4 +1,4 @@
1
1
  # Namespace for our gem
2
2
  module Zygote
3
- VERSION = '0.2.0'.freeze
3
+ VERSION = '0.2.1'.freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zygote
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dale Hamel