summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordon Bedwell <jordon@envygeeks.com>2012-02-29 18:04:09 -0600
committerJordon Bedwell <jordon@envygeeks.com>2012-02-29 18:04:09 -0600
commit7f577c7a1687cdffe56eb107cf23e282b61bec98 (patch)
tree54167f4640ac6e4d9c90f81f2fd0d7bb598adb38
parent09add997b5e525a32d1f39cf391d3d9b84b04872 (diff)
downloadpry-7f577c7a1687cdffe56eb107cf23e282b61bec98.tar.gz
Refresh plugins on each load.
-rw-r--r--lib/pry/plugins.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pry/plugins.rb b/lib/pry/plugins.rb
index 7a46bb5b..8c927804 100644
--- a/lib/pry/plugins.rb
+++ b/lib/pry/plugins.rb
@@ -4,7 +4,7 @@
class Pry
class Plugins
PREFIX = /^pry-/
- Gem.refresh
+
Pry::Config.plugins = OpenStruct.new
Pry::Config.user = OpenStruct.new
Pry::Plugins.const_set(:User, Class.new)
@@ -55,6 +55,8 @@ class Pry
end
def load
+ Gem.refresh
+
Gem::Specification.reject { |gem| gem.name !~ /\A#{prefix}/ }.each do |plugin|
unless @user_disabled.include?(plugin.name)
begin