rust_json_schema 0.1.1-arm64-darwin → 0.1.2-arm64-darwin

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c78f754cbf9a832065380089b256a7490eeed9055f73d2fe4c9d7e5ad3d8bcd
4
- data.tar.gz: 3d97da65a4c16ecd1e1ce1fe754341d4c8b044f3c0cf56670c2d34cda48aab19
3
+ metadata.gz: e071a597053b0e709baae4719ca6de095657b3d4fe635c44b07c36e00879c015
4
+ data.tar.gz: baece35ff6afc75b6547cd7790bc6598af5eb98744385e9645041d5623f531b3
5
5
  SHA512:
6
- metadata.gz: 7dde2510dddcd9df910143a6cbb61e9fc5135d12fafb5d2e037178ad001e8f58bac45ff97cd934341337a3d805e89fa5994cd6ccb26af037f4d4979dd295c277
7
- data.tar.gz: 58bbdda390024b61d841978e3adb2e4ec722aa122fb6bc8809168a5d2bd8fbb664fdc9616d4a82d65a605b4f934be8b2313bc54d81fc9752078370e0507ffb82
6
+ metadata.gz: bce22196836f4c152515c2bb4353d27699b529cbd2484a4d56b67c0b1a31898461ac819e180339e430310d519d8d1e5d8e1a15c997f77c6717bfe6b910164d2c
7
+ data.tar.gz: bc9b097cd38092a0796b9d971ef8b40b6430dd50b53ab91333583280146c7676068139dddafd8fb41fac9c0c8b1e88854c0162e4bd862fffd684ba8129832c5a
data/README.md CHANGED
@@ -1,14 +1,16 @@
1
1
  # `rust_json_schema`
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/rust_json_schema.svg)](https://rubygems.org/gems/rust_json_schema)
4
+
3
5
  `rust_json_schema` is a Ruby wrapper gem for Rust's [jsonschema-rs crate](https://github.com/Stranger6667/jsonschema-rs).
4
6
 
7
+ This gem ships with precompiled binaries for Linux and macOS. Check the available gems on [Rubygems](https://rubygems.org/gems/rust_json_schema).
8
+
5
9
  ## Warning
6
10
 
7
11
  I do not have any significant Rust programming experience, but this gem satisifies a need for a performant JSON Schema validation tool in Ruby land. While I intend to use this gem in a production environment, consider this code and library entirely experimental, at least until a 1.0 release, if it ever comes to that.
8
12
 
9
- [rusty_json_schema](https://github.com/driv3r/rusty_json_schema) is a direct source of inspiration (and in some cases, literal copy and paste, like some fixtures/specs). Now that [bundler has explicit support for rust-backed Ruby gems](https://bundler.io/blog/2023/01/31/rust-gem-skeleton.html) as of early 2023, the Rust library code is a lot simpler that it previously needed to be, largely thanks to [magnus crate](https://github.com/matsadler/magnus) and the [rb-sys gem](https://github.com/oxidize-rb/rb-sys/tree/main/gem).
10
-
11
- Eventually I intend to ship common platform binaries as part of this gem, eliminating the need for a Rust toolchain on client machines, but that is not yet the case.
13
+ [rusty_json_schema](https://github.com/driv3r/rusty_json_schema) is a direct source of inspiration (and in some cases, literal copy and paste, like some fixtures/specs). Now that [bundler has explicit support for rust-backed Ruby gems](https://bundler.io/blog/2023/01/31/rust-gem-skeleton.html) as of early 2023, the Rust library code is a lot simpler that it previously needed to be, largely thanks to [magnus crate](https://github.com/matsadler/magnus) and the [rb-sys gem](https://github.com/oxidize-rb/rb-sys/tree/main/gem), and by extension, the [oxidize-rb team](https://github.com/oxidize-rb).
12
14
 
13
15
  ## Installation
14
16
 
@@ -28,9 +30,9 @@ validator = RustJSONSchema::Validator.new(<<~JSON)
28
30
  "properties": {
29
31
  "foo": { "type": "string" },
30
32
  "bar": { "type": "integer" },
31
- "baz": {},
33
+ "baz": {}
32
34
  },
33
- "required": ["foo", "baz"],
35
+ "required": ["foo", "baz"]
34
36
  }
35
37
  JSON
36
38
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RustJSONSchema
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
@@ -2,14 +2,6 @@
2
2
 
3
3
  require_relative "rust_json_schema/version"
4
4
 
5
- # Tries to require the extension for the given Ruby version first
6
- begin
7
- RUBY_VERSION =~ /(\d+\.\d+)/
8
- require "rust_json_schema/#{Regexp.last_match(1)}/rust_json_schema"
9
- rescue LoadError
10
- require_relative "rust_json_schema/rust_json_schema"
11
- end
12
-
13
5
  module RustJSONSchema
14
6
  class Error < StandardError; end
15
7
 
@@ -17,3 +9,11 @@ module RustJSONSchema
17
9
 
18
10
  class SchemaParseError < Error; end
19
11
  end
12
+
13
+ # Tries to require the extension for the given Ruby version first
14
+ begin
15
+ RUBY_VERSION =~ /(\d+\.\d+)/
16
+ require "rust_json_schema/#{Regexp.last_match(1)}/rust_json_schema"
17
+ rescue LoadError
18
+ require_relative "rust_json_schema/rust_json_schema"
19
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rust_json_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Taylor Thurlow