yard-sd 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Example.md +0 -2
- data/README.md +2 -2
- data/lib/yard-sd/sequence_diagram_mixin.rb +5 -1
- metadata +4 -5
data/Example.md
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# yard-sd
|
2
2
|
|
3
3
|
Note: This README and {file:Example.md the example} are best viewed on
|
4
|
-
{http://
|
5
|
-
yard-sd plugin.
|
4
|
+
{http://rubydoc.info/github/dominikh/yard-sd/frames} or a service
|
5
|
+
supporting the yard-sd plugin.
|
6
6
|
|
7
7
|
## Description
|
8
8
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require "digest/sha1"
|
2
|
+
|
1
3
|
module SequenceDiagramMixin
|
2
4
|
def htmlify(*args)
|
3
5
|
res = super
|
@@ -25,7 +27,9 @@ module SequenceDiagramMixin
|
|
25
27
|
begin
|
26
28
|
diagram = SequenceDiagram::Diagram.new.parse(source)
|
27
29
|
img = diagram.to_png(metadata_h)
|
28
|
-
|
30
|
+
|
31
|
+
hash = Digest::SHA1.hexdigest(source)
|
32
|
+
name = "images/diagrams/#{hash}.png"
|
29
33
|
options[:serializer].serialize(name, img)
|
30
34
|
|
31
35
|
return "<img src='%s' alt='Sequence diagram' />" % url_for(options[:serializer].serialized_path(name))
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yard-sd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,8 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
13
|
-
default_executable:
|
12
|
+
date: 2013-03-02 00:00:00.000000000 Z
|
14
13
|
dependencies: []
|
15
14
|
description:
|
16
15
|
email:
|
@@ -28,7 +27,6 @@ files:
|
|
28
27
|
- lib/yard-sd/sequence_diagram/parse_error.rb
|
29
28
|
- lib/yard-sd/sequence_diagram/diagram.rb
|
30
29
|
- lib/yard-sd.rb
|
31
|
-
has_rdoc: true
|
32
30
|
homepage:
|
33
31
|
licenses: []
|
34
32
|
post_install_message:
|
@@ -49,8 +47,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
49
47
|
version: '0'
|
50
48
|
requirements: []
|
51
49
|
rubyforge_project:
|
52
|
-
rubygems_version: 1.
|
50
|
+
rubygems_version: 1.8.15
|
53
51
|
signing_key:
|
54
52
|
specification_version: 3
|
55
53
|
summary: A YARD plugin for embedding sequence diagrams
|
56
54
|
test_files: []
|
55
|
+
has_rdoc:
|