lib/twirp_rails/twirp.rb in twirp_rails-0.3.2 vs lib/twirp_rails/twirp.rb in twirp_rails-0.4.0

- old
+ new

@@ -1,10 +1,9 @@ module TwirpRails module Twirp - def self.auto_require_twirp_files + def self.auto_require_twirp_files(twirp_path) # protoc generates require without path in a _pb files - twirp_path = Rails.root.join('lib/twirp').to_s - $LOAD_PATH.unshift(twirp_path) if !$LOAD_PATH.include?(twirp_path) + $LOAD_PATH.unshift(twirp_path) unless $LOAD_PATH.include?(twirp_path) Dir.glob(Rails.root.join('lib/twirp/**/*_twirp.rb')).sort.each do |file| require file end end