Hello community,

here is the log from the commit of package rubygem-json-schema-2_2 for 
openSUSE:Factory checked in at 2018-01-06 18:49:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-json-schema-2_2 (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-json-schema-2_2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-json-schema-2_2"

Sat Jan  6 18:49:51 2018 rev:2 rq:561796 version:2.2.5

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/rubygem-json-schema-2_2/rubygem-json-schema-2_2.changes
  2015-11-11 10:30:10.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.rubygem-json-schema-2_2.new/rubygem-json-schema-2_2.changes
     2018-01-06 18:49:57.233087986 +0100
@@ -1,0 +2,6 @@
+Thu Jan  4 12:35:31 UTC 2018 - [email protected]
+
+- update to upstream version 2.2.5 (bsc#1074669) 
+  * Made uri format escape special characters before parsing
+
+-------------------------------------------------------------------

Old:
----
  json-schema-2.2.4.gem

New:
----
  json-schema-2.2.5.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-json-schema-2_2.spec ++++++
--- /var/tmp/diff_new_pack.Cdn4jL/_old  2018-01-06 18:49:57.981053038 +0100
+++ /var/tmp/diff_new_pack.Cdn4jL/_new  2018-01-06 18:49:57.985052851 +0100
@@ -1,7 +1,7 @@
 #
-# spec file for package rubygem-json-schema
+# spec file for package rubygem-json-schema-2_2
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-json-schema-2_2
-Version:        2.2.4
+Version:        2.2.5
 Release:        0
 %define mod_name json-schema
 %define mod_full_name %{mod_name}-%{version}

++++++ json-schema-2.2.4.gem -> json-schema-2.2.5.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.textile new/README.textile
--- old/README.textile  1970-01-01 01:00:00.000000000 +0100
+++ new/README.textile  1970-01-01 01:00:00.000000000 +0100
@@ -24,7 +24,7 @@
 
 <pre>
 $ gem build json-schema.gemspec
-$ gem install json-schema-2.2.4.gem
+$ gem install json-schema-2.2.5.gem
 </pre>
 
 
@@ -78,7 +78,7 @@
 
 h3. Strictly validate an object's properties
 
-With the <code>:strict</code>code> option, validation fails when an object 
contains properties that are not defined in the schema's property list or 
doesn't match the <code>additionalProperties</code> property. Furthermore, all 
properties are treated as <code>required</code> by default.
+With the <code>:strict</code> option, validation fails when an object contains 
properties that are not defined in the schema's property list or doesn't match 
the <code>additionalProperties</code> property. Furthermore, all properties are 
treated as <code>required</code> by default.
 
 <pre>
 require 'rubygems'
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/json-schema/attributes/format.rb 
new/lib/json-schema/attributes/format.rb
--- old/lib/json-schema/attributes/format.rb    1970-01-01 01:00:00.000000000 
+0100
+++ new/lib/json-schema/attributes/format.rb    1970-01-01 01:00:00.000000000 
+0100
@@ -107,7 +107,7 @@
           if data.is_a?(String)
             error_message = "The property '#{build_fragment(fragments)}' must 
be a valid URI"
             begin
-              URI.parse(data)
+              URI.parse(URI.escape(data))
             rescue URI::InvalidURIError
               validation_error(processor, error_message, fragments, 
current_schema, self, options[:record_errors])
             end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        1970-01-01 01:00:00.000000000 +0100
+++ new/metadata        1970-01-01 01:00:00.000000000 +0100
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: json-schema
 version: !ruby/object:Gem::Version
-  version: 2.2.4
+  version: 2.2.5
 platform: ruby
 authors:
 - Kenny Hoxworth
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2014-07-19 00:00:00.000000000 Z
+date: 2014-09-05 00:00:00.000000000 Z
 dependencies: []
 description: 
 email: [email protected]
@@ -88,6 +88,7 @@
 - test/test_ruby_schema.rb
 - test/test_schema_type_attribute.rb
 - test/test_schema_validation.rb
+- test/test_suite.rb
 - test/data/all_of_ref_data.json
 - test/data/any_of_ref_data.json
 - test/data/bad_data_1.json
@@ -153,6 +154,7 @@
 - test/test_ruby_schema.rb
 - test/test_schema_type_attribute.rb
 - test/test_schema_validation.rb
+- test/test_suite.rb
 - test/data/all_of_ref_data.json
 - test/data/any_of_ref_data.json
 - test/data/bad_data_1.json
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/test/test_jsonschema_draft3.rb 
new/test/test_jsonschema_draft3.rb
--- old/test/test_jsonschema_draft3.rb  1970-01-01 01:00:00.000000000 +0100
+++ new/test/test_jsonschema_draft3.rb  1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'test/unit'
 require File.dirname(__FILE__) + '/../lib/json-schema'
 
@@ -1092,6 +1093,7 @@
   def test_format_uri
     data1 = {"a" => "http://gitbuh.com"}
     data2 = {"a" => "::boo"}
+    data3 = {"a" => "http://ja.wikipedia.org/wiki/メインページ"}
 
     schema = {
         "$schema" => "http://json-schema.org/draft-03/schema#";,
@@ -1101,6 +1103,7 @@
 
     assert(JSON::Validator.validate(schema,data1))
     assert(!JSON::Validator.validate(schema,data2))
+    assert(JSON::Validator.validate(schema,data3))
   end
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/test/test_jsonschema_draft4.rb 
new/test/test_jsonschema_draft4.rb
--- old/test/test_jsonschema_draft4.rb  1970-01-01 01:00:00.000000000 +0100
+++ new/test/test_jsonschema_draft4.rb  1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'test/unit'
 require File.dirname(__FILE__) + '/../lib/json-schema'
 
@@ -1011,6 +1012,7 @@
   def test_format_uri
     data1 = {"a" => "http://gitbuh.com"}
     data2 = {"a" => "::boo"}
+    data3 = {"a" => "http://ja.wikipedia.org/wiki/メインページ"}
 
     schema = {
         "$schema" => "http://json-schema.org/draft-04/schema#";,
@@ -1020,6 +1022,7 @@
 
     assert(JSON::Validator.validate(schema,data1))
     assert(!JSON::Validator.validate(schema,data2))
+    assert(JSON::Validator.validate(schema,data3))
   end
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/test/test_suite.rb new/test/test_suite.rb
--- old/test/test_suite.rb      1970-01-01 01:00:00.000000000 +0100
+++ new/test/test_suite.rb      1970-01-01 01:00:00.000000000 +0100
@@ -0,0 +1,71 @@
+require 'test/unit'
+require File.dirname(__FILE__) + '/../lib/json-schema'
+
+class SuiteTest < Test::Unit::TestCase
+  def test_draft_4
+       print "\n\nDRAFT-04 SUITE TESTS\n"
+       print     "--------------------\n"
+       tests = 0
+       passes = 0
+       Dir.glob(File.dirname(__FILE__) + "/suite/tests/draft4/*.json").each do 
|file_path|
+               data = JSON.parse(File.read(file_path))
+               data.each do |test_desc|
+                       puts "Suite Test: #{test_desc["description"]}"
+                       test_desc["tests"].each do |test|
+                               tests = tests + 1
+                               print " - #{test["description"]}: "
+                               begin
+                                               if 
JSON::Validator.validate(test_desc["schema"], test["data"], :version => 
:draft4) == test["valid"]
+                                                       puts green("pass")
+                                                       passes = passes + 1
+                                       else
+                                               puts "#{red("fail")} - expected 
#{test["valid"]}, got #{JSON::Validator.validate(test_desc["schema"], 
test["data"], :version => :draft4)}"
+                                       end
+                               rescue
+                                               puts "#{red("fail")} - 
exception thrown"
+                               end
+                       end
+               end
+       end
+  end
+
+  def test_draft_3
+       print "\n\nDRAFT-03 SUITE TESTS\n"
+       print     "--------------------\n"
+
+       tests = 0
+       passes = 0
+       Dir.glob(File.dirname(__FILE__) + "/suite/tests/draft3/*.json").each do 
|file_path|
+               data = JSON.parse(File.read(file_path))
+               data.each do |test_desc|
+                       puts "Suite Test: #{test_desc["description"]}"
+                       test_desc["tests"].each do |test|
+                               tests = tests + 1
+                               print " - #{test["description"]}: "
+                               begin
+                                               if 
JSON::Validator.validate(test_desc["schema"], test["data"], :version => 
:draft3) == test["valid"]
+                                                       puts green("pass")
+                                                       passes = passes + 1
+                                       else
+                                               puts "#{red("fail")} - expected 
#{test["valid"]}, got #{JSON::Validator.validate(test_desc["schema"], 
test["data"], :version => :draft3)}"
+                                       end
+                               rescue
+                                               puts "#{red("fail")} - 
exception thrown"
+                               end
+                       end
+               end
+       end
+  end
+
+  def colorize(color_code,text)
+    "\e[#{color_code}m#{text}\e[0m"
+  end
+
+  def red(text)
+    colorize(31,text)
+  end
+
+  def green(text)
+    colorize(32,text)
+  end
+end
\ No newline at end of file


Reply via email to