Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add better exception handling, add 'rake install' task

git-svn-id: http://soen.ca/svn/projects/ruby/yard/trunk@792 a99b2113-df67-db11-8bcc-000c76553aea
  • Loading branch information...
commit 22cdc4251cee2b74c17410cc86e35d8ef76c4022 1 parent fe903f4
loren authored
View
6 Rakefile
@@ -6,4 +6,10 @@ task :default => :gem
Rake::GemPackageTask.new(SPEC) do |pkg|
pkg.need_zip = true
pkg.need_tar = true
+end
+
+task :install do
+ install = "sudo gem install pkg/#{SPEC.name}-#{SPEC.version}.gem --local"
+ `rake gem && #{install}`
+ puts install
end
View
2  bin/yardoc
@@ -1,4 +1,4 @@
-#!/usr/bin/ruby
+#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../lib/yard'
include YARD
View
2  doc/YARD_RubyLex_BufferedReader.html
@@ -330,7 +330,7 @@
<dl>
<dt>Raises:</dt>
<dd>
- <tt>RuntimeError</tt> <br />
+ <tt>unget</tt> <br />
</dd>
</dl>
View
2  lib/handlers/attribute_handler.rb
@@ -6,7 +6,7 @@ def process
attr_type = statement.tokens.first.text.to_sym
symbols = eval("[" + statement.tokens[1..-1].to_s + "]")
read, write = true, false
- rescue
+ rescue SyntaxError
Logger.warning "in AttributeHandler: Undocumentable attribute statement: '#{statement.tokens.to_s}'"
return
end
View
2  lib/handlers/exception_handler.rb
@@ -7,7 +7,7 @@ def process
break index if token.class == RubyToken::TkIDENTIFIER && token.text == 'raise'
end
if from.is_a? Fixnum
- exception_class = tokens[(from+1)..-1].to_s[/^\s*(\S+?),?/, 1]
+ exception_class = tokens[(from+1)..-1].to_s[/^\W+(\w+)/, 1]
# RuntimeError for Strings or no parameter
exception_class = "RuntimeError" if exception_class =~ /^\"/ || exception_class.nil?
View
4 yard.gemspec
@@ -1,8 +1,8 @@
require 'rubygems'
SPEC = Gem::Specification.new do |s|
s.name = "yard"
- s.version = "0.2.0"
- s.date = "2007-03-01"
+ s.version = "0.2.1"
+ s.date = "2007-05-20"
s.author = "Loren Segal"
s.email = "lsegal@soen.ca"
s.homepage = "http://yard.soen.ca"
Please sign in to comment.
Something went wrong with that request. Please try again.