yumlcmd 0.0.2 → 0.0.3
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/VERSION +1 -1
- data/lib/yumlcmd.rb +6 -3
- data/yumlcmd.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/lib/yumlcmd.rb
CHANGED
@@ -5,7 +5,7 @@ class YumlCmd
|
|
5
5
|
|
6
6
|
def YumlCmd.generate(args)
|
7
7
|
ext = "png"
|
8
|
-
input =
|
8
|
+
input = output = nil
|
9
9
|
type = "/scruffy"
|
10
10
|
opts = OptionParser.new do |o|
|
11
11
|
o.banner = "Usage: #{File.basename($0)} [options]"
|
@@ -18,6 +18,9 @@ class YumlCmd
|
|
18
18
|
o.on('-o', '--orderly', 'Generate orderly') do |type|
|
19
19
|
type = "" if type
|
20
20
|
end
|
21
|
+
o.on('-n', '--name OUTPUT', 'Output filename') do |name|
|
22
|
+
output = name
|
23
|
+
end
|
21
24
|
o.on_tail('-h', '--help', 'Display this help and exit') do
|
22
25
|
puts opts
|
23
26
|
exit
|
@@ -26,8 +29,8 @@ class YumlCmd
|
|
26
29
|
opts.parse!(args)
|
27
30
|
|
28
31
|
lines = IO.readlines(input).collect!{|l| l.gsub("\n", "")}.reject{|l| l =~ /#/}
|
29
|
-
|
30
|
-
writer = open("
|
32
|
+
output = output || "#{input.gsub(".", "-")}"
|
33
|
+
writer = open("#{output}.#{ext}", "wb")
|
31
34
|
|
32
35
|
res = Net::HTTP.start("yuml.me", 80) {|http|
|
33
36
|
http.get(URI.escape("/diagram#{type}/class/#{lines.join(",")}"))
|
data/yumlcmd.gemspec
CHANGED