Skip to content

Commit

Permalink
remove yard-related functionality to plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
cldwalker committed Jan 7, 2011
1 parent d8fa635 commit 63f50f7
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 208 deletions.
7 changes: 3 additions & 4 deletions README.rdoc
Expand Up @@ -6,9 +6,9 @@ Bond is on a mission to improve irb's autocompletion. Aside from doing everythin
Bond can autocomplete argument(s) to methods, uniquely completing per module, per method and per argument. Bond brings
irb's completion closer to bash/zsh as it provides a configuration system and a DSL for creating custom completions
and completion rules. With this configuration system, users can customize their irb autocompletions and share
it with others. Bond can also generate completions from yard documentation and load completions that ship with gems.
Bond is able to offer more than irb's completion since it uses a Readline C extension to get the full
line of input when completing as opposed to irb's last-word approach.
it with others. Bond can also load completions that ship with gems. Bond is able to offer more than
irb's completion since it uses a Readline C extension to get the full line of input when completing
as opposed to irb's last-word approach.

== Install

Expand Down Expand Up @@ -216,7 +216,6 @@ has good instructions for reinstalling ruby with the official Readline.
* http://tagaholic.me/2009/07/23/mini-irb-and-mini-script-console.html

== Todo
* Generate method autocompletions for any arguments based on yardoc documentation.
* Make completion actions more synonymous with argument types.
* Cache expensive completion actions.
* Ensure completions work when there is additional, unrelated text to the right of a completion.
10 changes: 1 addition & 9 deletions lib/bond.rb
Expand Up @@ -12,7 +12,6 @@
require 'bond/missions/object_mission'
require 'bond/missions/anywhere_mission'
require 'bond/missions/operator_method_mission'
require 'bond/yard'

module Bond
extend self
Expand Down Expand Up @@ -77,7 +76,7 @@ def config; M.config; end

# Starts Bond with a default set of completions that replace and improve irb's completion. Loads completions
# in this order: lib/bond/completion.rb, lib/bond/completions/*.rb and the following optional completions:
# completions from :gems, completions from :yard_gems, ~/.bondrc, ~/.bond/completions/*.rb and from block. See
# completions from :gems, ~/.bondrc, ~/.bond/completions/*.rb and from block. See
# {Rc} for the DSL to use in completion files and in the block.
#
# ==== Examples:
Expand All @@ -90,7 +89,6 @@ def config; M.config; end
# @option options [Array<String>] :gems Gems which have their completions loaded from
# @gem_source/lib/bond/completions/*.rb. If gem is a plugin gem i.e. ripl-plugin, completion will be loaded
# from @gem_source/lib/ripl/completions/plugin.rb.
# @option options [Array<String>] :yard_gems Gems using yard documentation to generate completions. See {Yard}.
# @option options [Module] :readline_plugin (Bond::Readline) Specifies a Bond plugin to interface with a Readline-like
# library. Available plugins are Bond::Readline and Bond::Rawline.
# @option options [Proc] :default_mission (DefaultMission) Sets default completion to use when no missions match.
Expand Down Expand Up @@ -118,12 +116,6 @@ def started?; M.started?; end
# Loads completions for gems that ship with them under lib/bond/completions/, relative to the gem's base directory.
def load_gems(*gems); M.load_gems(*gems); end

# Generates and loads completions for yardoc documented gems.
# @param *gems Gem(s) with optional options hash at the end
# @option *gems :verbose[Boolean] (false) Displays additional information when building yardoc.
# @option *gems :reload[Boolean] (false) Rebuilds yard databases. Use when gems have changed versions.
def load_yard_gems(*gems); Yard.load_yard_gems(*gems); end

# An Agent who saves all Bond.complete missions and executes the correct one when a completion is called.
def agent; M.agent; end

Expand Down
5 changes: 1 addition & 4 deletions lib/bond/completions/bond.rb
Expand Up @@ -2,8 +2,5 @@
["on", "method", "methods", "class", "object", "anywhere", "prefix", "search", "action", "place", "name"]
}
complete(:methods=>['Bond.start', 'Bond.restart']) {
%w{gems yard_gems readline_plugin default_mission default_search eval_binding debug eval_debug bare}
}
complete(:method=>'Bond.load_yard_gems') {
["verbose", "reload"]
%w{gems readline_plugin default_mission default_search eval_binding debug eval_debug bare}
}
1 change: 0 additions & 1 deletion lib/bond/m.rb
Expand Up @@ -129,7 +129,6 @@ def load_completions
load_file File.join(File.dirname(__FILE__), 'completion.rb') unless config[:bare]
load_dir File.dirname(__FILE__) unless config[:bare]
load_gems *config[:gems] if config[:gems]
Yard.load_yard_gems *config[:yard_gems] if config[:yard_gems]
load_file(File.join(home,'.bondrc')) if File.exists?(File.join(home, '.bondrc')) && !config[:bare]
load_dir File.join(home, '.bond') unless config[:bare]
end
Expand Down
73 changes: 0 additions & 73 deletions lib/bond/yard.rb

This file was deleted.

117 changes: 0 additions & 117 deletions test/yard_test.rb

This file was deleted.

0 comments on commit 63f50f7

Please sign in to comment.