rj_schema 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1a69f6b3d192c21c9ec108ddac23ab6a7d5360ffc50be83414a5ed751216e47
4
- data.tar.gz: 939bd3f2fc82b77df0c35f11d7e9345782875d909e38f042ffe7a9c8d8426d65
3
+ metadata.gz: 19eb83cc4006b11ecda8501708b451b4cfe400e16647c500767d55529036d6c6
4
+ data.tar.gz: 89d3ff306e51a50b0126d37fa5497b2bf0b8412410c0085e5cd2d888678b6b9c
5
5
  SHA512:
6
- metadata.gz: 1607700248a092bd5dcce95a4966f2d761eede35403e8178b0166df15507ff35a29932c2e1b03e41fe12c4e0c46b71fca8237330a89e72274c8db3d16425fa29
7
- data.tar.gz: 63d7e7300d82bf026736496e45c0066c95fe73e9d6ee1f48f323c4f19693860f19a6963dc66c3669ecaccfae83f60a64d86e2a875b83342eb566a01c0d945d22
6
+ metadata.gz: 70bdd94dabed8771fc19638d574301d57087b3dc06a681552c6a03fbec59427af11ee5a14c1f115f850f37acbbd6ca8c27892d4b15f9eac01878db2354b9f3e6
7
+ data.tar.gz: 0154d872a12749c5cd3740db0cb82001e1e0fcce4aa930fdd40e1f76cfafcb07f0e46efdec72c6cbb63d295a2ba3a44b681b2c02d86bd7e1ed063a19dd183750
@@ -81,7 +81,7 @@ VALUE perform_validation(VALUE self, VALUE schema_arg, VALUE document_arg, bool
81
81
  if (SYMBOL_P(schema_arg)) {
82
82
  auto it = schema_manager->collection.find(SYM2ID(schema_arg));
83
83
  if (it == schema_manager->collection.end())
84
- rb_raise(rb_eArgError, "schema not found");
84
+ rb_raise(rb_eArgError, "schema not found: %s", rb_id2name(SYM2ID(schema_arg)));
85
85
  return validate(it->second);
86
86
  }
87
87
  else {
@@ -95,7 +95,7 @@ VALUE perform_validation(VALUE self, VALUE schema_arg, VALUE document_arg, bool
95
95
  }
96
96
  }
97
97
  catch (const std::invalid_argument& e) {
98
- rb_raise(rb_eArgError, e.what());
98
+ rb_raise(rb_eArgError, "%s", e.what());
99
99
  }
100
100
  }
101
101
 
@@ -131,7 +131,7 @@ extern "C" int validator_initialize_load_schema(VALUE key, VALUE value, VALUE in
131
131
  );
132
132
  }
133
133
  catch (const std::invalid_argument& e) {
134
- rb_raise(rb_eArgError, e.what());
134
+ rb_raise(rb_eArgError, "%s", e.what());
135
135
  }
136
136
 
137
137
  return ST_CONTINUE;
data/lib/rj_schema.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'json'
2
2
 
3
3
  class RjSchema
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.3'
5
5
  end
6
6
 
7
7
  require 'rj_schema/rj_schema'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rj_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Semmler