Skip to content

Commit

Permalink
Remove load path modification
Browse files Browse the repository at this point in the history
  • Loading branch information
Taucher2003 committed Aug 8, 2024
1 parent 0af0cf5 commit fd1a303
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions build/ruby/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ namespace :generate_ruby do
system!("bundle exec grpc_tools_ruby_protoc -I #{INPUT_INTERNAL_DIR} --ruby_out=#{OUTPUT_INTERNAL_DIR} --grpc_out=#{OUTPUT_INTERNAL_DIR} #{file}")
# rubocop:enable Layout/LineLength
end
Dir["#{OUTPUT_INTERNAL_DIR}/*_pb.rb"].each do |file|
code = File.read(file)
code = code.gsub(/require '(\S+)_pb'/, "require_relative '\\1_pb'")
File.write(file, code)
end
end
end

Expand Down
1 change: 0 additions & 1 deletion build/ruby/lib/tucana.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ class Error < StandardError; end
def self.load_protocol(protocol)
this_dir = File.expand_path(File.dirname(__FILE__))
protocol_dir = File.join(this_dir, "tucana/#{protocol}")
$LOAD_PATH.unshift(protocol_dir) unless $LOAD_PATH.include?(protocol_dir)

Dir["#{protocol_dir}/*_pb.rb"].each { |file| require file }
end
Expand Down

0 comments on commit fd1a303

Please sign in to comment.