rust_json_schema 0.1.1-x86_64-linux-musl → 0.1.2-x86_64-linux-musl

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: dbea30f580d213d6a069cea19b1ab7c0bce035d03c92620bc3f2ea55cca628fd
4
- data.tar.gz: 5fc0aba79c39dfa1ae850f030e92f65fe83d69df80cbb9f867760261019bb21f
3
+ metadata.gz: c110023e8e147bd03dc700e4da4b2a6f4c566d95fe89e2ab80a62dc43249e623
4
+ data.tar.gz: 54c1c74b9c3768f090e35d6799a5728d2b5b07dfd18ee41a1b606d3a72a2ed4f
5
5
  SHA512:
6
- metadata.gz: 77017f0ffc19fd611fc34d61fed2ec33bc962c2b9861473bc78e60d8874f5912902152f6d88e7928dc8985b4ffcdaa3910dfd930b4e827e9a8d6ef9b0ccd2d29
7
- data.tar.gz: 4e3323738b5247e3c78e3d5dde0e8b3319bd5920b62d6df416bee45440be2b7b73865e7c95a54d28f749170906aa31384c9e9fa4ea753b0d0014e7c9a95b54aa
6
+ metadata.gz: cc3f0bd411ec8b0c951c1a314f3439d9fe92b515d50f2aa1a49ca056eec8971231eef47693d5a8bcb1dece8d929bbcef2cbdc0b8c85b5b9304996f5c35a6ad1d
7
+ data.tar.gz: 7f04a0325223e342e8fe6dcbe208e642f009559c8f1d14261cc7df21f8ae7b86bd0e54e5171e314687d452caf782671d6280d8e6bcbd6d19d04f6a0abd5d598a
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: x86_64-linux-musl
6
6
  authors:
7
7
  - Taylor Thurlow