diff --git a/README.markdown b/README.markdown index da1c6a4..4f39ed7 100644 --- a/README.markdown +++ b/README.markdown @@ -13,7 +13,7 @@ It uses an extended RailRoad to output yUML diagrams which are drawn using the s ## Installation * Add to your Gemfile: - gem 'yUMLmeRails', :git => 'git://github.com/tute/yUMLmeRails.git' + `gem 'yUMLmeRails', :git => 'git://github.com/tute/yUMLmeRails.git'` ## Usage (rake -T) diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..f374f66 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.9.1 diff --git a/lib/tasks/yUMLmeRails.rake b/lib/tasks/yUMLmeRails.rake index 52ec105..fc2330d 100644 --- a/lib/tasks/yUMLmeRails.rake +++ b/lib/tasks/yUMLmeRails.rake @@ -1,5 +1,5 @@ -YUMLME_URL = 'http://yuml.me/diagram/scruffy/class/' -FILENAME = File.join(Rails.root, 'doc','diagrams',"model.#{Time.now.strftime('%Y%m%d-%H%M%S')}.png") +YUMLME_URL = 'http://yuml.me/diagram/scruffy;dir:LR;/class/' +FILENAME = File.join(Rails.root, 'doc','diagrams',"#{Time.now.strftime('%Y%m%d-%H%M%S')}-model.png") def generate_diagram(file=FILENAME) require 'open-uri' diff --git a/lib/yUMLmeRails.rb b/lib/yUMLmeRails.rb index 3e38cb2..3206fc5 100644 --- a/lib/yUMLmeRails.rb +++ b/lib/yUMLmeRails.rb @@ -6,35 +6,35 @@ module YUMLmeRails class << self - def generate_diagram + def generate_diagram options = OpenStruct.new( - :all => true, - :brief => false, - :exclude => [], - :inheritance => false, - :join => false, - :label => false, - :modules => false, - :hide_magic => false, - :hide_types => false, - :hide_public => false, - :hide_protected => false, - :hide_private => false, - :plugins_models => false, - :root => '', - :transitive => true, - :verbose => false, - :xmi => false, - :yuml => true, - :command => 'models' + :all => true, + :brief => false, + :exclude => [], + :inheritance => false, + :join => false, + :label => false, + :modules => false, + :hide_magic => false, + :hide_types => false, + :hide_public => false, + :hide_protected => false, + :hide_private => false, + :plugins_models => false, + :root => '', + :transitive => true, + :verbose => false, + :xmi => false, + :yuml => true, + :command => 'models' ) if options.command == 'models' diagram = ModelsDiagram.new options - #elsif options.command == 'controllers' - # diagram = ControllersDiagram.new options - #elsif options.command == 'aasm' - # diagram = AasmDiagram.new options + # elsif options.command == 'controllers' + # diagram = ControllersDiagram.new options + # elsif options.command == 'aasm' + # diagram = AasmDiagram.new options end diagram.generate diff --git a/yUMLmeRails.gemspec b/yUMLmeRails.gemspec index 2613805..0dcbbd6 100644 --- a/yUMLmeRails.gemspec +++ b/yUMLmeRails.gemspec @@ -2,7 +2,7 @@ lib = File.expand_path('../lib/', __FILE__) Gem::Specification.new do |s| s.name = 'yUMLmeRails' - s.version = '0.9' + s.version = '0.9.1' s.authors = ['Nelson Silva'] s.homepage = 'https://github.com/nelsonsilva/yUMLmeRails' s.summary = 'Use yUML to generate Rails diagrams using RailRoad.'