klaro-client 0.5.6 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/klaro/client/support/md_text.rb +11 -20
- data/lib/klaro/client/version.rb +2 -2
- data/lib/klaro/client.rb +1 -1
- metadata +26 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42126059ba59e044d7d25c44aa0a9d86769071ffcea570c564b7e9ddaa0b92c8
|
4
|
+
data.tar.gz: 0af95727702d75a8a7830b920efcd36b43def5642461b46aed86419b9ca71e16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a99dbe5bcfba816260d8e68a0174ab48f688b00fa28b98356060fb34ab32e96b97694c402477347b81cb01b56d10fa6f7df0efb2da3d470678fc49ca303ae4f5
|
7
|
+
data.tar.gz: b360ded9145f755cca8249181ffd65eb5c5ee103b061b70ee439ee9703e79262c2f1cf58ae734487ee7e88b47c08c88cf9f914094eb29454bf6721450e528aa2
|
@@ -3,37 +3,28 @@ module Klaro
|
|
3
3
|
class MdText
|
4
4
|
|
5
5
|
SHARED_OPTIONS = {
|
6
|
-
|
7
|
-
no_links: false,
|
8
|
-
no_styles: true,
|
9
|
-
safe_links_only: true,
|
10
|
-
with_toc_data: false
|
11
|
-
}
|
12
|
-
|
13
|
-
VARIANTS = {
|
14
|
-
:summary => Redcarpet::Markdown.new(
|
15
|
-
Redcarpet::Render::HTML.new(SHARED_OPTIONS.merge({
|
16
|
-
hard_wrap: true,
|
17
|
-
}))
|
18
|
-
),
|
19
|
-
:details => Redcarpet::Markdown.new(
|
20
|
-
Redcarpet::Render::HTML.new(SHARED_OPTIONS.merge({
|
21
|
-
hard_wrap: false,
|
22
|
-
}))
|
23
|
-
)
|
6
|
+
unsafe: false,
|
24
7
|
}
|
25
8
|
|
26
9
|
def initialize(src, variant)
|
27
10
|
@src = src
|
28
|
-
@
|
11
|
+
@variant = variant
|
29
12
|
end
|
30
13
|
|
31
14
|
def to_s
|
32
15
|
@src
|
33
16
|
end
|
34
17
|
|
18
|
+
def render_options
|
19
|
+
SHARED_OPTIONS.merge({
|
20
|
+
hardbreaks: (@variant == :summary)
|
21
|
+
})
|
22
|
+
end
|
23
|
+
|
35
24
|
def to_html
|
36
|
-
|
25
|
+
Commonmarker.to_html(to_s, options: {
|
26
|
+
render: render_options
|
27
|
+
}).strip.gsub(/<a href/, '<a target="_blank" href')
|
37
28
|
end
|
38
29
|
|
39
30
|
end # class MdText
|
data/lib/klaro/client/version.rb
CHANGED
data/lib/klaro/client.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: klaro-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- enspirit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|
@@ -28,30 +28,42 @@ dependencies:
|
|
28
28
|
name: http
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '5.0'
|
34
|
+
- - "<"
|
32
35
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
36
|
+
version: '6.0'
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
|
-
- - "
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '5.0'
|
44
|
+
- - "<"
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
46
|
+
version: '6.0'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
48
|
+
name: commonmarker
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
|
-
- - "
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0.26'
|
54
|
+
- - "<"
|
46
55
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
56
|
+
version: '1.0'
|
48
57
|
type: :runtime
|
49
58
|
prerelease: false
|
50
59
|
version_requirements: !ruby/object:Gem::Requirement
|
51
60
|
requirements:
|
52
|
-
- - "
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0.26'
|
64
|
+
- - "<"
|
53
65
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
66
|
+
version: '1.0'
|
55
67
|
- !ruby/object:Gem::Dependency
|
56
68
|
name: i18n
|
57
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,14 +84,14 @@ dependencies:
|
|
72
84
|
requirements:
|
73
85
|
- - "~>"
|
74
86
|
- !ruby/object:Gem::Version
|
75
|
-
version: '2.
|
87
|
+
version: '2.1'
|
76
88
|
type: :development
|
77
89
|
prerelease: false
|
78
90
|
version_requirements: !ruby/object:Gem::Requirement
|
79
91
|
requirements:
|
80
92
|
- - "~>"
|
81
93
|
- !ruby/object:Gem::Version
|
82
|
-
version: '2.
|
94
|
+
version: '2.1'
|
83
95
|
- !ruby/object:Gem::Dependency
|
84
96
|
name: rspec
|
85
97
|
requirement: !ruby/object:Gem::Requirement
|
@@ -148,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
160
|
- !ruby/object:Gem::Version
|
149
161
|
version: '0'
|
150
162
|
requirements: []
|
151
|
-
rubygems_version: 3.
|
163
|
+
rubygems_version: 3.3.26
|
152
164
|
signing_key:
|
153
165
|
specification_version: 4
|
154
166
|
summary: Klaro Client
|