Platinum Partner

Require A Gem Or Lib In /vendor In A Ruby On Rails App

checks for the existence of a lib in /vendor/YOURLIB/lib and requires that.  otherwise, it requires the gem.

def require_vendor_or_gem(*libs)
  libs.each do |lib|
    if File.directory?("#{RAILS_ROOT}/vendor/#{lib}/lib")
      $:.unshift("#{RAILS_ROOT}/vendor/#{lib}/lib")
      require_dependency lib.to_s
    else
      require_gem lib.to_s
    end
  end
end

require_vendor_or_gem 'sentry', 'money'


{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}