render_editorjs 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -4
- data/Gemfile.lock +57 -60
- data/lib/render_editorjs/document.rb +9 -5
- data/lib/render_editorjs/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70958a4aa391506a171a21c19c0dc622d71b8c4d20ccea533e5195445b2f2290
|
4
|
+
data.tar.gz: 7f339e18a8dc6c1408f302f4717f8a8acb456b11a49a741c44baa81db77ec6e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 072e1bf0f815425b558abb6659bc4df969ee789bb945da12cb3d0f248c617c03e9e72ae474172db2f397124dc7dce1bfdf318e484f5a6658854cd9e319c5b1ba
|
7
|
+
data.tar.gz: 9efba794b2981662105fd6c44d6a609a669c8f15dae28ce19be8564af5413d25e68b5fc7b9d6539a354c92258f2b2945ca9fecdcd4073c59f0352a1b80202d2c
|
data/Gemfile
CHANGED
@@ -12,8 +12,8 @@ gem "minitest-focus"
|
|
12
12
|
gem "minitest-line"
|
13
13
|
gem "minitest-reporters"
|
14
14
|
gem "rake", "~> 12.0"
|
15
|
-
gem "rubocop", "
|
16
|
-
gem "rubocop-minitest", require: false
|
17
|
-
gem "rubocop-performance", require: false
|
18
|
-
gem "rubocop-thread_safety", require: false
|
15
|
+
gem "rubocop", "1.22.3", require: false
|
16
|
+
gem "rubocop-minitest", "0.15.2", require: false
|
17
|
+
gem "rubocop-performance", "1.12.0", require: false
|
18
|
+
gem "rubocop-thread_safety", "0.4.4", require: false
|
19
19
|
gem "simplecov", require: false
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
render_editorjs (0.1.
|
4
|
+
render_editorjs (0.1.5)
|
5
5
|
actionview (>= 4)
|
6
6
|
json-schema (>= 2)
|
7
7
|
sanitize (>= 6.0.0)
|
@@ -10,40 +10,31 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
actionview (
|
14
|
-
activesupport (=
|
13
|
+
actionview (6.1.7.7)
|
14
|
+
activesupport (= 6.1.7.7)
|
15
15
|
builder (~> 3.1)
|
16
|
-
erubi (~> 1.
|
17
|
-
rails-dom-testing (~> 2.
|
18
|
-
rails-html-sanitizer (~> 1.
|
19
|
-
activesupport (
|
20
|
-
base64
|
21
|
-
bigdecimal
|
16
|
+
erubi (~> 1.4)
|
17
|
+
rails-dom-testing (~> 2.0)
|
18
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
19
|
+
activesupport (6.1.7.7)
|
22
20
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
23
|
-
connection_pool (>= 2.2.5)
|
24
|
-
drb
|
25
21
|
i18n (>= 1.6, < 2)
|
26
22
|
minitest (>= 5.1)
|
27
|
-
mutex_m
|
28
23
|
tzinfo (~> 2.0)
|
29
|
-
|
24
|
+
zeitwerk (~> 2.3)
|
25
|
+
addressable (2.8.6)
|
30
26
|
public_suffix (>= 2.0.2, < 6.0)
|
31
27
|
ansi (1.5.0)
|
32
28
|
ast (2.4.2)
|
33
|
-
base64 (0.2.0)
|
34
|
-
bigdecimal (3.1.4)
|
35
29
|
builder (3.2.4)
|
36
30
|
coderay (1.1.3)
|
37
|
-
concurrent-ruby (1.2.
|
38
|
-
connection_pool (2.4.1)
|
31
|
+
concurrent-ruby (1.2.3)
|
39
32
|
crass (1.0.6)
|
40
33
|
docile (1.4.0)
|
41
|
-
drb (2.2.0)
|
42
|
-
ruby2_keywords
|
43
34
|
erubi (1.12.0)
|
44
|
-
ffi (1.
|
45
|
-
formatador (
|
46
|
-
guard (2.18.
|
35
|
+
ffi (1.16.3)
|
36
|
+
formatador (1.1.0)
|
37
|
+
guard (2.18.1)
|
47
38
|
formatador (>= 0.2.4)
|
48
39
|
listen (>= 2.7, < 4.0)
|
49
40
|
lumberjack (>= 1.0.12, < 2.0)
|
@@ -56,57 +47,61 @@ GEM
|
|
56
47
|
guard-minitest (2.4.6)
|
57
48
|
guard-compat (~> 1.2)
|
58
49
|
minitest (>= 3.0)
|
59
|
-
i18n (1.14.
|
50
|
+
i18n (1.14.5)
|
60
51
|
concurrent-ruby (~> 1.0)
|
61
|
-
json-schema (
|
62
|
-
addressable (>= 2.
|
63
|
-
listen (3.
|
52
|
+
json-schema (4.3.0)
|
53
|
+
addressable (>= 2.8)
|
54
|
+
listen (3.9.0)
|
64
55
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
65
56
|
rb-inotify (~> 0.9, >= 0.9.10)
|
66
57
|
loofah (2.22.0)
|
67
58
|
crass (~> 1.0.2)
|
68
59
|
nokogiri (>= 1.12.0)
|
69
|
-
lumberjack (1.2.
|
70
|
-
method_source (1.
|
71
|
-
minitest (5.
|
72
|
-
minitest-focus (1.
|
60
|
+
lumberjack (1.2.10)
|
61
|
+
method_source (1.1.0)
|
62
|
+
minitest (5.20.0)
|
63
|
+
minitest-focus (1.4.0)
|
73
64
|
minitest (>= 4, < 6)
|
74
65
|
minitest-line (0.6.5)
|
75
66
|
minitest (~> 5.0)
|
76
|
-
minitest-reporters (1.
|
67
|
+
minitest-reporters (1.6.1)
|
77
68
|
ansi
|
78
69
|
builder
|
79
70
|
minitest (>= 5.0)
|
80
71
|
ruby-progressbar
|
81
|
-
mutex_m (0.2.0)
|
82
72
|
nenv (0.3.0)
|
83
|
-
nokogiri (1.
|
73
|
+
nokogiri (1.16.7-aarch64-linux)
|
74
|
+
racc (~> 1.4)
|
75
|
+
nokogiri (1.16.7-arm64-darwin)
|
76
|
+
racc (~> 1.4)
|
77
|
+
nokogiri (1.16.7-x86_64-linux)
|
84
78
|
racc (~> 1.4)
|
85
79
|
notiffany (0.1.3)
|
86
80
|
nenv (~> 0.1)
|
87
81
|
shellany (~> 0.0)
|
88
|
-
parallel (1.
|
89
|
-
parser (3.
|
82
|
+
parallel (1.24.0)
|
83
|
+
parser (3.3.1.0)
|
90
84
|
ast (~> 2.4.1)
|
91
|
-
|
85
|
+
racc
|
86
|
+
pry (0.14.2)
|
92
87
|
coderay (~> 1.1)
|
93
88
|
method_source (~> 1.0)
|
94
|
-
public_suffix (
|
89
|
+
public_suffix (4.0.7)
|
95
90
|
racc (1.7.3)
|
96
91
|
rails-dom-testing (2.2.0)
|
97
92
|
activesupport (>= 5.0.0)
|
98
93
|
minitest
|
99
94
|
nokogiri (>= 1.6)
|
100
|
-
rails-html-sanitizer (1.
|
101
|
-
loofah (~> 2.
|
102
|
-
|
103
|
-
rainbow (3.0.0)
|
95
|
+
rails-html-sanitizer (1.5.0)
|
96
|
+
loofah (~> 2.19, >= 2.19.1)
|
97
|
+
rainbow (3.1.1)
|
104
98
|
rake (12.3.3)
|
105
|
-
rb-fsevent (0.11.
|
99
|
+
rb-fsevent (0.11.2)
|
106
100
|
rb-inotify (0.10.1)
|
107
101
|
ffi (~> 1.0)
|
108
|
-
regexp_parser (2.
|
109
|
-
rexml (3.
|
102
|
+
regexp_parser (2.9.2)
|
103
|
+
rexml (3.3.6)
|
104
|
+
strscan
|
110
105
|
rubocop (1.22.3)
|
111
106
|
parallel (~> 1.10)
|
112
107
|
parser (>= 3.0.0.0)
|
@@ -116,8 +111,8 @@ GEM
|
|
116
111
|
rubocop-ast (>= 1.12.0, < 2.0)
|
117
112
|
ruby-progressbar (~> 1.7)
|
118
113
|
unicode-display_width (>= 1.4.0, < 3.0)
|
119
|
-
rubocop-ast (1.
|
120
|
-
parser (>= 3.
|
114
|
+
rubocop-ast (1.17.0)
|
115
|
+
parser (>= 3.1.1.0)
|
121
116
|
rubocop-minitest (0.15.2)
|
122
117
|
rubocop (>= 0.90, < 2.0)
|
123
118
|
rubocop-performance (1.12.0)
|
@@ -125,26 +120,28 @@ GEM
|
|
125
120
|
rubocop-ast (>= 0.4.0)
|
126
121
|
rubocop-thread_safety (0.4.4)
|
127
122
|
rubocop (>= 0.53.0)
|
128
|
-
ruby-progressbar (1.
|
129
|
-
|
130
|
-
sanitize (6.0.2)
|
123
|
+
ruby-progressbar (1.13.0)
|
124
|
+
sanitize (6.1.0)
|
131
125
|
crass (~> 1.0.2)
|
132
126
|
nokogiri (>= 1.12.0)
|
133
127
|
shellany (0.0.1)
|
134
|
-
simplecov (0.
|
128
|
+
simplecov (0.22.0)
|
135
129
|
docile (~> 1.1)
|
136
130
|
simplecov-html (~> 0.11)
|
137
131
|
simplecov_json_formatter (~> 0.1)
|
138
132
|
simplecov-html (0.12.3)
|
139
|
-
simplecov_json_formatter (0.1.
|
140
|
-
|
133
|
+
simplecov_json_formatter (0.1.4)
|
134
|
+
strscan (3.1.0)
|
135
|
+
thor (1.2.2)
|
141
136
|
tzinfo (2.0.6)
|
142
137
|
concurrent-ruby (~> 1.0)
|
143
|
-
unicode-display_width (2.
|
144
|
-
zeitwerk (2.6.
|
138
|
+
unicode-display_width (2.5.0)
|
139
|
+
zeitwerk (2.6.14)
|
145
140
|
|
146
141
|
PLATFORMS
|
147
|
-
|
142
|
+
aarch64-linux
|
143
|
+
arm64-darwin-22
|
144
|
+
x86_64-linux
|
148
145
|
|
149
146
|
DEPENDENCIES
|
150
147
|
guard
|
@@ -155,11 +152,11 @@ DEPENDENCIES
|
|
155
152
|
minitest-reporters
|
156
153
|
rake (~> 12.0)
|
157
154
|
render_editorjs!
|
158
|
-
rubocop (
|
159
|
-
rubocop-minitest
|
160
|
-
rubocop-performance
|
161
|
-
rubocop-thread_safety
|
155
|
+
rubocop (= 1.22.3)
|
156
|
+
rubocop-minitest (= 0.15.2)
|
157
|
+
rubocop-performance (= 1.12.0)
|
158
|
+
rubocop-thread_safety (= 0.4.4)
|
162
159
|
simplecov
|
163
160
|
|
164
161
|
BUNDLED WITH
|
165
|
-
2.
|
162
|
+
2.4.22
|
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
module RenderEditorjs
|
4
4
|
class Document
|
5
|
+
include ActionView::Helpers::OutputSafetyHelper
|
6
|
+
|
5
7
|
attr_reader :renderer, :content, :errors
|
6
8
|
|
7
9
|
def initialize(content, renderer = RenderEditorjs::DefaultRenderer.new)
|
@@ -21,12 +23,14 @@ module RenderEditorjs
|
|
21
23
|
def render
|
22
24
|
return "" unless valid_renderer?
|
23
25
|
|
24
|
-
|
25
|
-
|
26
|
-
|
26
|
+
safe_join(
|
27
|
+
content["blocks"].map do |block|
|
28
|
+
block_renderer = block_renderers(block["type"])
|
29
|
+
next unless block_renderer
|
27
30
|
|
28
|
-
|
29
|
-
|
31
|
+
block_renderer.render(block["data"])
|
32
|
+
end.compact
|
33
|
+
)
|
30
34
|
end
|
31
35
|
|
32
36
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: render_editorjs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- José Galisteo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
119
|
- !ruby/object:Gem::Version
|
120
120
|
version: '0'
|
121
121
|
requirements: []
|
122
|
-
rubygems_version: 3.
|
122
|
+
rubygems_version: 3.5.9
|
123
123
|
signing_key:
|
124
124
|
specification_version: 4
|
125
125
|
summary: A modular and customizable Ruby renderer for https://editorjs.io
|