asciidoctor-diagram 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -25,15 +25,15 @@ shaape::shaape.txt[format="png"]
25
25
  d = load_asciidoc doc
26
26
  expect(d).to_not be_nil
27
27
 
28
- b = d.find { |b| b.context == :image }
28
+ b = d.find { |bl| bl.context == :image }
29
29
  expect(b).to_not be_nil
30
30
 
31
31
  expect(b.content_model).to eq :empty
32
32
 
33
33
  target = b.attributes['target']
34
34
  expect(target).to_not be_nil
35
- expect(target).to match /\.png$/
36
- expect(File.exists?(target)).to be true
35
+ expect(target).to match(/\.png$/)
36
+ expect(File.exist?(target)).to be true
37
37
 
38
38
  expect(b.attributes['width']).to_not be_nil
39
39
  expect(b.attributes['height']).to_not be_nil
@@ -62,15 +62,15 @@ Doc Writer <doc@example.com>
62
62
  d = load_asciidoc doc
63
63
  expect(d).to_not be_nil
64
64
 
65
- b = d.find { |b| b.context == :image }
65
+ b = d.find { |bl| bl.context == :image }
66
66
  expect(b).to_not be_nil
67
67
 
68
68
  expect(b.content_model).to eq :empty
69
69
 
70
70
  target = b.attributes['target']
71
71
  expect(target).to_not be_nil
72
- expect(target).to match /\.png$/
73
- expect(File.exists?(target)).to be true
72
+ expect(target).to match(/\.png$/)
73
+ expect(File.exist?(target)).to be true
74
74
 
75
75
  expect(b.attributes['width']).to_not be_nil
76
76
  expect(b.attributes['height']).to_not be_nil
@@ -97,15 +97,15 @@ Doc Writer <doc@example.com>
97
97
  d = load_asciidoc doc
98
98
  expect(d).to_not be_nil
99
99
 
100
- b = d.find { |b| b.context == :image }
100
+ b = d.find { |bl| bl.context == :image }
101
101
  expect(b).to_not be_nil
102
102
 
103
103
  expect(b.content_model).to eq :empty
104
104
 
105
105
  target = b.attributes['target']
106
106
  expect(target).to_not be_nil
107
- expect(target).to match /\.svg/
108
- expect(File.exists?(target)).to be true
107
+ expect(target).to match(/\.svg/)
108
+ expect(File.exist?(target)).to be true
109
109
 
110
110
  expect(b.attributes['width']).to_not be_nil
111
111
  expect(b.attributes['height']).to_not be_nil
@@ -123,7 +123,7 @@ Doc Writer <doc@example.com>
123
123
  ----
124
124
  eos
125
125
 
126
- expect { load_asciidoc doc }.to raise_error /support.*format/i
126
+ expect { load_asciidoc doc }.to raise_error(/support.*format/i)
127
127
  end
128
128
 
129
129
  it "should not regenerate images when source has not changed" do
@@ -158,7 +158,7 @@ shaape::shaape.txt
158
158
  eos
159
159
 
160
160
  d = load_asciidoc doc
161
- b = d.find { |b| b.context == :image }
161
+ b = d.find { |bl| bl.context == :image }
162
162
  expect(b).to_not be_nil
163
163
  target = b.attributes['target']
164
164
  mtime1 = File.mtime(target)
@@ -195,7 +195,7 @@ shaape::shaape.txt[]
195
195
  eos
196
196
 
197
197
  load_asciidoc doc
198
- expect(File.exists?('shaape.png')).to be true
198
+ expect(File.exist?('shaape.png')).to be true
199
199
  end
200
200
 
201
201
  it "should respect target attribute in block macros" do
@@ -221,8 +221,8 @@ shaape::shaape.txt["foobaz"]
221
221
  eos
222
222
 
223
223
  load_asciidoc doc
224
- expect(File.exists?('foobar.png')).to be true
225
- expect(File.exists?('foobaz.png')).to be true
226
- expect(File.exists?('shaape.png')).to be false
224
+ expect(File.exist?('foobar.png')).to be true
225
+ expect(File.exist?('foobaz.png')).to be true
226
+ expect(File.exist?('shaape.png')).to be false
227
227
  end
228
228
  end
@@ -8,6 +8,7 @@ require 'tmpdir'
8
8
  require_relative '../lib/asciidoctor-diagram'
9
9
  require_relative '../lib/asciidoctor-diagram/blockdiag/extension'
10
10
  require_relative '../lib/asciidoctor-diagram/ditaa/extension'
11
+ require_relative '../lib/asciidoctor-diagram/erd/extension'
11
12
  require_relative '../lib/asciidoctor-diagram/graphviz/extension'
12
13
  require_relative '../lib/asciidoctor-diagram/meme/extension'
13
14
  require_relative '../lib/asciidoctor-diagram/mermaid/extension'
@@ -62,20 +63,24 @@ RSpec.configure do |c|
62
63
  c.filter_run_excluding :broken_on_windows => true
63
64
  end
64
65
 
66
+ if ENV['TRAVIS']
67
+ c.filter_run_excluding :broken_on_travis => true
68
+ end
69
+
65
70
  TEST_DIR = File.expand_path('testing')
66
71
 
67
72
  c.before(:suite) do
68
- FileUtils.rm_r TEST_DIR if Dir.exists? TEST_DIR
73
+ FileUtils.rm_r TEST_DIR if Dir.exist? TEST_DIR
69
74
  FileUtils.mkdir_p TEST_DIR
70
75
  end
71
76
 
72
77
  c.around(:each) do |example|
73
78
  metadata = example.metadata
74
79
  group_dir = File.expand_path(metadata[:example_group][:full_description].gsub(/[^\w]+/, '_'), TEST_DIR)
75
- Dir.mkdir(group_dir) unless Dir.exists?(group_dir)
80
+ FileUtils.mkdir_p(group_dir) unless Dir.exist?(group_dir)
76
81
 
77
82
  test_dir = File.expand_path(metadata[:description].gsub(/[^\w]+/, '_'), group_dir)
78
- Dir.mkdir(test_dir)
83
+ FileUtils.mkdir_p(test_dir) unless Dir.exist?(test_dir)
79
84
 
80
85
  Dir.chdir(test_dir) do
81
86
  example.run
@@ -24,15 +24,15 @@ wavedrom::wavedrom.txt[format="png"]
24
24
  d = load_asciidoc doc
25
25
  expect(d).to_not be_nil
26
26
 
27
- b = d.find { |b| b.context == :image }
27
+ b = d.find { |bl| bl.context == :image }
28
28
  expect(b).to_not be_nil
29
29
 
30
30
  expect(b.content_model).to eq :empty
31
31
 
32
32
  target = b.attributes['target']
33
33
  expect(target).to_not be_nil
34
- expect(target).to match /\.png$/
35
- expect(File.exists?(target)).to be true
34
+ expect(target).to match(/\.png$/)
35
+ expect(File.exist?(target)).to be true
36
36
 
37
37
  expect(b.attributes['width']).to_not be_nil
38
38
  expect(b.attributes['height']).to_not be_nil
@@ -53,15 +53,15 @@ wavedrom::wavedrom.txt[format="svg"]
53
53
  d = load_asciidoc doc
54
54
  expect(d).to_not be_nil
55
55
 
56
- b = d.find { |b| b.context == :image }
56
+ b = d.find { |bl| bl.context == :image }
57
57
  expect(b).to_not be_nil
58
58
 
59
59
  expect(b.content_model).to eq :empty
60
60
 
61
61
  target = b.attributes['target']
62
62
  expect(target).to_not be_nil
63
- expect(target).to match /\.svg/
64
- expect(File.exists?(target)).to be true
63
+ expect(target).to match(/\.svg/)
64
+ expect(File.exist?(target)).to be true
65
65
 
66
66
  expect(b.attributes['width']).to_not be_nil
67
67
  expect(b.attributes['height']).to_not be_nil
@@ -85,15 +85,15 @@ Doc Writer <doc@example.com>
85
85
  d = load_asciidoc doc
86
86
  expect(d).to_not be_nil
87
87
 
88
- b = d.find { |b| b.context == :image }
88
+ b = d.find { |bl| bl.context == :image }
89
89
  expect(b).to_not be_nil
90
90
 
91
91
  expect(b.content_model).to eq :empty
92
92
 
93
93
  target = b.attributes['target']
94
94
  expect(target).to_not be_nil
95
- expect(target).to match /\.png$/
96
- expect(File.exists?(target)).to be true
95
+ expect(target).to match(/\.png$/)
96
+ expect(File.exist?(target)).to be true
97
97
 
98
98
  expect(b.attributes['width']).to_not be_nil
99
99
  expect(b.attributes['height']).to_not be_nil
@@ -115,15 +115,15 @@ Doc Writer <doc@example.com>
115
115
  d = load_asciidoc doc
116
116
  expect(d).to_not be_nil
117
117
 
118
- b = d.find { |b| b.context == :image }
118
+ b = d.find { |bl| bl.context == :image }
119
119
  expect(b).to_not be_nil
120
120
 
121
121
  expect(b.content_model).to eq :empty
122
122
 
123
123
  target = b.attributes['target']
124
124
  expect(target).to_not be_nil
125
- expect(target).to match /\.svg/
126
- expect(File.exists?(target)).to be true
125
+ expect(target).to match(/\.svg/)
126
+ expect(File.exist?(target)).to be true
127
127
 
128
128
  expect(b.attributes['width']).to_not be_nil
129
129
  expect(b.attributes['height']).to_not be_nil
@@ -141,7 +141,7 @@ Doc Writer <doc@example.com>
141
141
  ----
142
142
  eos
143
143
 
144
- expect { load_asciidoc doc }.to raise_error /support.*format/i
144
+ expect { load_asciidoc doc }.to raise_error(/support.*format/i)
145
145
  end
146
146
 
147
147
  it "should not regenerate images when source has not changed" do
@@ -162,7 +162,7 @@ wavedrom::wavedrom.txt
162
162
  eos
163
163
 
164
164
  d = load_asciidoc doc
165
- b = d.find { |b| b.context == :image }
165
+ b = d.find { |bl| bl.context == :image }
166
166
  expect(b).to_not be_nil
167
167
  target = b.attributes['target']
168
168
  mtime1 = File.mtime(target)
@@ -190,7 +190,7 @@ wavedrom::wavedrom.txt[]
190
190
  eos
191
191
 
192
192
  load_asciidoc doc
193
- expect(File.exists?('wavedrom.png')).to be true
193
+ expect(File.exist?('wavedrom.png')).to be true
194
194
  end
195
195
 
196
196
  it "should respect target attribute in block macros" do
@@ -207,8 +207,8 @@ wavedrom::wavedrom.txt["foobaz"]
207
207
  eos
208
208
 
209
209
  load_asciidoc doc
210
- expect(File.exists?('foobar.png')).to be true
211
- expect(File.exists?('foobaz.png')).to be true
212
- expect(File.exists?('wavedrom.png')).to be false
210
+ expect(File.exist?('foobar.png')).to be true
211
+ expect(File.exist?('foobaz.png')).to be true
212
+ expect(File.exist?('wavedrom.png')).to be false
213
213
  end
214
214
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-diagram
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pepijn Van Eeckhoudt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-13 00:00:00.000000000 Z
11
+ date: 2016-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -90,6 +90,8 @@ files:
90
90
  - lib/asciidoctor-diagram/blockdiag/extension.rb
91
91
  - lib/asciidoctor-diagram/ditaa.rb
92
92
  - lib/asciidoctor-diagram/ditaa/extension.rb
93
+ - lib/asciidoctor-diagram/erd.rb
94
+ - lib/asciidoctor-diagram/erd/extension.rb
93
95
  - lib/asciidoctor-diagram/extensions.rb
94
96
  - lib/asciidoctor-diagram/graphviz.rb
95
97
  - lib/asciidoctor-diagram/graphviz/extension.rb
@@ -103,6 +105,7 @@ files:
103
105
  - lib/asciidoctor-diagram/shaape.rb
104
106
  - lib/asciidoctor-diagram/shaape/extension.rb
105
107
  - lib/asciidoctor-diagram/util/binaryio.rb
108
+ - lib/asciidoctor-diagram/util/cli.rb
106
109
  - lib/asciidoctor-diagram/util/cli_generator.rb
107
110
  - lib/asciidoctor-diagram/util/gif.rb
108
111
  - lib/asciidoctor-diagram/util/java.rb
@@ -119,6 +122,7 @@ files:
119
122
  - lib/plantuml.jar
120
123
  - spec/blockdiag_spec.rb
121
124
  - spec/ditaa_spec.rb
125
+ - spec/erd_spec.rb
122
126
  - spec/graphviz_spec.rb
123
127
  - spec/man.jpg
124
128
  - spec/meme_spec.rb
@@ -147,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
151
  version: '0'
148
152
  requirements: []
149
153
  rubyforge_project:
150
- rubygems_version: 2.4.7
154
+ rubygems_version: 2.5.1
151
155
  signing_key:
152
156
  specification_version: 4
153
157
  summary: An extension for asciidoctor that adds support for UML diagram generation
@@ -155,6 +159,7 @@ summary: An extension for asciidoctor that adds support for UML diagram generati
155
159
  test_files:
156
160
  - spec/blockdiag_spec.rb
157
161
  - spec/ditaa_spec.rb
162
+ - spec/erd_spec.rb
158
163
  - spec/graphviz_spec.rb
159
164
  - spec/man.jpg
160
165
  - spec/meme_spec.rb
@@ -163,4 +168,3 @@ test_files:
163
168
  - spec/shaape_spec.rb
164
169
  - spec/test_helper.rb
165
170
  - spec/wavedrom_spec.rb
166
- has_rdoc: