Skip to content
Browse files

Make the source more yardoc friendly

- added .yardopts
- removed :nodoc: tags
  • Loading branch information...
1 parent 87a2645 commit 9dcc5290d7a77cb3b56ce43ea282c96c673e01e6 @dchelimsky dchelimsky committed Oct 16, 2011
View
1 .gitignore
@@ -13,3 +13,4 @@ Gemfile.lock
*.rbc
bin
.rbx
+.yardoc
View
4 .yardopts
@@ -0,0 +1,4 @@
+--no-private
+--exclude features
+-
+lib/**/*.rb
View
2 lib/rspec/core/configuration.rb
@@ -121,7 +121,7 @@ def settings
@settings ||= {}
end
- def clear_inclusion_filter # :nodoc:
+ def clear_inclusion_filter
self.inclusion_filter = nil
end
View
9 lib/rspec/core/errors.rb
@@ -2,11 +2,10 @@ module RSpec
module Core
# If Test::Unit is loaed, we'll use its error as baseclass, so that Test::Unit
# will report unmet RSpec expectations as failures rather than errors.
- superclass = ['Test::Unit::AssertionFailedError', '::StandardError'].map do |c|
- eval(c) rescue nil
- end.compact.first
-
- class PendingExampleFixedError < superclass
+ begin
+ class PendingExampleFixedError < Test::Unit::AssertionFailedError; end
+ rescue
+ class PendingExampleFixedError < StandardError; end
end
end
end
View
2 lib/rspec/core/example.rb
@@ -27,7 +27,7 @@ def example_group
@example_group_class
end
- def around_hooks # :nodoc:
+ def around_hooks
@around_hooks ||= example_group.around_hooks_for(self)
end
View
4 lib/rspec/core/formatters/snippet_extractor.rb
@@ -2,8 +2,8 @@ module RSpec
module Core
module Formatters
# This class extracts code snippets by looking at the backtrace of the passed error
- class SnippetExtractor #:nodoc:
- class NullConverter; def convert(code, pre); code; end; end #:nodoc:
+ class SnippetExtractor
+ class NullConverter; def convert(code, pre); code; end; end
begin
require 'syntax/convertors/html'
View
4 lib/rspec/core/let.rb
@@ -86,12 +86,12 @@ def let!(name, &block)
end
module InstanceMethods
- def __memoized # :nodoc:
+ def __memoized
@__memoized ||= {}
end
end
- def self.included(mod) # :nodoc:
+ def self.included(mod)
mod.extend ClassMethods
mod.__send__ :include, InstanceMethods
end
View
2 lib/rspec/core/rake_task.rb
@@ -154,7 +154,7 @@ def initialize(*args)
private
- def files_to_run # :nodoc:
+ def files_to_run
if ENV['SPEC']
FileList[ ENV['SPEC'] ]
else
View
10 lib/rspec/core/ruby_project.rb
@@ -11,23 +11,23 @@ def add_to_load_path(*dirs)
dirs.map {|dir| add_dir_to_load_path(File.join(root, dir))}
end
- def add_dir_to_load_path(dir) # :nodoc:
+ def add_dir_to_load_path(dir)
$LOAD_PATH.unshift(dir) unless $LOAD_PATH.include?(dir)
end
- def root # :nodoc:
+ def root
@project_root ||= determine_root
end
- def determine_root # :nodoc:
+ def determine_root
find_first_parent_containing('spec') || '.'
end
- def find_first_parent_containing(dir) # :nodoc:
+ def find_first_parent_containing(dir)
ascend_until {|path| File.exists?(File.join(path, dir))}
end
- def ascend_until # :nodoc:
+ def ascend_until
Pathname(File.expand_path('.')).ascend do |path|
return path if yield(path)
end
View
12 lib/rspec/core/runner.rb
@@ -16,20 +16,20 @@ def self.disable_autorun!
@autorun_disabled = true
end
- def self.autorun_disabled? # :nodoc:
+ def self.autorun_disabled?
@autorun_disabled ||= false
end
- def self.installed_at_exit? # :nodoc:
+ def self.installed_at_exit?
@installed_at_exit ||= false
end
- def self.running_in_drb? # :nodoc:
+ def self.running_in_drb?
(DRb.current_server rescue false) &&
DRb.current_server.uri =~ /druby\:\/\/127.0.0.1\:/
end
- def self.trap_interrupt # :nodoc:
+ def self.trap_interrupt
trap('INT') do
exit!(1) if RSpec.wants_to_quit
RSpec.wants_to_quit = true
@@ -72,11 +72,11 @@ def self.run(args, err=$stderr, out=$stdout)
RSpec.reset
end
- def self.run_over_drb(options, err, out) # :nodoc:
+ def self.run_over_drb(options, err, out)
DRbCommandLine.new(options).run(err, out)
end
- def self.run_in_process(options, err, out) # :nodoc:
+ def self.run_in_process(options, err, out)
CommandLine.new(options, RSpec::configuration, RSpec::world).run(err, out)
end
View
2 lib/rspec/core/subject.rb
@@ -152,7 +152,7 @@ def subject(&block)
block ? @explicit_subject_block = block : explicit_subject || implicit_subject
end
- attr_reader :explicit_subject_block # :nodoc:
+ attr_reader :explicit_subject_block
private
View
6 lib/rspec/core/version.rb
@@ -1,6 +1,6 @@
-module RSpec # :nodoc:
- module Core # :nodoc:
- module Version # :nodoc:
+module RSpec
+ module Core
+ module Version
STRING = '2.7.0.rc1'
end
end

0 comments on commit 9dcc529

Please sign in to comment.
Something went wrong with that request. Please try again.