asciidoctor-json-value-loader 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor-json-value-loader.rb +3 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f42153124059073f5c20cadd6d3852a9059d4f89942917614902285f389bc03c
|
4
|
+
data.tar.gz: a82a3c5bb0d44202b11d571581a4c233435b09af8f96971e625f59049b77ad8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37a37322e6d10e5a367a3e33399342dfa9b17dac40f6a6221add0e8797383d12c20f7e8836e70cfd702f85bfc5956e2bc67043245b9623c0da00eadb26b63f5e
|
7
|
+
data.tar.gz: a75835618b1a14c60c5cba15672b1c8107fa3e73f2cf67a1009b571cd2b7c477eb47185058bceb2d67427704a261667f41d6f9f41243b165a7f684b44ef43177
|
@@ -3,6 +3,8 @@ require 'json'
|
|
3
3
|
require 'uri'
|
4
4
|
|
5
5
|
class JsonValueLoadInlineMacro < Asciidoctor::Extensions::InlineMacroProcessor
|
6
|
+
include Asciidoctor::Logging
|
7
|
+
|
6
8
|
use_dsl
|
7
9
|
|
8
10
|
named "json-value"
|
@@ -24,6 +26,7 @@ class JsonValueLoadInlineMacro < Asciidoctor::Extensions::InlineMacroProcessor
|
|
24
26
|
json = JSON.parse(File.open(path, 'r:utf-8', &:read))
|
25
27
|
|
26
28
|
content = json.dig(*query)
|
29
|
+
parent.logger.warn "json-value-loader: #{target} has no value." if content.nil?
|
27
30
|
|
28
31
|
content = case content
|
29
32
|
when String
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asciidoctor-json-value-loader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- msr1k
|
@@ -24,7 +24,9 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
description:
|
27
|
+
description: |
|
28
|
+
Adds asciidoctor a funcitons to load specific JSON value from JSON file
|
29
|
+
(See: https://github.com/msr1k/asciidoctor-json-value-loader)
|
28
30
|
email: msr0210@gmail.com
|
29
31
|
executables: []
|
30
32
|
extensions: []
|
@@ -53,5 +55,5 @@ requirements: []
|
|
53
55
|
rubygems_version: 3.4.22
|
54
56
|
signing_key:
|
55
57
|
specification_version: 4
|
56
|
-
summary: An asciidoctor extention to load specific JSON value
|
58
|
+
summary: An asciidoctor extention to load specific JSON value.
|
57
59
|
test_files: []
|