[DRE-commits] [kwalify] 05/05: [patch] String#to_a is no more, but String#lines fills the gap

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 c3d04cb8e378b60a9ab69689f9c0c9e7b89f05d8
Author: Marc Dequènes (Duck) <Duck at DuckCorp.org>
Date:   Tue Aug 4 23:06:49 2015 +0200

    [patch] String#to_a is no more, but String#lines fills the gap
---
 debian/changelog                         |  1 +
 debian/patches/proper_string_split.patch | 26 ++++++++++++++++++++++++++
 debian/patches/series                    |  1 +
 3 files changed, 28 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 86c654f..04fd895 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ kwalify (0.7.2-3) UNRELEASED; urgency=medium
   * Added patch to fix missing quoting in test data.
   * Added patch to fix hash manipulation in the metavalidator test.
   * Added patch to remove broken test data.
+  * Added patch to fix string conversion into array of lines.
 
  -- Marc Dequènes (Duck) <Duck at DuckCorp.org>  Tue, 04 Aug 2015 21:33:19 +0200
 
diff --git a/debian/patches/proper_string_split.patch b/debian/patches/proper_string_split.patch
new file mode 100644
index 0000000..66938b8
--- /dev/null
+++ b/debian/patches/proper_string_split.patch
@@ -0,0 +1,26 @@
+Index: kwalify/lib/kwalify/yaml-parser.rb
+===================================================================
+--- kwalify.orig/lib/kwalify/yaml-parser.rb
++++ kwalify/lib/kwalify/yaml-parser.rb
+@@ -34,7 +34,7 @@ module Kwalify
+ 
+ 
+     def initialize(yaml_str)
+-      @lines = yaml_str.to_a()
++      @lines = yaml_str.lines
+       @line  = nil
+       @linenum = 0
+       @anchors = {}
+Index: kwalify/test/test-validator.rb
+===================================================================
+--- kwalify.orig/test/test-validator.rb
++++ kwalify/test/test-validator.rb
+@@ -80,7 +80,7 @@ class ValidatorTest < Test::Unit::TestCa
+   def _test_by_syck_parser(validator, input, expected)
+     document = YAML.load(input)
+     error_list  = validator.validate(document)
+-    expected = expected.to_a.sort.join()
++    expected = expected.lines.sort.join()
+     actual = error_list.collect { |e|
+       "%-20s: [%s] %s\n" % [e.error_symbol.inspect, e.path, e.message]
+     }.sort.join()
diff --git a/debian/patches/series b/debian/patches/series
index 155caa5..7bcb4ed 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ yaml_deprecated.patch
 yaml_tests_quoting_fix.patch
 test-metavalidator_hash_manip_fix.patch
 broken_test_documents_removal.patch
+proper_string_split.patch

-- 
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