[DRE-commits] [kwalify] 03/03: [patch] Config class already exist in Ruby (even if obsoleted by RbConfig)

Marc Dequènes duck at moszumanska.debian.org
Wed Aug 5 01:01:12 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 93dfa53f0b05c5fa16870e9bf10fda6bc08fe28a
Author: Marc Dequènes (Duck) <Duck at DuckCorp.org>
Date:   Wed Aug 5 01:44:29 2015 +0200

    [patch] Config class already exist in Ruby (even if obsoleted by RbConfig)
---
 debian/changelog                                |  1 +
 debian/patches/series                           |  1 +
 debian/patches/test_config_class_conflict.patch | 65 +++++++++++++++++++++++++
 3 files changed, 67 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index e61f9c7..2a52bb6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ kwalify (0.7.2-3) UNRELEASED; urgency=medium
   * Added patch to fix string conversion into array of lines.
   * Added patch to fix several path problems in tests.
   * Added patch to fix tests temporary directory creation and cleanup.
+  * Added patch to fix 'Config' class conflict in tests.
 
  -- 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 3932ee0..5433cb3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ broken_test_documents_removal.patch
 proper_string_split.patch
 test_paths_fix.patch
 test_fix_tmpdir.patch
+test_config_class_conflict.patch
diff --git a/debian/patches/test_config_class_conflict.patch b/debian/patches/test_config_class_conflict.patch
new file mode 100644
index 0000000..0f749d4
--- /dev/null
+++ b/debian/patches/test_config_class_conflict.patch
@@ -0,0 +1,65 @@
+Index: kwalify/test/data/users-guide/config.schema.yaml
+===================================================================
+--- kwalify.orig/test/data/users-guide/config.schema.yaml
++++ kwalify/test/data/users-guide/config.schema.yaml
+@@ -1,5 +1,5 @@
+ type:  map
+-class: Config
++class: MyConfig
+ mapping:
+  "host": { type: str, required: true }
+  "port": { type: int }
+Index: kwalify/test/data/users-guide/loadconfig.rb
+===================================================================
+--- kwalify.orig/test/data/users-guide/loadconfig.rb
++++ kwalify/test/data/users-guide/loadconfig.rb
+@@ -1,6 +1,6 @@
+ ## class definition
+ require 'kwalify/util/hashlike'
+-class Config
++class MyConfig
+   include Kwalify::Util::HashLike  # defines [], []=, and keys?
+   attr_accessor :host, :posrt, :user, :pass
+ end
+Index: kwalify/test/data/users-guide/loadconfig.result
+===================================================================
+--- kwalify.orig/test/data/users-guide/loadconfig.result
++++ kwalify/test/data/users-guide/loadconfig.result
+@@ -1,5 +1,5 @@
+ $ ruby loadconfig.rb
+-#<Config:
++#<MyConfig:
+  @host="localhost",
+  @pass="password1",
+  @port=8080,
+Index: kwalify/test/test-databinding.yaml
+===================================================================
+--- kwalify.orig/test/test-databinding.yaml
++++ kwalify/test/test-databinding.yaml
+@@ -305,7 +305,7 @@
+   desc:  default value
+   schema: |
+ 	type: map
+-	class: Config
++	class: MyConfig
+ 	mapping:
+ 	 "host":  {type: str, default: localhost}
+ 	 "port":  {type: int, default: 80}
+@@ -315,7 +315,7 @@
+   classdef*:
+    "ruby": |
+ 	require 'kwalify/util/hashlike'
+-	class Config
++	class MyConfig
+ 	  include Kwalify::Util::HashLike
+ 	  def initialize
+ 	    @host = 'localhost'
+@@ -331,7 +331,7 @@
+ 	pass:  password1
+   expected*:
+    "ruby": |
+-	#<Config:0x001
++	#<MyConfig:0x001
+ 	 @host="localhost",
+ 	 @pass="password1",
+ 	 @port=8080,

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