rust_json_schema 0.1.1-arm-linux → 0.1.2-arm-linux

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: 8f422049544619170cd38d18de349ab4d32a5e6714474b7fd4c1e87e6a3ae82c
4
- data.tar.gz: 69d23a30a9a43a730312f996827a0b108473622f2cabe636b59311519eb1b9ac
3
+ metadata.gz: ec81504fc422c661c84ca4a6b5fb5b76204ae2e834b669d34451300fda649171
4
+ data.tar.gz: 223730207a47253059905b714f6a31a3d436d20a9c202eaec710ee1525472c2d
5
5
  SHA512:
6
- metadata.gz: 1dbb51b2d4628c56474a57c30bb98cc23a6e96050d3d661c2626ba083bce7d99ff1de1d8168d4bff7e0dce9adb3f0ad2c33c89227e56fef9c9f5bcdfb5426358
7
- data.tar.gz: e55b9fd7f6df2a6f252c7f0922bb5f230974f4ee39fc45f9efac6893e0b62501ca701277df1a39583a168d43721c871bd6f31a06da5110ee8c5fda1aa05b700f
6
+ metadata.gz: e483044dff4b5e61c319777eba7a73c3f68ca2866875914f039a623b1d55f967636d2256fbb00fe9df7d8ef4040048e3d2e03f49a25c300912c0963de8537d85
7
+ data.tar.gz: 26e8204f90deea2d61539a9edb352d3f32183b9dfb1f3a64a34a889704d7e3c2e07a8840caf4ae68f2251a6d72f95b56c9358aaa7df9fa6532893213bd30f0a4
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: arm-linux
6
6
  authors:
7
7
  - Taylor Thurlow