rust_json_schema 0.1.1-aarch64-linux → 0.1.2-aarch64-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: bc0d1d89d06d56189e6ae402e52d0114f4e03a05d8b65b7c9b92961550392573
4
- data.tar.gz: 2561b7015ba95725795bab2f886178a1e44ad833c4d0fadfeef78e264a72bcb2
3
+ metadata.gz: b0b3e12b6f6e00db3410f03030c8f3f1d122ee67622aa3e4fe40145a2591bcfa
4
+ data.tar.gz: bd4a64760f85b38bcf0601e22037ab9cf391414378e72a8edb97558e3ed7e604
5
5
  SHA512:
6
- metadata.gz: 8c171fdce19c3e8ac2ad5a8c53b0282cf249cfacc07010b8acfd7f176cdfa8c35b496523afec86f2849749bb4b798bf743085093ef283e49b790807eb386b3e6
7
- data.tar.gz: 511eba6f08483820257ec63abdfbdd09d00259a623b5a1fb8e3df4b750fd198c6110c7de295bb321e43ab325c03d90970a584b6971d17dd6d1d3e632c395aac5
6
+ metadata.gz: f37d55cf171b4c3fc92ae8f79fe2710d021bae267aaaff46fe32247c8fa66f4ff01e810da45eba902d47337538db911fc920ba978a9444f2c90239f08103c738
7
+ data.tar.gz: 0e57a35a246e2ed9178988b7d9a9152c5c6d7868dab8c58cfc719bd02e784eff4cc84f67e55aff689d9149a468cd8ca75f742c99b40f356d9f57746daa1bc695
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: aarch64-linux
6
6
  authors:
7
7
  - Taylor Thurlow