commit 7cc4663bd1389615c5dc978370efb99083f9778d
parent aa3fccfc40e7c6e1808312f7b22d605c76361956
Author: Gaute Hope <eg@gaute.vetsj.com>
Date: Tue, 18 Mar 2014 13:42:09 +0100
migrate psych: deprecate migration script
as old YAML support is getting worse the psych-migration script
for old config files are getting deprecated. for now, while
the migration still works on ruby 1.9 and 2.0 we keep it. but not
necessarily untill these rubies are depreacted.
fixes #266.
Diffstat:
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/bin/sup-psych-ify-config-files b/bin/sup-psych-ify-config-files
@@ -5,6 +5,11 @@ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
require "sup"
require "fileutils"
+if RUBY_VERSION >= "2.1"
+ puts "YAML migration is deprecated by Ruby 2.1 and newer."
+ exit
+end
+
Redwood.start
fn = Redwood::SOURCE_FN
diff --git a/test/test_yaml_migration.rb b/test/test_yaml_migration.rb
@@ -3,6 +3,7 @@ require "test_helper"
require "sup"
require "psych"
+if RUBY_VERSION <= "2.1"
describe "Sup's YAML util" do
describe "Module#yaml_properties" do
def build_class_with_name name, &b
@@ -78,3 +79,7 @@ id: ID
end
end
end
+
+else
+ puts "Some YAML tests are skipped on Ruby 2.1.0 and newer."
+end