Sha256: 8c9c4d053761066b7d231e2d3c6f9f816e032cbc3e12d289a03ebc942b5fbd3a

Contents?: true

Size: 1.34 KB

Versions: 99

Compression:

Stored size: 1.34 KB

Contents

HERE = File.dirname(__FILE__) unless defined?(HERE)
ROOT = File.join(HERE, "..") unless defined?(ROOT)

$LOAD_PATH << File.join(ROOT, "lib")
$LOAD_PATH << File.join(HERE, "support")

require "yaml"
if ENV["YAMLER"] && defined?(YAML::ENGINE)
  YAML::ENGINE.yamler = ENV["YAMLER"]
end

ruby_version = defined?(JRUBY_VERSION) ? "JRuby #{JRUBY_VERSION} in #{RUBY_VERSION} mode" : "Ruby #{RUBY_VERSION}"
yaml_engine = defined?(YAML::ENGINE) ? YAML::ENGINE.yamler : "syck"
libyaml_version = yaml_engine == "psych" && Psych.const_defined?("LIBYAML_VERSION", false) ? Psych::LIBYAML_VERSION : "N/A"

env_info = [
  ruby_version,
  "YAML: #{yaml_engine} (#{YAML::VERSION}) (libyaml: #{libyaml_version})",
  "Monkeypatch: #{ENV['MONKEYPATCH_YAML']}"
]

puts env_info.join(", ")

# Caching references to these methods before loading safe_yaml in order to test
# that they aren't touched unless you actually require safe_yaml (see yaml_spec.rb).
ORIGINAL_YAML_LOAD      = YAML.method(:load)
ORIGINAL_YAML_LOAD_FILE = YAML.method(:load_file)

require "safe_yaml/load"
require "ostruct"
require "hashie"
require "heredoc_unindent"

# Stolen from Rails:
# https://github.com/rails/rails/blob/3-2-stable/activesupport/lib/active_support/core_ext/kernel/reporting.rb#L10-25
def silence_warnings
  $VERBOSE = nil; yield
ensure
  $VERBOSE = true
end

require File.join(HERE, "resolver_specs")

Version data entries

99 entries across 91 versions & 13 rubygems

Version Path
cloudsmith-api-0.53.3 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/spec_helper.rb
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/spec/spec_helper.rb
cloudsmith-api-0.53.1 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/spec_helper.rb
cloudsmith-api-0.52.121 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/spec_helper.rb
cloudsmith-api-0.52.92 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/spec_helper.rb
cloudsmith-api-0.52.79 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/spec_helper.rb
cloudsmith-api-0.52.5 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/spec_helper.rb
cloudsmith-api-0.52.0 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/spec_helper.rb
cloudsmith-api-0.51.93 vendor/bundle/ruby/2.3.0/gems/safe_yaml-1.0.5/spec/spec_helper.rb
cloudsmith-api-0.51.38 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/spec_helper.rb
cloudsmith-api-0.51.37 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/spec_helper.rb
cloudsmith-api-0.51.34 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/spec_helper.rb
cloudsmith-api-0.51.22 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/spec_helper.rb
vagrant-unbundled-2.2.9.0 vendor/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/spec/spec_helper.rb
vagrant-unbundled-2.2.8.0 vendor/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/spec/spec_helper.rb
cloudsmith-api-0.49.118 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/spec_helper.rb
cloudsmith-api-0.49.98 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/spec_helper.rb
cloudsmith-api-0.49.94 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/spec_helper.rb
cloudsmith-api-0.49.21 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/spec_helper.rb
cloudsmith-api-0.49.15 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/spec/spec_helper.rb