aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/plugin/dsl.rb
diff options
context:
space:
mode:
authorAsutosh Palai <asupalai@gmail.com>2016-06-08 20:29:25 +0530
committerAsutosh Palai <asupalai@gmail.com>2016-06-08 20:57:53 +0530
commitd90208f9d977cca6254458d402d2e2d975034495 (patch)
treea56372ad2db2f34e93ff26c024093521c2683c36 /lib/bundler/plugin/dsl.rb
parentcf284c001657a428cc37b4721aed68df795dcfed (diff)
downloadbundler-d90208f9d977cca6254458d402d2e2d975034495.tar.gz
Fixes for failing specs for older ruby version
Diffstat (limited to 'lib/bundler/plugin/dsl.rb')
-rw-r--r--lib/bundler/plugin/dsl.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bundler/plugin/dsl.rb b/lib/bundler/plugin/dsl.rb
index 4a3663fd..f65054f0 100644
--- a/lib/bundler/plugin/dsl.rb
+++ b/lib/bundler/plugin/dsl.rb
@@ -4,6 +4,7 @@ module Bundler
# Dsl to parse the Gemfile looking for plugins to install
module Plugin
class DSL < Bundler::Dsl
+ class PluginGemfileError < PluginError; end
alias_method :_gem, :gem # To use for plugin installation as gem
# So that we don't have to override all there methods to dummy ones
@@ -21,7 +22,7 @@ module Bundler
end
def method_missing(name, *args)
- super unless Bundler::Dsl.instance_methods.include? name
+ raise PluginGemfileError, "Undefined local variable or method `#{name}' for Gemfile" unless Bundler::Dsl.method_defined? name
end
end
end