lib/vagrant-orchestrate/config.rb in vagrant-orchestrate-0.7.0.pre.4 vs lib/vagrant-orchestrate/config.rb in vagrant-orchestrate-0.7.0.pre.5

- old
+ new

@@ -6,17 +6,19 @@ class Config < Vagrant.plugin(2, :config) attr_accessor :filter_managed_commands attr_accessor :strategy attr_accessor :force_push attr_accessor :tracker_host + attr_accessor :tracker_logging_enabled attr_accessor :credentials def initialize @filter_managed_commands = UNSET_VALUE @strategy = UNSET_VALUE @force_push = UNSET_VALUE @tracker_host = UNSET_VALUE + @tracker_logging_enabled = UNSET_VALUE @credentials = Credentials.new end def credentials yield @credentials if block_given? @@ -36,19 +38,20 @@ result.credentials = @credentials.merge(new_config.credentials) end end end - # rubocop:disable Metrics/CyclomaticComplexity + # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity def finalize! @filter_managed_commands = false if @filter_managed_commands == UNSET_VALUE @strategy = :serial if @strategy == UNSET_VALUE @force_push = false if @force_push == UNSET_VALUE @tracker_host = nil if @tracker_host == UNSET_VALUE + @tracker_logging_enabled = true if @tracker_logging_enabled == UNSET_VALUE @credentials = nil if @credentials.unset? @credentials.finalize! if @credentials end - # rubocop:enable Metrics/CyclomaticComplexity + # rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity class Credentials # Same as Vagrant does to distinguish uninitialized variables and intentional assignments # to Ruby's nil, we just have to define ourselves because we're in different scope UNSET_VALUE = ::Vagrant::Plugin::V2::Config::UNSET_VALUE