zygote 0.2.13 → 0.2.14

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
  SHA1:
3
- metadata.gz: c8fc6a0060bf25373dbb4474d2153fa33d3607c1
4
- data.tar.gz: 038eb2df69c93c43bb74be0aaa7f1b91f349d825
3
+ metadata.gz: 904d623bda334f025745e1596c6669fd01d32edd
4
+ data.tar.gz: 7ec24e21f6e3d7ca851010b0be999540d5c655b9
5
5
  SHA512:
6
- metadata.gz: 8749da303b7c726c441e8b84141e986b8e741303d72823fff62f8ad13bca6b54658899b8c7031958a2bca7e96c9e9cff3530c8b2ca38cd1e7849fde3acb06ba2
7
- data.tar.gz: c04444a77335f7ed272728fcf7949ce8db3deff24e8e583ee300b667865bd00acd4d4b28566e67d9fd784616a3251d9924835c632c1a088f4f25de7057fa15a4
6
+ metadata.gz: 892e6aab33ea5ab41e2d555bcbddb60d4c880406b85bf2acd9b7151a9b83c50fc1d46cea1ad0efdafa338864ad467a9535e7a5d32200962214680a7d43a90d32
7
+ data.tar.gz: 6d7bbf2e03252486e8b34175d0e6bd74d21247620ea64ff13febbf9576c0c94ec4fc1e8d95fda5324f18f7c089ceb4bb56abf17605fed3d5de4396258511ef44
data/lib/zygote/http.rb CHANGED
@@ -57,9 +57,10 @@ module Zygote
57
57
  # Clean params into a simple hash
58
58
  cleaned = clean_params(params.to_h)
59
59
  # Add the cell to the parameters
60
+ delegated = cleaned['delegated']
60
61
  cell = cleaned['cell']
61
62
  # Merge the cleaned params in with any cell options
62
- cell_opts = Zygote::Web.cell_config['index']['cells'][cell] || {}
63
+ cell_opts = Zygote::Web.cell_config['index']['cells'][delegated || cell] || {}
63
64
  opts = cell_opts.merge('params' => cleaned || {})
64
65
  body { erb :"#{cell}/#{cleaned['action']}".to_sym, locals: { opts: opts } }
65
66
  end
data/lib/zygote/util.rb CHANGED
@@ -47,5 +47,11 @@ def discover_domain
47
47
  end
48
48
 
49
49
  def kernel_params(hash)
50
- hash.map { |k, v| v == true ? k : "#{k}=#{v}" }.join(' ')
50
+ hash.map do |k, v|
51
+ if v.is_a? Array
52
+ v.map { |x| "#{k}=#{x}" }
53
+ else
54
+ "#{k}=#{v}"
55
+ end
56
+ end.join(' ')
51
57
  end
@@ -1,4 +1,4 @@
1
1
  # Namespace for our gem
2
2
  module Zygote
3
- VERSION = '0.2.13'.freeze
3
+ VERSION = '0.2.14'.freeze
4
4
  end
data/views/menu.erb CHANGED
@@ -73,11 +73,12 @@ set submenu-timeout 0
73
73
  goto ${selected}
74
74
 
75
75
  # Generate chains for each submenu entry
76
- <% data['menu']['submenu'].each do |entry, data| %>
77
- <% local_params = (data['params'] || {}).merge(params) %>
76
+ <% data['menu']['submenu'].each do |entry, subdata| %>
77
+ <% local_params = (subdata['params'] || {}).merge(params) %>
78
+ <% local_params.merge!({ delegated: cell}) if data['delegate'] %>
78
79
  <% parmstr = {entry: entry}.merge(local_params).to_query %>
79
80
  :<%= cell %>-<%= entry %>
80
- chain --replace --autofree http://${dhcp-server}/cell/<%= cell %>/<%= data['action'] || 'boot' %><%= parmstr.empty? ? "" : "?#{parmstr}" %>
81
+ chain --replace --autofree http://${dhcp-server}/cell/<%= data['delegate'] || cell %>/<%= subdata['action'] || 'boot' %><%= parmstr.empty? ? "" : "?#{parmstr}" %>
81
82
  <% end %>
82
83
  <% end %>
83
84
 
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.13
4
+ version: 0.2.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dale Hamel
@@ -229,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
229
229
  version: '0'
230
230
  requirements: []
231
231
  rubyforge_project:
232
- rubygems_version: 2.2.3
232
+ rubygems_version: 2.4.8
233
233
  signing_key:
234
234
  specification_version: 4
235
235
  summary: Differentiate servers with iPXE