calas-ruby-wsd 0.0.1 → 0.0.2
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.
- data/CHANGELOG +2 -0
- data/Manifest +3 -1
- data/README.rdoc +28 -5
- data/bin/wsd +35 -0
- data/ruby-wsd.gemspec +5 -3
- metadata +7 -5
data/CHANGELOG
CHANGED
data/Manifest
CHANGED
data/README.rdoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
= ruby-wsd
|
2
2
|
|
3
|
-
* http://github.com/calas/ruby-wsd/
|
3
|
+
* http://github.com/calas/ruby-wsd/tree/master/README.rdoc
|
4
4
|
|
5
5
|
== DESCRIPTION:
|
6
6
|
|
@@ -8,15 +8,38 @@ Ruby bindings for the http://www.websequencediagrams.com API
|
|
8
8
|
|
9
9
|
== FEATURES/PROBLEMS:
|
10
10
|
|
11
|
-
|
11
|
+
Features:
|
12
|
+
|
13
|
+
* Diagrams can be written to a file with the +write+ instance method.
|
14
|
+
* Diagrams can be embbeded in HTML using the +to_html+ instance method.
|
15
|
+
|
16
|
+
Problems:
|
17
|
+
|
18
|
+
* Gem is not tested
|
19
|
+
* Source is undocumented
|
12
20
|
|
13
21
|
== SYNOPSIS:
|
14
22
|
|
15
|
-
|
23
|
+
require 'rubygems'
|
24
|
+
require 'wsd'
|
25
|
+
|
26
|
+
diagram = <<-DIAGRAM
|
27
|
+
note over Alice,Bob: Example diagram
|
28
|
+
Alice->Bob: look this beatiful diagrams
|
29
|
+
note right of Bob
|
30
|
+
Bob realizes he is tired of clicking
|
31
|
+
in MS Visio for creating diagrams
|
32
|
+
end note
|
33
|
+
Bob-->Alice: Thanks
|
34
|
+
DIAGRAM
|
35
|
+
|
36
|
+
d = Wsd.new(diagram, 'napkin')
|
37
|
+
d.write("diagram.png")
|
38
|
+
d.to_html
|
16
39
|
|
17
40
|
== REQUIREMENTS:
|
18
41
|
|
19
|
-
*
|
42
|
+
* None.
|
20
43
|
|
21
44
|
== INSTALL:
|
22
45
|
|
@@ -26,7 +49,7 @@ You can install +ruby-wsd+ directly from github:
|
|
26
49
|
|
27
50
|
or you can compile sources
|
28
51
|
|
29
|
-
git clone
|
52
|
+
git clone git://github.com/calas/ruby-wsd.git
|
30
53
|
cd ruby-wsd
|
31
54
|
rake install
|
32
55
|
|
data/bin/wsd
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'rubygems'
|
3
|
+
require 'wsd'
|
4
|
+
require 'optparse'
|
5
|
+
require 'pp'
|
6
|
+
|
7
|
+
options = {}
|
8
|
+
OptionParser.new do |opts|
|
9
|
+
opts.banner = "Usage: wsd [options]"
|
10
|
+
|
11
|
+
opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
|
12
|
+
options[:verbose] = v
|
13
|
+
end
|
14
|
+
|
15
|
+
opts.on("-f [FILE]", "--file [FILE]", "Input file") do |f|
|
16
|
+
options[:file] = f
|
17
|
+
end
|
18
|
+
|
19
|
+
opts.on("-o [FILE]", "--output-file [FILE]", "Output file") do |f|
|
20
|
+
options[:outfile] = f
|
21
|
+
end
|
22
|
+
|
23
|
+
opts.on("--all-styles", "Show all available styles") do |s|
|
24
|
+
options[:show_styles] = s
|
25
|
+
end
|
26
|
+
end.parse!
|
27
|
+
|
28
|
+
if options[:show_styles]
|
29
|
+
puts "Available styles:"
|
30
|
+
puts Wsd::STYLES.join(', ')
|
31
|
+
exit
|
32
|
+
end
|
33
|
+
|
34
|
+
d = Wsd.new(File.read(options[:file]))
|
35
|
+
d.write(options[:outfile])
|
data/ruby-wsd.gemspec
CHANGED
@@ -2,15 +2,17 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{ruby-wsd}
|
5
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Jorge Cal\303\241s Lozano"]
|
9
9
|
s.date = %q{2008-11-23}
|
10
|
+
s.default_executable = %q{wsd}
|
10
11
|
s.description = %q{Ruby bindings for http://www.websequencediagrams.com}
|
11
12
|
s.email = %q{calas@qvitta.net}
|
12
|
-
s.
|
13
|
-
s.
|
13
|
+
s.executables = ["wsd"]
|
14
|
+
s.extra_rdoc_files = ["bin/wsd", "CHANGELOG", "README.rdoc", "lib/wsd.rb"]
|
15
|
+
s.files = ["bin/wsd", "CHANGELOG", "README.rdoc", "Manifest", "Rakefile", "lib/wsd.rb", "ruby-wsd.gemspec"]
|
14
16
|
s.has_rdoc = true
|
15
17
|
s.homepage = %q{http://github.com/calas/ruby-wsd/tree/master}
|
16
18
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Ruby-wsd", "--main", "README.rdoc"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calas-ruby-wsd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Jorge Cal\xC3\xA1s Lozano"
|
@@ -10,25 +10,27 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
|
12
12
|
date: 2008-11-23 00:00:00 -08:00
|
13
|
-
default_executable:
|
13
|
+
default_executable: wsd
|
14
14
|
dependencies: []
|
15
15
|
|
16
16
|
description: Ruby bindings for http://www.websequencediagrams.com
|
17
17
|
email: calas@qvitta.net
|
18
|
-
executables:
|
19
|
-
|
18
|
+
executables:
|
19
|
+
- wsd
|
20
20
|
extensions: []
|
21
21
|
|
22
22
|
extra_rdoc_files:
|
23
|
+
- bin/wsd
|
23
24
|
- CHANGELOG
|
24
25
|
- README.rdoc
|
25
26
|
- lib/wsd.rb
|
26
27
|
files:
|
28
|
+
- bin/wsd
|
27
29
|
- CHANGELOG
|
28
30
|
- README.rdoc
|
31
|
+
- Manifest
|
29
32
|
- Rakefile
|
30
33
|
- lib/wsd.rb
|
31
|
-
- Manifest
|
32
34
|
- ruby-wsd.gemspec
|
33
35
|
has_rdoc: true
|
34
36
|
homepage: http://github.com/calas/ruby-wsd/tree/master
|