This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'yard' | |
include YARD | |
def traverse(node = Registry.root, indent = 0) | |
# Print contents of node | |
if node == Registry.root | |
puts "root" | |
else | |
if CodeObjects::MethodObject === node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class YARD::Handlers::RemoteHandler < YARD::Handlers::Base | |
handles /\Aremote/ | |
def process | |
name_token = statement.tokens[2] | |
name = name_token.text.sub(/:/, '') | |
o1 = MethodObject.new(namespace, name, :instance) | |
o2 = MethodObject.new(namespace, "#{name}_cached", :instance) | |
register(o1, o2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class String | |
# @it "should reverse the String contents" | |
# "xyz".reverse.should == "zyx" | |
def reverse | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'yard' | |
$RSpecCount = 0 | |
class SpecificationGroupObject < YARD::CodeObjects::NamespaceObject | |
attr_accessor :test_class, :specifications | |
def type; :specification_group end | |
def path; "__RSpecTest::" + super end | |
def initialize(*args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'yard' | |
class RSpecDescribeHandler < YARD::Handlers::Ruby::Base | |
handles method_call(:describe) | |
def process | |
name = statement.parameters.first.source | |
if statement.parameters[1] | |
src = statement.parameters[1].jump(:string_content).source | |
name += (src[0] == "#" ? "" : "::") + src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/lib/rubygems/installer.rb 2009-05-02 18:53:50.000000000 -0400 | |
+++ b/lib/rubygems/installer.rb 2009-06-11 16:25:33.000000000 -0400 | |
@@ -397,14 +397,19 @@ | |
else | |
path = File.join @gem_dir, @spec.bindir, bin_file_name | |
+ ruby_bin_file = File.join(File.dirname(Gem.ruby), 'ruby') | |
+ unless File.symlink?(ruby_bin_file) | |
+ ruby_bin_file = Gem.ruby | |
+ end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'yard' | |
class ContextObject < YARD::CodeObjects::NamespaceObject | |
attr_accessor :tests | |
def initialize(*args) | |
super | |
@tests = [] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'yard' | |
YARD::Parser::SourceParser.parse_string <<-eof | |
# ### HELPERS ### | |
# Generates the base job definition hash | |
# | |
# @param [Hash] p The sanitized params sent by the user | |
# @param [Symbol] verb The job verb (:get, :post, :delete, :put) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'yard' | |
class ClassLineHandler < YARD::Handlers::Ruby::Base | |
handles :class | |
def process | |
obj = ClassObject.new(namespace, statement[0].source) | |
obj.line_end = statement[0].line + statement.source.split("\n").size - 1 | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yard (master)$ sudo gem install ruby-debug19 | |
Password: | |
Building native extensions. This could take a while... | |
Building native extensions. This could take a while... | |
ERROR: Error installing ruby-debug19: | |
ERROR: Failed to build gem native extension. | |
/usr/local/bin/ruby19 extconf.rb | |
checking for vm_core.h... no | |
checking for vm_core.h... yes |
OlderNewer