Sha256: 17821f8273d99728930ca3a8b147f990c8e56db1eb8979886d285ddb507b180a

Contents?: true

Size: 345 Bytes

Versions: 15

Compression:

Stored size: 345 Bytes

Contents

# encoding: utf-8

# Creates settings file in a sandbox
#
# @param [Hash] settings ({})
#   The list of settings to be stored in 'sandbox/.metrics.yml'
#
# @return [undefined]
def prepare_settings(settings, file = ".metrics.yml")
  try_in_sandbox do
    ::FileUtils.mkdir_p ::File.dirname(file)
    ::File.write file, settings.to_yaml
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
hexx-suit-2.3.2 spec/support/prepare_settings.rb
hexx-suit-2.3.0 spec/support/prepare_settings.rb
hexx-rspec-0.4.2 spec/support/prepare_settings.rb
hexx-rspec-0.4.1 spec/support/prepare_settings.rb
hexx-suit-2.2.3 spec/support/prepare_settings.rb
hexx-suit-2.2.2 spec/support/prepare_settings.rb
hexx-suit-2.2.1 spec/support/prepare_settings.rb
hexx-suit-2.2.0 spec/support/prepare_settings.rb
hexx-suit-2.1.0 spec/support/prepare_settings.rb
hexx-rspec-0.4.0 spec/support/prepare_settings.rb
hexx-suit-2.0.0 spec/support/prepare_settings.rb
hexx-rspec-0.3.1 spec/support/prepare_settings.rb
hexx-rspec-0.3.0 spec/support/prepare_settings.rb
hexx-rspec-0.2.2 spec/support/prepare_settings.rb
hexx-rspec-0.2.1 spec/support/prepare_settings.rb