[DRE-commits] [kwalify] 03/05: [patch] fix hash manipulation in 'test/test-metavalidator.rb' (can't add a new key into hash during iteration), causing FTBFS
Marc Dequènes
duck at moszumanska.debian.org
Tue Aug 4 21:07:19 UTC 2015
This is an automated email from the git hooks/post-receive script.
duck pushed a commit to branch master
in repository kwalify.
commit 5f0fd2b84177477423c488d35f1bbc024e7c9862
Author: Marc Dequènes (Duck) <Duck at DuckCorp.org>
Date: Tue Aug 4 22:33:37 2015 +0200
[patch] fix hash manipulation in 'test/test-metavalidator.rb' (can't add a new key into hash during iteration), causing FTBFS
---
debian/changelog | 1 +
debian/patches/series | 1 +
debian/patches/test-metavalidator_hash_manip_fix.patch | 18 ++++++++++++++++++
3 files changed, 20 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 6049410..0282e33 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ kwalify (0.7.2-3) UNRELEASED; urgency=medium
* Added patch to fix using the deprecated YAML.load_documents method.
* Added patch to fix missing quoting in test data.
+ * Added patch to fix hash manipulation in the metavalidator test.
-- Marc Dequènes (Duck) <Duck at DuckCorp.org> Tue, 04 Aug 2015 21:33:19 +0200
diff --git a/debian/patches/series b/debian/patches/series
index 72c20bf..75e08ab 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
yaml_deprecated.patch
yaml_tests_quoting_fix.patch
+test-metavalidator_hash_manip_fix.patch
diff --git a/debian/patches/test-metavalidator_hash_manip_fix.patch b/debian/patches/test-metavalidator_hash_manip_fix.patch
new file mode 100644
index 0000000..5bd0cb9
--- /dev/null
+++ b/debian/patches/test-metavalidator_hash_manip_fix.patch
@@ -0,0 +1,18 @@
+Index: kwalify/test/test-metavalidator.rb
+===================================================================
+--- kwalify.orig/test/test-metavalidator.rb
++++ kwalify/test/test-metavalidator.rb
+@@ -13,9 +13,10 @@ class MetaValidatorTest < Test::Unit::Te
+ filename = __FILE__.sub(/\.rb$/, '.yaml')
+ load_yaml_documents(filename) do |ydoc|
+ name = ydoc['name']
+- ydoc.each do |key, val|
+- ydoc[$1] = val['ruby'] if key =~ /(.*)\*$/
+- end
++ ydoc.map do |key, val|
++ val = val['ruby'] if key =~ /(.*)\*$/
++ [key, val]
++ end.to_h
+ s = <<-END
+ def test_meta_#{name}
+ @name = #{ydoc['name'].inspect}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/kwalify.git
More information about the Pkg-ruby-extras-commits
mailing list