vispan 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/generate +1 -1
- data/lib/vispan.rb +3 -8
- data/lib/vispan/config.rb +0 -0
- data/lib/vispan/graphwriter.rb +0 -0
- data/lib/vispan/node.rb +0 -0
- data/lib/vispan/output_console.rb +0 -0
- data/lib/vispan/output_graphic.rb +7 -5
- data/lib/vispan/relation.rb +0 -0
- data/lib/vispan/szenario.rb +0 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0223f7cfd208708a1fab670b3ec424f1520bf969
|
4
|
+
data.tar.gz: c298807c684cea9249d3341adcf5ad57cdca3155
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c39a467ef8ec4130b12d7cce31cafd95576227f4a4ca7f5ca90aba3c676bb92fa206d9e38a705c1832273f9540b7733929d21cae187a09895618fd6ec465ac0f
|
7
|
+
data.tar.gz: a301dd388f4cddca1bbc8023ad168a645f2a8c0cc746918a862f1716b6ee1074fec50f1af381d535ec5dc22e1f15fb76bad12829be35b7d76cc76df475f32463
|
data/bin/generate
CHANGED
data/lib/vispan.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
# require "process_visualisation/version.rb"
|
2
|
-
require 'rack'
|
3
1
|
require "vispan/szenario.rb"
|
4
2
|
require "vispan/relation.rb"
|
5
3
|
require "vispan/node.rb"
|
@@ -9,13 +7,10 @@ require "vispan/output_graphic.rb"
|
|
9
7
|
module Vispan
|
10
8
|
attr_reader :processed_string, :nodes, :text, :szenarios
|
11
9
|
|
12
|
-
class WebPreview
|
10
|
+
class WebPreview
|
13
11
|
def call(env)
|
14
|
-
|
15
|
-
|
16
|
-
#generate process.png
|
17
|
-
# [200, {"Content-Type" => "text/plain"}, env]
|
18
|
-
[200, {"Content-Type" => "image/png"}, [IO.read(Rails.root.join('app/assets/images/process.png'))]]
|
12
|
+
self.visualize('process.png')
|
13
|
+
[200, {"Content-Type" => "image/png"}, [IO.read('process.png')]]
|
19
14
|
end
|
20
15
|
|
21
16
|
def initialize(input_file)
|
data/lib/vispan/config.rb
CHANGED
File without changes
|
data/lib/vispan/graphwriter.rb
CHANGED
File without changes
|
data/lib/vispan/node.rb
CHANGED
File without changes
|
File without changes
|
@@ -1,6 +1,9 @@
|
|
1
|
+
require 'tempfile'
|
2
|
+
|
1
3
|
class OutputGraphic
|
2
4
|
|
3
5
|
def initialize(szenarios, output_file)
|
6
|
+
@file = Tempfile.new(['processed', '.dot'])
|
4
7
|
@szenarios = szenarios
|
5
8
|
@processed_string = ""
|
6
9
|
@output_file = output_file
|
@@ -18,16 +21,15 @@ class OutputGraphic
|
|
18
21
|
end
|
19
22
|
|
20
23
|
def generate_processed_file(processed_string)
|
21
|
-
|
22
|
-
|
23
|
-
}
|
24
|
+
@file << processed_string
|
25
|
+
@file.close
|
24
26
|
end
|
25
27
|
|
26
28
|
def generate_graph(output_file)
|
27
|
-
|
28
29
|
file_ending = check_output(output_file)
|
29
|
-
cmd = "dot -T#{file_ending}
|
30
|
+
cmd = "dot -T#{file_ending} #{@file.path} -o #{output_file}"
|
30
31
|
system(cmd)
|
32
|
+
@file.unlink
|
31
33
|
end
|
32
34
|
|
33
35
|
def check_output(output_file)
|
data/lib/vispan/relation.rb
CHANGED
File without changes
|
data/lib/vispan/szenario.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vispan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Witek
|
@@ -113,3 +113,4 @@ signing_key:
|
|
113
113
|
specification_version: 4
|
114
114
|
summary: Visualize processes with simple syntax and multiple output formats
|
115
115
|
test_files: []
|
116
|
+
has_rdoc:
|