crust_json_encoder 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Cargo.toml +1 -1
- data/crust_json_encoder.gemspec +1 -1
- data/lib/crust_json_encoder.rb +8 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 858a9b4ee2616bfcdd64ca612daeed3fab47fe39a2bc194eab2e6d86d7531801
|
4
|
+
data.tar.gz: 42df5958b6f47b4868bb4532cab0152cafcbc9b727fc383758310c901a893100
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64b93c45e97890a4a439c3f9bf3918bc07f4cd62140c968e4344613d90e291b6189a6e028ba5fcefc78774bbe6364bf413e93f234ab19defd27a30d68e3a3e3e
|
7
|
+
data.tar.gz: 9b7f80f904c951766e7b40392eed4e1c866ef9b40619ebdeb2c51922b3c7513b10046d6342e25cfe61d9758e2118f00ecdc92eb73106bd829c89bd4b3060081b
|
data/Cargo.toml
CHANGED
data/crust_json_encoder.gemspec
CHANGED
@@ -5,7 +5,7 @@ Gem::Specification.new do |spec|
|
|
5
5
|
spec.name = "crust_json_encoder"
|
6
6
|
spec.authors = ["Yuji Yaginuma"]
|
7
7
|
spec.email = ["yuuji.yaginuma@gmail.com"]
|
8
|
-
spec.version = "0.0.
|
8
|
+
spec.version = "0.0.6"
|
9
9
|
spec.homepage = "https://github.com/y-yagi/crust_json_encoder"
|
10
10
|
|
11
11
|
spec.summary = %q{CrustJSONEncoder is a JSON encoder for Ruby on Rails.}
|
data/lib/crust_json_encoder.rb
CHANGED
@@ -1,9 +1,16 @@
|
|
1
1
|
require "rutie"
|
2
2
|
require "active_support"
|
3
3
|
require "active_support/json"
|
4
|
+
require "thermite/config"
|
4
5
|
|
5
6
|
class CrustJSONEncoder < ActiveSupport::JSON::Encoding::JSONGemEncoder
|
6
|
-
|
7
|
+
LIB_PATH = begin
|
8
|
+
toplevel_dir = File.dirname(__dir__)
|
9
|
+
config = Thermite::Config.new(cargo_project_path: toplevel_dir, ruby_project_path: toplevel_dir)
|
10
|
+
config.ruby_path("lib")
|
11
|
+
end
|
12
|
+
|
13
|
+
Rutie.new(:native, lib_path: LIB_PATH, lib_prefix: nil).init "Init_native", __dir__
|
7
14
|
|
8
15
|
private
|
9
16
|
|