lib/wagn.rb in wagn-1.19.4 vs lib/wagn.rb in wagn-1.19.5

- old
+ new

@@ -20,7 +20,22 @@ end def gem_root WAGN_GEM_ROOT end + + def card_gem_root + @card_gem_root ||= locate_gem "card" + end + + private + + def locate_gem name + spec = Bundler.load.specs.find { |s| s.name == name } + unless spec + raise GemNotFound, "Could not find gem '#{name}' in the current bundle." + end + return File.expand_path("../../../", __FILE__) if spec.name == "bundler" + spec.full_gem_path + end end end