asciidoctor-plantuml 0.0.13 → 0.0.16

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: de8d640d579d7d3c4171db4f02210fbe508868d8c70de10d4ce1a622bc8b14b1
4
- data.tar.gz: a86d4afa322bf30c3f074c7c53e38dab0dcabf52df340ba685bae463143aa41f
3
+ metadata.gz: fe7b55f293e7f815c3107f7cb42b8118b2f5cbcc2d46ddc04c003c8e855ae2ff
4
+ data.tar.gz: ded1cc190a25eca2b172fc459a4f77d4f629e484f0112b5d1693686433d2197c
5
5
  SHA512:
6
- metadata.gz: 5e81d9655d877bc2d53492d954f08e7176e5c8da48eb0ac82d693368092684781fb173ae8b36baacab5f71f974d12596036c9dd6fccd3c3752a7ebcfcafe1384
7
- data.tar.gz: 69eba0374e2621ca0abbb100154fd8f4627e09bbd5192d09feea79315f16a7486309deb60c76042b174068b61de29ae6294d1ac001582391b8d03907dfea4422
6
+ metadata.gz: ce55a9ec6de14f336fb5330b2a0f5d9369236c8c213fa306a59ba0f14aaddab50a40412ffc3156b16bb6e742ba8b50238f4c06768e22b7def34eedea9d4da0e9
7
+ data.tar.gz: 9aa54dd2b91d173bf8225581bacb82cc2c6b2d8316ceea4f948959cb8696acb0f7f045b01c9f97a80c2476a3d7bc20fae75099c51936420c3763e581bc1bb379
@@ -3,7 +3,6 @@
3
3
  require 'uri'
4
4
  require 'open-uri'
5
5
  require 'zlib'
6
- require 'open-uri'
7
6
  require 'net/http'
8
7
 
9
8
  module Asciidoctor
@@ -11,8 +10,8 @@ module Asciidoctor
11
10
  module PlantUml
12
11
  # PlantUML Configuration
13
12
  class Configuration
14
- DEFAULT_URL = ENV['PLANTUML_URL'] || ''
15
- DEFAULT_ENCODING = ENV['PLANTUML_ENCODING'] || 'legacy'
13
+ DEFAULT_URL = ENV.fetch('PLANTUML_URL', '')
14
+ DEFAULT_ENCODING = ENV.fetch('PLANTUML_ENCODING', 'legacy')
16
15
 
17
16
  attr_accessor :url, :txt_enable, :svg_enable, :png_enable, :encoding
18
17
 
@@ -93,9 +92,7 @@ module Asciidoctor
93
92
 
94
93
  return plantuml_disabled_content(code, attrs) unless enabled?
95
94
 
96
- unless valid_uri?(server_url)
97
- return plantuml_server_unavailable_content(server_url, attrs)
98
- end
95
+ return plantuml_server_unavailable_content(server_url, attrs) unless valid_uri?(server_url)
99
96
 
100
97
  plantuml_content_format(code, format, attrs)
101
98
  end
@@ -249,11 +246,9 @@ module Asciidoctor
249
246
  end
250
247
 
251
248
  def expand_path(path, current, last, separator)
252
- path = path[1..-1] if path.start_with?(separator) && current.zero?
249
+ path = path[1..] if path.start_with?(separator) && current.zero?
253
250
 
254
- unless path.end_with?(separator) || current == last
255
- path = [path, separator]
256
- end
251
+ path = [path, separator] unless path.end_with?(separator) || current == last
257
252
 
258
253
  path
259
254
  end
@@ -270,9 +265,7 @@ module Asciidoctor
270
265
  def process(parent, target, attrs)
271
266
  lines = target.lines
272
267
 
273
- unless target.lines[0] =~ /@startuml/
274
- lines = ['@startuml'] + target.lines
275
- end
268
+ lines = ['@startuml'] + target.lines unless target.lines[0] =~ /@startuml/
276
269
 
277
270
  lines += ['@enduml'] unless target.lines[-1] =~ /@enduml/
278
271
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Asciidoctor
4
4
  module PlantUML
5
- VERSION = '0.0.13'
5
+ VERSION = '0.0.16'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-plantuml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Horacio Sanson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-09 00:00:00.000000000 Z
11
+ date: 2022-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.3'
19
+ version: '2.2'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.3'
26
+ version: '2.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.6'
33
+ version: 1.13.4
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.6'
40
+ version: 1.13.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,35 +58,35 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.7'
61
+ version: '1.28'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '1.7'
68
+ version: '1.28'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: test-unit
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '3.3'
75
+ version: '3.5'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '3.3'
82
+ version: '3.5'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: asciidoctor
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 1.5.6
89
+ version: 2.0.17
90
90
  - - "<"
91
91
  - !ruby/object:Gem::Version
92
92
  version: 3.0.0
@@ -96,7 +96,7 @@ dependencies:
96
96
  requirements:
97
97
  - - ">="
98
98
  - !ruby/object:Gem::Version
99
- version: 1.5.6
99
+ version: 2.0.17
100
100
  - - "<"
101
101
  - !ruby/object:Gem::Version
102
102
  version: 3.0.0
@@ -114,7 +114,8 @@ files:
114
114
  homepage: https://github.com/hsanson/asciidoctor-plantuml
115
115
  licenses:
116
116
  - MIT
117
- metadata: {}
117
+ metadata:
118
+ rubygems_mfa_required: 'true'
118
119
  post_install_message:
119
120
  rdoc_options: []
120
121
  require_paths:
@@ -123,7 +124,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
123
124
  requirements:
124
125
  - - ">="
125
126
  - !ruby/object:Gem::Version
126
- version: '2.3'
127
+ version: '2.6'
127
128
  required_rubygems_version: !ruby/object:Gem::Requirement
128
129
  requirements:
129
130
  - - ">="