Description: remove use of ecma-re-validator (not yet packaged)
 Remove this patch when ecma-re-validator gem is packaged
Forwarded: not-needed
Author: Cédric Boutillier <boutil@debian.org>
Last-Update: 2018-11-18

--- a/test/json_schema/parser_test.rb
+++ b/test/json_schema/parser_test.rb
@@ -295,16 +295,16 @@ describe JsonSchema::Parser do
     assert parse
   end
 
-  it "errors for an invalid regex when asked to check" do
-    require 'ecma-re-validator'
-    JsonSchema.configure do |c|
-      c.validate_regex_with = :'ecma-re-validator'
-    end
-    schema_sample["pattern"] = "\\Ameow"
-    refute parse
-    assert_includes error_messages, '"\\\\Ameow" is not an ECMA-262 regular expression.'
-    assert_includes error_types, :regex_failed
-  end
+  #it "errors for an invalid regex when asked to check" do
+  #  require 'ecma-re-validator'
+  #  JsonSchema.configure do |c|
+  #    c.validate_regex_with = :'ecma-re-validator'
+  #  end
+  #  schema_sample["pattern"] = "\\Ameow"
+  #  refute parse
+  #  assert_includes error_messages, '"\\\\Ameow" is not an ECMA-262 regular expression.'
+  #  assert_includes error_types, :regex_failed
+  #end
 
   it "parses custom formats" do
     JsonSchema.configure do |c|
--- a/lib/json_schema/parser.rb
+++ b/lib/json_schema/parser.rb
@@ -248,10 +248,11 @@ module JsonSchema
     def parse_regex(schema, regex)
       case JsonSchema.configuration.validate_regex_with
       when :'ecma-re-validator'
-        unless EcmaReValidator.valid?(regex)
-          message = %{#{regex.inspect} is not an ECMA-262 regular expression.}
-          @errors << SchemaError.new(schema, message, :regex_failed)
-        end
+        message = "Ecma validation deactivated in Debian package"
+        #unless EcmaReValidator.valid?(regex)
+        #  message = %{#{regex.inspect} is not an ECMA-262 regular expression.}
+        #  @errors << SchemaError.new(schema, message, :regex_failed)
+        #end
       end
       Regexp.new(regex)
     end
