wortsammler 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -136,6 +136,13 @@ The rakefile is in `<folder>/30_Sources/ZSUPP_Tools`
136
136
 
137
137
  Please use Ruby 1.9.3
138
138
 
139
+ - mac:
140
+ - installation requirex xcode with the commanline tools
141
+ - use Ruby Version Manager [https://rvm.io][]
142
+ - rvm install ruby_1.9.3
143
+ - might take pretty long depending on wha you have on your mac.
144
+ - after ruby is installed `gem install wortsammler`
145
+
139
146
  - windows
140
147
  - download von [http://rubyinstaller.org/downloads/][]
141
148
  - development kit installieren
@@ -144,12 +151,9 @@ Please use Ruby 1.9.3
144
151
  Das braucht man nur, wenn man den Windows-Debugger verwenden
145
152
  muss. In den scripten ist rquire ruby-debug aukommentiert.
146
153
 
147
- - mac: OSX 10.8 bereits installiert
148
-
149
154
  ### pandoc
150
155
 
151
- - Download [ttp://code.google.com/p/pandoc/downloads/list][]
152
- - Installation <http://rubyinstaller.org/downloads/>
156
+ - Download [http://code.google.com/p/pandoc/downloads/list][]
153
157
  - Homepage <http://johnmacfarlane.net/pandoc/>
154
158
 
155
159
  ### TeX
@@ -168,5 +172,4 @@ Please use Ruby 1.9.3
168
172
  [pandoc]: http://johnmacfarlane.net/pandoc/
169
173
  [http://rubyinstaller.org/downloads/]: http://rubyforge.org/frs/%20download.php/76277/rubyinstaller-1.8.7-p370.exe
170
174
  [DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe]: https://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe
171
- [ttp://code.google.com/p/pandoc/downloads/list]: http://code.google.com/p/pandoc/downloads/list
172
175
  [usbtex]: http://www.exomatik.net/U-Latex/USBTeXEnglish
data/changelog.md CHANGED
@@ -1,7 +1,15 @@
1
+ # 0.0.7 (17.07.2013)
2
+
3
+ - Added support to include plantuml diagrams where the diagram source
4
+ is embedded in the md file
5
+ - Added support to include Markdown files.This provides another (maybe
6
+ even more common) approach to collect a document from multiple
7
+ files.
8
+
1
9
  # 0.0.6 (07.07.2013)
2
10
 
3
11
  - Added initial support for Testreports
4
- <https://github.com/bwl21/wortsammler/issues/17>
12
+ <https://github.com/bwl21/wortsammler/issues/17>
5
13
 
6
14
  # 0.0.5
7
15
 
data/lib/wortsammler.rb CHANGED
@@ -106,6 +106,34 @@ module Wortsammler
106
106
  end
107
107
  end
108
108
 
109
+ #
110
+ # plantuml markdown files
111
+ #
112
+ #
113
+
114
+ if options[:plantuml]
115
+
116
+
117
+ # process path
118
+
119
+ if input_files then
120
+ Wortsammler.plantuml(input_files)
121
+ end
122
+
123
+ # process manifest
124
+
125
+ if config then
126
+ Wortsammler.plantuml(config.input)
127
+ end
128
+
129
+ unless input_files or config
130
+ $log.error "no input specified. Please use -m or -i to specify input"
131
+ exit false
132
+ end
133
+ end
134
+
135
+
136
+
109
137
  ##
110
138
  # process collect in markdown files
111
139
  #
@@ -187,6 +215,29 @@ module Wortsammler
187
215
  nil
188
216
  end
189
217
 
218
+
219
+ #
220
+ # plantuml a list of Documents
221
+ # @param paths [Array of String] Array of filenames which shall be converted.
222
+ #
223
+ # @return [Nil] no return
224
+ def self.plantuml(paths)
225
+
226
+ cleaner = PandocBeautifier.new($log)
227
+ plantumljar=File.dirname(__FILE__)+"/../resources/plantuml.jar"
228
+
229
+ paths.each{|f|
230
+ cmd = "java -jar \"#{plantumljar}\" -v \"#{f}\" 2>&1"
231
+ r=`#{cmd}`
232
+ no_of_images = r.split($/).grep(/Number of image/).first.split(":")[1]
233
+
234
+ $log.info("#{no_of_images} uml diagram(s) in #{File.basename(f)}")
235
+ $log.info(r) unless $?.success?
236
+ }
237
+ nil
238
+ end
239
+
240
+
190
241
  #
191
242
  # process the documents according to the maanifest
192
243
  #
@@ -305,7 +356,7 @@ module Wortsammler
305
356
  # check duplicates
306
357
  duplicates=all_traceable_set.duplicate_traces
307
358
  if duplicates.count > 0
308
- $logger.warn "duplicated trace ids found:"
359
+ $log.warn "duplicated trace ids found:"
309
360
  duplicates.each{|d| d.each{|t| $log.warn "#{t.id} in #{t.info}"}}
310
361
  end
311
362
 
@@ -363,8 +414,8 @@ module Wortsammler
363
414
  # @return [Boolean] true if successful. otherwise exits the program
364
415
  def self.verify_options(options)
365
416
  if options[:inputpath] or options[:manifest] then
366
- unless options[:process] or options[:beautify] or options[:collect] then
367
- $log.error "no procesing option (p, b, c) specified"
417
+ unless options[:process] or options[:beautify] or options[:collect] or options[:plantuml] then
418
+ $log.error "no procesing option (p, b, c, u) specified"
368
419
  exit false
369
420
  end
370
421
  end
@@ -37,7 +37,7 @@ TRACE_REF_PATTERN = /->\[(\w+_\w+_\w+)\]/
37
37
  # pageclearance
38
38
  INCLUDE_PDF_PATTERN = /^\s+~~PDF\s+"(.+)" \s+ "(.+)" \s* (\d*) \s* (\d+-\d+)? \s* (clearpage|cleardoublepage)?~~/x
39
39
 
40
- INCLUDE_MD_PATTERN = /^\s+~~MD\s+"(.+)" \s+ "(.+)" \s* (\d*) \s* (\d+-\d+)? \s* (clearpage|cleardoublepage)?~~/x
40
+ INCLUDE_MD_PATTERN = /(\s*)~~MD\s+"(.+)"~~/x
41
41
 
42
42
  SNIPPET_PATTERN = /(\s*)~~SN \s+ (\w+)~~/x
43
43
 
@@ -45,6 +45,8 @@ EMBEDDED_IMAGE_PATTERN = /~~EMBED\s+ "(.+)" \s+ (r|l|i|o) \s+ (.+) \s+ (.+)~~/
45
45
 
46
46
  EXPECTED_RESULT_PATTERN = /(^\s*)~~~~\s*\{.expectedResult\s+label=\"([A-Za-z]+_[A-Za-z]+_[0-9]+)\"}\s([^~]*)~~~~/x
47
47
 
48
+ PLANTUML_PATTERN = /[~]{4,}\s+{\.plantuml}\s+@startuml\s+([^\n]+)(\s+title\s+([^\n]+))?[^~]+[~]{4,}/x
49
+
48
50
  #
49
51
  # This mixin convertes a file path to the os Path representation
50
52
  # todo maybe replace this by a builtin ruby stuff such as "pathname"
@@ -111,22 +113,22 @@ class ReferenceTweaker
111
113
 
112
114
 
113
115
  j="00"
114
- result << result_items.map{|i|
116
+ result << result_items.map{|i|
115
117
  j = j.next
116
118
  "\\CheckBox[name=#{label}_#{j}]{} #{i}"
117
- }
119
+ }
118
120
  result << "\\vspace{1em}"
119
121
  result << "\\ChoiceMenu[combo, name=#{label}_98]{Test execution:}{ok, fail, pending}"
120
122
  result << "\\vspace{1em}"
121
123
  result << ["\\TextField[ name=#{label}_99 , width=40em, height=2cm, multiline=true, bordercolor={1 1 1}] {}"]
122
124
  result << ["\\end{Form}"]
123
125
 
124
- unless $1.nil? then
125
- leading_whitespace=$1.split("\n",100)
126
- leading_lines=leading_whitespace[0..-1].join("\n")
127
- leading_spaces=leading_whitespace.last || ""
128
- replacetext=leading_lines+replacetext_raw.gsub("\n", "\n#{leading_spaces}")
129
- end
126
+ unless $1.nil? then
127
+ leading_whitespace=$1.split("\n",100)
128
+ leading_lines=leading_whitespace[0..-1].join("\n")
129
+ leading_spaces=leading_whitespace.last || ""
130
+ replacetext=leading_lines+replacetext_raw.gsub("\n", "\n#{leading_spaces}")
131
+ end
130
132
 
131
133
  result=result.compact.flatten.map{|i|"#{indent}#{i}"}
132
134
  result.join("\n#{indent}\n")
@@ -144,6 +146,36 @@ class ReferenceTweaker
144
146
  trace.gsub("_", "\\_")
145
147
  end
146
148
 
149
+
150
+
151
+ #
152
+ # This replaces markdown inlays
153
+ # it is a subroutine which is called
154
+ # recursively
155
+ # todo: handle indentation
156
+ #
157
+ # @param text [String] text in which the markdown inlays shall be processed
158
+ # @return [String] The resulting text
159
+ def replace_md_inlay(text)
160
+ text.gsub!(INCLUDE_MD_PATTERN){|m|
161
+ if File.exist?($2) then
162
+ replacetext_raw=File.open($2).read
163
+ unless $1.nil? then
164
+ leading_whitespace=$1.split("\n",100)
165
+ leading_lines=leading_whitespace[0..-1].join("\n")
166
+ leading_spaces=leading_whitespace.last || ""
167
+ replacetext=leading_lines+replacetext_raw.gsub("\n", "\n#{leading_spaces}")
168
+ end
169
+ else
170
+ replacetext=""
171
+ @log.warn("File not found: #{$2}")
172
+ end
173
+ result=replace_md_inlay(replacetext)
174
+ result
175
+ }
176
+ text
177
+ end
178
+
147
179
  public
148
180
 
149
181
  # constructor
@@ -205,6 +237,11 @@ class ReferenceTweaker
205
237
  }
206
238
  end
207
239
 
240
+ # include Markdown files
241
+ #
242
+ #
243
+ text = replace_md_inlay(text)
244
+
208
245
 
209
246
  # embed images
210
247
  #
@@ -255,6 +292,17 @@ class ReferenceTweaker
255
292
  # it is already leave it as it is
256
293
  end
257
294
 
295
+ # substitute plantuml
296
+ #
297
+ # note this is substituted in any case
298
+ #
299
+ #if @target == "pdf" then
300
+ text.gsub!(PLANTUML_PATTERN){|m| ""}
301
+
302
+ #else
303
+ # it is already leave it as it is
304
+ #end
305
+
258
306
  File.open(outfile, "w"){|f| f.puts(text)}
259
307
  end
260
308
  end
@@ -817,6 +865,10 @@ class PandocBeautifier
817
865
 
818
866
  @log.info("rendering #{outname} as [#{format.join(', ')}]")
819
867
 
868
+ supported_formats=["pdf", "latex", "frontmatter", "docx", "html", "txt", "rtf", "slide"]
869
+ wrong_format=format - supported_formats
870
+ wrong_format.each{|f|@log.error("format not supported: #{f}")}
871
+
820
872
  begin
821
873
 
822
874
 
@@ -898,8 +950,8 @@ class PandocBeautifier
898
950
  " --ascii -t dzslides --slide-level 2 -o #{outfileSlide.esc}"
899
951
  `#{cmd}`
900
952
  end
901
- rescue
902
- @log.error "failed to perform #{cmd}"
953
+ rescue Exception => e
954
+ @log.error "failed to perform #{cmd}, #{e.message}"
903
955
  #TODO make a try catch block kere
904
956
  end
905
957
  nil
@@ -94,6 +94,11 @@ optparse = OptionParser.new do|opts|
94
94
  end
95
95
 
96
96
 
97
+ options[:plantuml] = false
98
+ opts.on( '-u', '--plantuml', 'plantuml documents by manifest' ) do
99
+ options[:plantuml] = true
100
+ end
101
+
97
102
  options[:beautify] = false
98
103
  opts.on( "-b", '--beautify', 'bautify markdownfiles' ) do
99
104
  options[:beautify] = true
@@ -1,4 +1,4 @@
1
1
  module Wortsammler
2
2
  PROGNAME="wortsammler"
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
Binary file
@@ -0,0 +1,12 @@
1
+ # demoing plantuml support
2
+
3
+ ~~~~ {.plantuml}
4
+ @startuml ../testoutput/authentification.png
5
+
6
+ Alice -> Bob: Authentication Request
7
+ Bob --> Alice: Authentication Response
8
+ @enduml
9
+ ~~~~
10
+
11
+ ![Authentification](../testoutput/authentification.png)
12
+
@@ -0,0 +1,7 @@
1
+ ## this is TC_EXP_003_1
2
+
3
+ we now include TC_EXP_003_2 from TC_EXP_003_1
4
+
5
+ ~~MD "TC_EXP_003_2.md"~~
6
+
7
+ end of TC_EXP_003_1
@@ -0,0 +1,7 @@
1
+ ## this is md TC_EXP_003_2
2
+
3
+ - hugo
4
+
5
+ - hugo2
6
+
7
+ end of TC_EXP_003_2
@@ -0,0 +1,54 @@
1
+ - this is headline
2
+ - this is TC\_EXP\_003\_1
3
+ - this is md TC\_EXP\_003\_2
4
+ - this is md TC\_EXP\_003\_2
5
+
6
+
7
+ this is headline
8
+ ================
9
+
10
+
11
+ now verbatim by indent inclucde TC_EXP_003_1.md
12
+
13
+ ## this is TC_EXP_003_1
14
+
15
+ we now include TC_EXP_003_2 from TC_EXP_003_1
16
+
17
+ ## this is md TC_EXP_003_2
18
+
19
+ - hugo
20
+
21
+ - hugo2
22
+
23
+ end of TC_EXP_003_2
24
+
25
+ end of TC_EXP_003_1
26
+
27
+ now full format inclucde TC_EXP_003_1.md
28
+
29
+ this is TC_EXP_003_1
30
+ --------------------
31
+
32
+ we now include TC_EXP_003_2 from TC_EXP_003_1
33
+
34
+ this is md TC_EXP_003_2
35
+ -----------------------
36
+
37
+ - hugo
38
+
39
+ - hugo2
40
+
41
+ end of TC_EXP_003_2
42
+
43
+ end of TC_EXP_003_1
44
+
45
+ now full format inclucde TC_EXP_003_2.md
46
+
47
+ this is md TC_EXP_003_2
48
+ -----------------------
49
+
50
+ - hugo
51
+
52
+ - hugo2
53
+
54
+ end of TC_EXP_003_2
@@ -5,7 +5,8 @@ require 'pry'
5
5
  wortsammlerbin = "'#{File.expand_path("bin")}'"
6
6
  wortsammler = "'#{File.expand_path(File.join("bin", "wortsammler"))}'"
7
7
  testprojectdir = "testproject/30_Sources"
8
- specdir =File.dirname(__FILE__)
8
+ specdir = File.dirname(__FILE__)
9
+ testoutput = "#{specdir}/../testoutput"
9
10
 
10
11
 
11
12
  describe "Wortsammler generic issues" do
@@ -243,12 +244,37 @@ describe "Wortsammler conversion" do
243
244
  $?.success?.should==false
244
245
  end
245
246
 
246
- it "extracts the traceables according to a manifest" do
247
+ it "extracts the traceables according to a manifest", :exp=> false do
247
248
  manifest="testproject/30_Sources/ZSUPP_Manifests/sample_the-sample-document.yaml"
248
249
  system "#{wortsammler} -cm #{manifest}"
249
250
  $?.success?.should==true
250
251
  end
251
252
 
253
+
254
+ it "extracts plantuml according to a manifest", :exp => false do
255
+ manifest="testproject/30_Sources/ZSUPP_Manifests/sample_the-sample-document.yaml"
256
+ system "#{wortsammler} -um #{manifest}"
257
+ $?.success?.should==true
258
+ end
259
+
260
+ it "extracts plantuml from a single file", :exp => false do
261
+ outfile="#{testoutput}/authentification.png"
262
+ FileUtils.rm(outfile)
263
+ system "#{wortsammler} -ui \"#{specdir}/TC_EXP_002.md\""
264
+ $?.success?.should==true
265
+ File.exist?(outfile).should==true
266
+ end
267
+
268
+ it "extracts plantuml from a folder", :exp => false do
269
+ outfile="#{testoutput}/authentification.png"
270
+ FileUtils.rm(outfile)
271
+ system "#{wortsammler} -ui \"#{specdir}\""
272
+ $?.success?.should==true
273
+ File.exist?(outfile).should==true
274
+ end
275
+
276
+
277
+
252
278
  it "processes snippets" do
253
279
  pending "Test not yet implemented"
254
280
  end
@@ -281,6 +307,7 @@ describe "Wortsammler conversion" do
281
307
  #system cmd
282
308
  }
283
309
  end
310
+
284
311
  end
285
312
 
286
313
 
@@ -317,15 +344,63 @@ describe "Wortsammler syntax extensions", :exp => false do
317
344
  $?.success?.should==true
318
345
  end
319
346
 
320
- it "TC_EXP_001 expands expected results from testcases", exp: true do
347
+ it "TC_EXP_001 expands expected results from testcases", exp: false do
321
348
 
322
349
  proc=ReferenceTweaker.new("pdf")
323
350
  outfile="#{specdir}/../testoutput/TC_EXP_001.output.md"
324
351
  File.unlink(outfile) if File.exists?(outfile)
325
- proc.prepareFile("#{specdir}/TC_EXP_001.md", "#{specdir}/../testoutput/TC_EXP_001.output.md")
352
+ proc.prepareFile("#{specdir}/TC_EXP_001.md", outfile)
326
353
 
327
354
  a=File.open(outfile, "r").readlines.join
328
355
  a.should include("TC_DES_003_01")
329
356
  end
330
357
 
358
+ it "TC_EXP_002 removes plantuml sources", exp: false do
359
+
360
+ proc=ReferenceTweaker.new("pdf")
361
+ outfile="#{specdir}/../testoutput/TC_EXP_002.output.md"
362
+ File.unlink(outfile) if File.exists?(outfile)
363
+ proc.prepareFile("#{specdir}/TC_EXP_002.md", outfile)
364
+
365
+ a=File.open(outfile, "r").readlines.join
366
+ a.include?(".plantuml").should==false
367
+ end
368
+
369
+ it "TC_EXP_003 handles Markdown inlays", exp: false do
370
+ tempdir ="#{specdir}/../testoutput"
371
+ mdinlayfile ="TC_EXP_003_1.md"
372
+ mdinlayfile_1 ="TC_EXP_003_2.md"
373
+ mdfile="tc_exp_003"
374
+
375
+ FileUtils.cd(tempdir){|c|
376
+ FileUtils.cp("#{specdir}/#{mdinlayfile}", ".")
377
+ FileUtils.cp("#{specdir}/#{mdinlayfile_1}", ".")
378
+
379
+
380
+ mdtext=["#this is headline",
381
+ "",
382
+ "~~~~",
383
+ "","now verbatim by indent inclucde #{mdinlayfile}", "",
384
+ " ~~MD \"#{mdinlayfile}\"~~",
385
+ "~~~~",
386
+ "",
387
+ "","now full format inclucde #{mdinlayfile}", "",
388
+ "~~MD \"#{mdinlayfile}\"~~",
389
+ "",
390
+ "","now full format inclucde #{mdinlayfile_1}", "",
391
+ "~~MD \"#{mdinlayfile_1}\"~~",
392
+ ].flatten.join("\n")
393
+
394
+ File.open("#{mdfile}.md", "w"){|f| f.puts mdtext}
395
+
396
+ system "#{wortsammler} -pi '#{mdfile}.md' -o '.' -f txt"
397
+ FileUtils.rm mdinlayfile
398
+ FileUtils.rm mdinlayfile_1
399
+ }
400
+
401
+ ref = File.open("#{specdir}/tc_exp_003_reference.txt").read
402
+ result = File.open("#{tempdir}/#{mdfile}.txt").read
403
+ ref.should==result
404
+ end
405
+
331
406
  end
@@ -284,13 +284,192 @@ a {
284
284
  <div class="results">
285
285
  <div id="div_group_1" class="example_group passed">
286
286
  <dl style="margin-left: 0px;">
287
- <dt id="example_group_1" class="passed">Wortsammler syntax extensions</dt>
287
+ <dt id="example_group_1" class="passed">PandocBeautifier</dt>
288
+ <script type="text/javascript">moveProgressBar('1.5');</script>
289
+ <dd class="example passed"><span class="passed_spec_name">checks the availability of the right pandoc version</span><span class='duration'>0.03202s</span></dd>
290
+ </dl>
291
+ </div>
292
+ <div id="div_group_2" class="example_group passed">
293
+ <dl style="margin-left: 0px;">
294
+ <dt id="example_group_2" class="passed">pdf utilities:</dt>
295
+ <script type="text/javascript">moveProgressBar('3.0');</script>
296
+ <dd class="example passed"><span class="passed_spec_name">adjusts the bounding box of a pdf file</span><span class='duration'>18.83432s</span></dd>
297
+ <script type="text/javascript">moveProgressBar('4.5');</script>
298
+ <dd class="example passed"><span class="passed_spec_name">converts an excel sheet to pdf</span><span class='duration'>3.58990s</span></dd>
299
+ <script type="text/javascript">moveProgressBar('6.0');</script>
300
+ <dd class="example passed"><span class="passed_spec_name">converts a powerpoint to pdf</span><span class='duration'>1.64767s</span></dd>
301
+ <script type="text/javascript">moveProgressBar('7.5');</script>
302
+ <dd class="example passed"><span class="passed_spec_name">converts an excelsheet to cropped pdf</span><span class='duration'>3.71127s</span></dd>
303
+ <script type="text/javascript">moveProgressBar('9.0');</script>
304
+ <dd class="example passed"><span class="passed_spec_name">converts a powerpoint to cropped pdf</span><span class='duration'>20.07144s</span></dd>
305
+ </dl>
306
+ </div>
307
+ <div id="div_group_3" class="example_group passed">
308
+ <dl style="margin-left: 0px;">
309
+ <dt id="example_group_3" class="passed">TraceableSet</dt>
310
+ <script type="text/javascript">moveProgressBar('10.6');</script>
311
+ <dd class="example passed"><span class="passed_spec_name">should return a blank instance</span><span class='duration'>0.00019s</span></dd>
312
+ <script type="text/javascript">moveProgressBar('12.1');</script>
313
+ <dd class="example passed"><span class="passed_spec_name">allows to add Traceables</span><span class='duration'>0.00018s</span></dd>
314
+ <script type="text/javascript">moveProgressBar('13.6');</script>
315
+ <dd class="example passed"><span class="passed_spec_name">delivers the first of the duplicates</span><span class='duration'>0.00012s</span></dd>
316
+ <script type="text/javascript">moveProgressBar('15.1');</script>
317
+ <dd class="example passed"><span class="passed_spec_name">advertises duplicates</span><span class='duration'>0.00022s</span></dd>
318
+ <script type="text/javascript">moveProgressBar('16.6');</script>
319
+ <dd class="example passed"><span class="passed_spec_name">adertises undefined traceables</span><span class='duration'>0.00019s</span></dd>
320
+ <script type="text/javascript">moveProgressBar('18.1');</script>
321
+ <dd class="example passed"><span class="passed_spec_name">advertises all traceables</span><span class='duration'>0.00010s</span></dd>
322
+ <script type="text/javascript">moveProgressBar('19.6');</script>
323
+ <dd class="example passed"><span class="passed_spec_name">advertises a hash of supporting traces</span><span class='duration'>0.00011s</span></dd>
324
+ <script type="text/javascript">moveProgressBar('21.2');</script>
325
+ <dd class="example passed"><span class="passed_spec_name">advertises traceable ids of a particular category</span><span class='duration'>0.00012s</span></dd>
326
+ <script type="text/javascript">moveProgressBar('22.7');</script>
327
+ <dd class="example passed"><span class="passed_spec_name">advertises ttraceables of a particular category</span><span class='duration'>0.00010s</span></dd>
328
+ <script type="text/javascript">moveProgressBar('24.2');</script>
329
+ <dd class="example passed"><span class="passed_spec_name">merges traceables</span><span class='duration'>0.00027s</span></dd>
330
+ <script type="text/javascript">moveProgressBar('25.7');</script>
331
+ <dd class="example passed"><span class="passed_spec_name">exposes deleted Traceables</span><span class='duration'>0.00019s</span></dd>
332
+ <script type="text/javascript">moveProgressBar('27.2');</script>
333
+ <dd class="example passed"><span class="passed_spec_name">exposes added Traceables</span><span class='duration'>0.00021s</span></dd>
334
+ <script type="text/javascript">moveProgressBar('28.7');</script>
335
+ <dd class="example passed"><span class="passed_spec_name">exposes deleted Traceables of category</span><span class='duration'>0.00016s</span></dd>
336
+ <script type="text/javascript">moveProgressBar('30.3');</script>
337
+ <dd class="example passed"><span class="passed_spec_name">exposes added Traceables of category</span><span class='duration'>0.00012s</span></dd>
338
+ <script type="text/javascript">moveProgressBar('31.8');</script>
339
+ <dd class="example passed"><span class="passed_spec_name">exploses changed traceids as array of [Traceid, levensthein, diff_as_html]</span><span class='duration'>0.01376s</span></dd>
340
+ <script type="text/javascript">moveProgressBar('33.3');</script>
341
+ <dd class="example passed"><span class="passed_spec_name">exposes unchanged Traceables</span><span class='duration'>0.00513s</span></dd>
342
+ <script type="text/javascript">moveProgressBar('34.8');</script>
343
+ <dd class="example passed"><span class="passed_spec_name">can be marshalled to a file</span><span class='duration'>0.00214s</span></dd>
344
+ <script type="text/javascript">moveProgressBar('36.3');</script>
345
+ <dd class="example passed"><span class="passed_spec_name">can be dumped to a graphml file</span><span class='duration'>0.04104s</span></dd>
346
+ </dl>
347
+ </div>
348
+ <div id="div_group_4" class="example_group passed">
349
+ <dl style="margin-left: 0px;">
350
+ <dt id="example_group_4" class="passed">Traceable</dt>
351
+ <script type="text/javascript">moveProgressBar('37.8');</script>
352
+ <dd class="example passed"><span class="passed_spec_name">should == &quot;id&quot;</span><span class='duration'>0.00026s</span></dd>
353
+ <script type="text/javascript">moveProgressBar('39.3');</script>
354
+ <dd class="example passed"><span class="passed_spec_name">should == &quot;origin&quot;</span><span class='duration'>0.00020s</span></dd>
355
+ <script type="text/javascript">moveProgressBar('40.9');</script>
356
+ <dd class="example passed"><span class="passed_spec_name">should == &quot;alternative_id&quot;</span><span class='duration'>0.00019s</span></dd>
357
+ <script type="text/javascript">moveProgressBar('42.4');</script>
358
+ <dd class="example passed"><span class="passed_spec_name">should == &quot;header_plain&quot;</span><span class='duration'>0.00019s</span></dd>
359
+ <script type="text/javascript">moveProgressBar('43.9');</script>
360
+ <dd class="example passed"><span class="passed_spec_name">should == &quot;\\textt{header_origin}&quot;</span><span class='duration'>0.00017s</span></dd>
361
+ <script type="text/javascript">moveProgressBar('45.4');</script>
362
+ <dd class="example passed"><span class="passed_spec_name">should == &quot;body_plain&quot;</span><span class='duration'>0.00019s</span></dd>
363
+ <script type="text/javascript">moveProgressBar('46.9');</script>
364
+ <dd class="example passed"><span class="passed_spec_name">should == [&quot;contributes_to&quot;]</span><span class='duration'>0.00015s</span></dd>
365
+ <script type="text/javascript">moveProgressBar('48.4');</script>
366
+ <dd class="example passed"><span class="passed_spec_name">should == &quot;trace_orig&quot;</span><span class='duration'>0.00014s</span></dd>
367
+ <script type="text/javascript">moveProgressBar('50.0');</script>
368
+ <dd class="example passed"><span class="passed_spec_name">should == &quot;origin&quot;</span><span class='duration'>0.00015s</span></dd>
369
+ <script type="text/javascript">moveProgressBar('51.5');</script>
370
+ <dd class="example passed"><span class="passed_spec_name">should == &quot;category&quot;</span><span class='duration'>0.00012s</span></dd>
371
+ <script type="text/javascript">moveProgressBar('53.0');</script>
372
+ <dd class="example passed"><span class="passed_spec_name">should == &quot;info&quot;</span><span class='duration'>0.00014s</span></dd>
373
+ </dl>
374
+ </div>
375
+ <div id="div_group_5" class="example_group passed">
376
+ <dl style="margin-left: 0px;">
377
+ <dt id="example_group_5" class="passed">Wortsammler generic issues</dt>
378
+ <script type="text/javascript">moveProgressBar('54.5');</script>
379
+ <dd class="example passed"><span class="passed_spec_name">provides a help</span><span class='duration'>0.44483s</span></dd>
380
+ <script type="text/javascript">moveProgressBar('56.0');</script>
381
+ <dd class="example passed"><span class="passed_spec_name">can create a new project folder</span><span class='duration'>0.58100s</span></dd>
382
+ <script type="text/javascript">moveProgressBar('57.5');</script>
383
+ <dd class="example passed"><span class="passed_spec_name">does not initialize into an existing project folder</span><span class='duration'>0.45372s</span></dd>
384
+ <script type="text/javascript">makeYellow('rspec-header');</script>
385
+ <script type="text/javascript">makeYellow('div_group_5');</script>
386
+ <script type="text/javascript">makeYellow('example_group_5');</script>
387
+ <script type="text/javascript">moveProgressBar('59.0');</script>
388
+ <dd class="example not_implemented"><span class="not_implemented_spec_name">controls the pandoc options by document class (PENDING: implmenet test to control pandoc options by document class)</span></dd>
389
+ </dl>
390
+ </div>
391
+ <div id="div_group_6" class="example_group passed">
392
+ <dl style="margin-left: 0px;">
393
+ <dt id="example_group_6" class="passed">Wortsammler options validator</dt>
394
+ <script type="text/javascript">moveProgressBar('60.6');</script>
395
+ <dd class="example passed"><span class="passed_spec_name">rejects no processing</span><span class='duration'>0.40117s</span></dd>
396
+ <script type="text/javascript">moveProgressBar('62.1');</script>
397
+ <dd class="example passed"><span class="passed_spec_name">rejeccts inputs without outputs</span><span class='duration'>0.40486s</span></dd>
398
+ </dl>
399
+ </div>
400
+ <div id="div_group_7" class="example_group passed">
401
+ <dl style="margin-left: 0px;">
402
+ <dt id="example_group_7" class="passed">Wortsammler beautifier features</dt>
403
+ <script type="text/javascript">moveProgressBar('63.6');</script>
404
+ <dd class="example passed"><span class="passed_spec_name">beautifies all markdown files in a folder</span><span class='duration'>0.78738s</span></dd>
405
+ <script type="text/javascript">moveProgressBar('65.1');</script>
406
+ <dd class="example passed"><span class="passed_spec_name">beautifies a single file</span><span class='duration'>0.48401s</span></dd>
407
+ <script type="text/javascript">moveProgressBar('66.6');</script>
408
+ <dd class="example passed"><span class="passed_spec_name">recognizes if the specified manifest file is a directory</span><span class='duration'>0.44379s</span></dd>
409
+ <script type="text/javascript">moveProgressBar('68.1');</script>
410
+ <dd class="example passed"><span class="passed_spec_name">beautifies input files in a manifest</span><span class='duration'>0.49646s</span></dd>
411
+ <script type="text/javascript">moveProgressBar('69.6');</script>
412
+ <dd class="example passed"><span class="passed_spec_name">claims missing input</span><span class='duration'>0.43923s</span></dd>
413
+ <script type="text/javascript">moveProgressBar('71.2');</script>
414
+ <dd class="example passed"><span class="passed_spec_name">claims undefined document path</span><span class='duration'>0.43421s</span></dd>
415
+ </dl>
416
+ </div>
417
+ <div id="div_group_8" class="example_group passed">
418
+ <dl style="margin-left: 0px;">
419
+ <dt id="example_group_8" class="passed">Wortsammler conversion</dt>
420
+ <script type="text/javascript">moveProgressBar('72.7');</script>
421
+ <dd class="example passed"><span class="passed_spec_name">converts a single file to output format</span><span class='duration'>5.26633s</span></dd>
422
+ <script type="text/javascript">moveProgressBar('74.2');</script>
423
+ <dd class="example passed"><span class="passed_spec_name">converts a single file to default output format</span><span class='duration'>4.36495s</span></dd>
424
+ <script type="text/javascript">moveProgressBar('75.7');</script>
425
+ <dd class="example passed"><span class="passed_spec_name">handles chapters up to 6 levels</span><span class='duration'>7.67111s</span></dd>
426
+ <script type="text/javascript">moveProgressBar('77.2');</script>
427
+ <dd class="example passed"><span class="passed_spec_name">handles lists up to 9 levels</span><span class='duration'>4.52206s</span></dd>
428
+ <script type="text/javascript">moveProgressBar('78.7');</script>
429
+ <dd class="example passed"><span class="passed_spec_name">converts all files within a folder to output format</span><span class='duration'>0.54862s</span></dd>
430
+ <script type="text/javascript">moveProgressBar('80.3');</script>
431
+ <dd class="example passed"><span class="passed_spec_name">processes a manifest</span><span class='duration'>14.06971s</span></dd>
432
+ <script type="text/javascript">moveProgressBar('81.8');</script>
433
+ <dd class="example passed"><span class="passed_spec_name">investigates the existence of a manifest</span><span class='duration'>0.40736s</span></dd>
434
+ <script type="text/javascript">moveProgressBar('83.3');</script>
435
+ <dd class="example passed"><span class="passed_spec_name">extracts the traceables according to a manifest</span><span class='duration'>0.57014s</span></dd>
436
+ <script type="text/javascript">moveProgressBar('84.8');</script>
437
+ <dd class="example passed"><span class="passed_spec_name">extracts plantuml according to a manifest</span><span class='duration'>0.90640s</span></dd>
438
+ <script type="text/javascript">moveProgressBar('86.3');</script>
439
+ <dd class="example passed"><span class="passed_spec_name">extracts plantuml from a single file</span><span class='duration'>2.46489s</span></dd>
440
+ <script type="text/javascript">moveProgressBar('87.8');</script>
441
+ <dd class="example passed"><span class="passed_spec_name">extracts plantuml from a folder</span><span class='duration'>2.85117s</span></dd>
442
+ <script type="text/javascript">makeYellow('rspec-header');</script>
443
+ <script type="text/javascript">makeYellow('div_group_8');</script>
444
+ <script type="text/javascript">makeYellow('example_group_8');</script>
445
+ <script type="text/javascript">moveProgressBar('89.3');</script>
446
+ <dd class="example not_implemented"><span class="not_implemented_spec_name">processes snippets (PENDING: Test not yet implemented)</span></dd>
447
+ <script type="text/javascript">makeYellow('rspec-header');</script>
448
+ <script type="text/javascript">makeYellow('div_group_8');</script>
449
+ <script type="text/javascript">makeYellow('example_group_8');</script>
450
+ <script type="text/javascript">moveProgressBar('90.9');</script>
451
+ <dd class="example not_implemented"><span class="not_implemented_spec_name">handles undefined snippets (PENDING: Test not yet implemented)</span></dd>
452
+ <script type="text/javascript">moveProgressBar('92.4');</script>
453
+ <dd class="example passed"><span class="passed_spec_name">runs the rake file in the sample document</span><span class='duration'>14.54937s</span></dd>
454
+ <script type="text/javascript">moveProgressBar('93.9');</script>
455
+ <dd class="example passed"><span class="passed_spec_name">compiles all documents</span><span class='duration'>0.00024s</span></dd>
456
+ </dl>
457
+ </div>
458
+ <div id="div_group_9" class="example_group passed">
459
+ <dl style="margin-left: 0px;">
460
+ <dt id="example_group_9" class="passed">Wortsammler syntax extensions</dt>
461
+ <script type="text/javascript">moveProgressBar('95.4');</script>
462
+ <dd class="example passed"><span class="passed_spec_name">[RS_Comp_012] supports embedded images</span><span class='duration'>9.85614s</span></dd>
463
+ <script type="text/javascript">moveProgressBar('96.9');</script>
464
+ <dd class="example passed"><span class="passed_spec_name">TC_EXP_001 expands expected results from testcases</span><span class='duration'>0.02295s</span></dd>
465
+ <script type="text/javascript">moveProgressBar('98.4');</script>
466
+ <dd class="example passed"><span class="passed_spec_name">TC_EXP_002 removes plantuml sources</span><span class='duration'>0.00079s</span></dd>
288
467
  <script type="text/javascript">moveProgressBar('100.0');</script>
289
- <dd class="example passed"><span class="passed_spec_name">TC_EXP_001 expands expected results from testcases</span><span class='duration'>0.00204s</span></dd>
468
+ <dd class="example passed"><span class="passed_spec_name">TC_EXP_003 handles Markdown inlays</span><span class='duration'>0.59397s</span></dd>
290
469
  </dl>
291
470
  </div>
292
- <script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>0.00272 seconds</strong>";</script>
293
- <script type="text/javascript">document.getElementById('totals').innerHTML = "1 example, 0 failures";</script>
471
+ <script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>122.02649 seconds</strong>";</script>
472
+ <script type="text/javascript">document.getElementById('totals').innerHTML = "66 examples, 0 failures, 3 pending";</script>
294
473
  </div>
295
474
  </div>
296
475
  </body>
@@ -1,7 +1,99 @@
1
- Run options: include {:exp=>true}
1
+ Run options: exclude {:exp=>true}
2
+
3
+ PandocBeautifier
4
+ checks the availability of the right pandoc version
5
+
6
+ pdf utilities:
7
+ adjusts the bounding box of a pdf file
8
+ converts an excel sheet to pdf
9
+ converts a powerpoint to pdf
10
+ converts an excelsheet to cropped pdf
11
+ converts a powerpoint to cropped pdf
12
+
13
+ TraceableSet
14
+ should return a blank instance
15
+ allows to add Traceables
16
+ delivers the first of the duplicates
17
+ advertises duplicates
18
+ adertises undefined traceables
19
+ advertises all traceables
20
+ advertises a hash of supporting traces
21
+ advertises traceable ids of a particular category
22
+ advertises ttraceables of a particular category
23
+ merges traceables
24
+ exposes deleted Traceables
25
+ exposes added Traceables
26
+ exposes deleted Traceables of category
27
+ exposes added Traceables of category
28
+ exploses changed traceids as array of [Traceid, levensthein, diff_as_html]
29
+ exposes unchanged Traceables
30
+ can be marshalled to a file
31
+ can be dumped to a graphml file
32
+
33
+ Traceable
34
+ should == "id"
35
+ should == "origin"
36
+ should == "alternative_id"
37
+ should == "header_plain"
38
+ should == "\\textt{header_origin}"
39
+ should == "body_plain"
40
+ should == ["contributes_to"]
41
+ should == "trace_orig"
42
+ should == "origin"
43
+ should == "category"
44
+ should == "info"
45
+
46
+ Wortsammler generic issues
47
+ provides a help
48
+ can create a new project folder
49
+ does not initialize into an existing project folder
50
+ controls the pandoc options by document class (PENDING: implmenet test to control pandoc options by document class)
51
+
52
+ Wortsammler options validator
53
+ rejects no processing
54
+ rejeccts inputs without outputs
55
+
56
+ Wortsammler beautifier features
57
+ beautifies all markdown files in a folder
58
+ beautifies a single file
59
+ recognizes if the specified manifest file is a directory
60
+ beautifies input files in a manifest
61
+ claims missing input
62
+ claims undefined document path
63
+
64
+ Wortsammler conversion
65
+ converts a single file to output format
66
+ converts a single file to default output format
67
+ handles chapters up to 6 levels
68
+ handles lists up to 9 levels
69
+ converts all files within a folder to output format
70
+ processes a manifest
71
+ investigates the existence of a manifest
72
+ extracts the traceables according to a manifest
73
+ extracts plantuml according to a manifest
74
+ extracts plantuml from a single file
75
+ extracts plantuml from a folder
76
+ processes snippets (PENDING: Test not yet implemented)
77
+ handles undefined snippets (PENDING: Test not yet implemented)
78
+ runs the rake file in the sample document
79
+ compiles all documents
2
80
 
3
81
  Wortsammler syntax extensions
82
+ [RS_Comp_012] supports embedded images
4
83
  TC_EXP_001 expands expected results from testcases
84
+ TC_EXP_002 removes plantuml sources
85
+ TC_EXP_003 handles Markdown inlays
86
+
87
+ Pending:
88
+ Wortsammler generic issues controls the pandoc options by document class
89
+ # implmenet test to control pandoc options by document class
90
+ # ./spec/wortsammler_spec.rb:35
91
+ Wortsammler conversion processes snippets
92
+ # Test not yet implemented
93
+ # ./spec/wortsammler_spec.rb:278
94
+ Wortsammler conversion handles undefined snippets
95
+ # Test not yet implemented
96
+ # ./spec/wortsammler_spec.rb:282
5
97
 
6
- Finished in 0.00272 seconds
7
- 1 example, 0 failures
98
+ Finished in 2 minutes 2.03 seconds
99
+ 66 examples, 0 failures, 3 pending
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wortsammler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-09 00:00:00.000000000 Z
12
+ date: 2013-07-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: logger
@@ -255,14 +255,19 @@ files:
255
255
  - resources/default.wortsammler.latex
256
256
  - resources/logo.jpg
257
257
  - resources/main.md
258
+ - resources/plantuml.jar
258
259
  - resources/rakefile.rb
259
260
  - resources/requirementsSynopsis.graphml
260
261
  - resources/sample_the-sample-document.yaml
261
262
  - resources/snippets.xlsx
262
263
  - spec/TC_EXP_001.md
264
+ - spec/TC_EXP_002.md
265
+ - spec/TC_EXP_003_1.md
266
+ - spec/TC_EXP_003_2.md
263
267
  - spec/class.proolib_spec.rb
264
268
  - spec/floating-image.pdf
265
269
  - spec/pdf_utils_spec.rb
270
+ - spec/tc_exp_003_reference.txt
266
271
  - spec/test.graphml
267
272
  - spec/traceable_spec.rb
268
273
  - spec/wortsammler_spec.rb
@@ -295,7 +300,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
295
300
  version: '0'
296
301
  segments:
297
302
  - 0
298
- hash: 3852503069998783980
303
+ hash: -3303182560829427324
299
304
  requirements: []
300
305
  rubyforge_project:
301
306
  rubygems_version: 1.8.25
@@ -304,9 +309,13 @@ specification_version: 3
304
309
  summary: an environment to manage documentation
305
310
  test_files:
306
311
  - spec/TC_EXP_001.md
312
+ - spec/TC_EXP_002.md
313
+ - spec/TC_EXP_003_1.md
314
+ - spec/TC_EXP_003_2.md
307
315
  - spec/class.proolib_spec.rb
308
316
  - spec/floating-image.pdf
309
317
  - spec/pdf_utils_spec.rb
318
+ - spec/tc_exp_003_reference.txt
310
319
  - spec/test.graphml
311
320
  - spec/traceable_spec.rb
312
321
  - spec/wortsammler_spec.rb