Skip to content

Commit

Permalink
@ teracyhq#462 | should make sure settings is immutable after being b…
Browse files Browse the repository at this point in the history
…uilt
  • Loading branch information
hoatle committed Oct 27, 2018
1 parent 18bcf8d commit f7acd55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/teracy-dev/config/manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def configure(settings, config, type:)

TeracyDev::Util.multi_sort(@items, weight: :desc, id: :asc).each do |item|
configurator = item[:configurator]
configurator.configure(settings, config, type: type)
configurator.configure(Util.deep_copy(settings).freeze, config, type: type)
end
end

Expand Down
4 changes: 2 additions & 2 deletions lib/teracy-dev/loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,12 @@ def configure(settings, config, type:)
def configure_vagrant(settings)
Vagrant.configure("2") do |common|

configure(Util.deep_copy(settings).freeze, common, type: 'common')
configure(settings, common, type: 'common')
settings['nodes'].each do |node_settings|
primary = node_settings['primary'] ||= false
autostart = node_settings['autostart'] === false ? false : true
common.vm.define node_settings['name'], primary: primary, autostart: autostart do |node|
configure(Util.deep_copy(node_settings).freeze, node, type: 'node')
configure(node_settings, node, type: 'node')
end
end
end
Expand Down

0 comments on commit f7acd55

Please sign in to comment.