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.
Files changed (6) hide show
  1. data/CHANGELOG +2 -0
  2. data/Manifest +3 -1
  3. data/README.rdoc +28 -5
  4. data/bin/wsd +35 -0
  5. data/ruby-wsd.gemspec +5 -3
  6. metadata +7 -5
data/CHANGELOG CHANGED
@@ -1 +1,3 @@
1
+ v0.0.2. Added CLI interface.
2
+
1
3
  v0.0.1. Initial version. Support for writing diagrams to png files and embbeding the diagrams in html.
data/Manifest CHANGED
@@ -1,5 +1,7 @@
1
+ bin/wsd
1
2
  CHANGELOG
2
3
  README.rdoc
4
+ Manifest
3
5
  Rakefile
4
6
  lib/wsd.rb
5
- Manifest
7
+ ruby-wsd.gemspec
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
- * FIX (list of features or problems)
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
- FIX (code sample of usage)
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
- * FIX (list of requirements)
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 <repo>
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.1"
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.extra_rdoc_files = ["CHANGELOG", "README.rdoc", "lib/wsd.rb"]
13
- s.files = ["CHANGELOG", "README.rdoc", "Rakefile", "lib/wsd.rb", "Manifest", "ruby-wsd.gemspec"]
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.1
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