yumlcmd 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/yumlcmd.rb +6 -3
  3. data/yumlcmd.gemspec +1 -1
  4. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
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("yuml-output.#{ext}", "wb")
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
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{yumlcmd}
8
- s.version = "0.0.2"
8
+ s.version = "0.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["atog"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yumlcmd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - atog