Sha256: 8005a6d489a9a807de459eb9efcec146c2e3cf4c15e838ee0123fc71bcf27b08

Contents?: true

Size: 384 Bytes

Versions: 11

Compression:

Stored size: 384 Bytes

Contents

module TwirpRails
  module Twirp
    def self.auto_require_twirp_files
      # 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)

      Dir.glob(Rails.root.join('lib/twirp/*_twirp.rb')).sort.each do |file|
        require file
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
twirp_rails-0.3.1 lib/twirp_rails/twirp.rb
twirp_rails-0.3.0 lib/twirp_rails/twirp.rb
twirp_rails-0.2.1 lib/twirp_rails/twirp.rb
twirp_rails-0.2.0 lib/twirp_rails/twirp.rb
twirp_rails-0.1.7 lib/twirp_rails/twirp.rb
twirp_rails-0.1.6 lib/twirp_rails/twirp.rb
twirp_rails-0.1.5 lib/twirp_rails/twirp.rb
twirp_rails-0.1.4 lib/twirp_rails/twirp.rb
twirp_rails-0.1.3 lib/twirp_rails/twirp.rb
twirp_rails-0.1.2 lib/twirp_rails/twirp.rb
twirp_rails-0.1.1 lib/twirp_rails/twirp.rb