Commit Graph

14 Commits

Author SHA1 Message Date
John Mair 98c3272a75 .puts -> warn, fixes #429 2012-01-23 16:40:40 +13:00
John Mair b2bce306ad added exact error message to plugin warning when gem is found but not loaded 2011-12-11 04:13:42 +13:00
John Mair 9142aa173f Added Pry::CLI class for processing command line options, with plugin support.
Plugins can define their own command line options by having a lib/plugin_name/cli.rb file. If this file exists
it is loaded immediately before command line options are processed. The contents of the file should be along the lines of:

Pry::CLI.add_options do
  on "my-option", "My first option!" do
    puts "I just defined an option!"
  end
end
2011-12-09 03:14:33 +13:00
John Mair cab51af3ef extracted initial_session_setup method from Pry.start; invoking :when_started hook in Pry.start 2011-11-13 04:31:43 +13:00
John Mair aba38ea9e8 refactored plugin code: 1. should not warn when activate called twice on a gem that has already been activated (but ceases to be accessible due to bundler, robgleeson's bug). 2. calling activate on a non-existent plugin should warn not raise 2011-09-02 04:16:43 +12:00
John Mair ef7ebbc61e converted plugin load failtures from exceptions to warnings, bump to version 0.9.3pre1 2011-07-25 19:43:34 +12:00
John Mair 8133fd8914 added gemspec to Plugin object, so can extract summary/description etc 2011-06-17 01:43:45 +12:00
John Mair 6888630212 plugin activation/disabling errors can be turned off using Pry.config.plugins.strict_loading = false 2011-06-02 21:45:53 +12:00
David Palm bafff3dc7d rubygems 1.8.x compatibility fixes applied to dev branch 2011-06-01 08:47:14 +02:00
John Mair 2982f5c6b8 plugins are now enabled when explicitly activated! (even if previously disabled) 2011-05-23 22:29:09 +12:00
John Mair 54de8361e2 many changes to plugins, command processor etc, just saving state 2011-05-23 19:11:41 +12:00
John Mair 08b76a555b further basic work on plugin system, for run-time activation of plugins. Added Pry.init for basic initialization of Pry 2011-05-19 15:31:29 +12:00
John Mair 0fa64814b1 documentation for plugins.rb 2011-05-16 04:19:13 +12:00
John Mair f993448fb6 first stab at plugin system 2011-05-15 23:49:15 +12:00