File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 65
65
#
66
66
# Since OS platform is unlikely to change between Bazel builds on the same machine,
67
67
# `#{gem_name}-#{gem_version}*` would be sufficient to narrow down matches to at most one.
68
+ #
69
+ # Library path differs across implementations as `lib/ruby` on MRI and `lib/jruby` on JRuby.
68
70
GEM_PATH = -> ( ruby_version , gem_name , gem_version ) do
69
- Dir . glob ( "lib/ruby /#{ ruby_version } /gems/#{ gem_name } -#{ gem_version } *" ) . first
71
+ Dir . glob ( "lib/#{ RbConfig :: CONFIG [ 'RUBY_INSTALL_NAME' ] } /#{ ruby_version } /gems/#{ gem_name } -#{ gem_version } *" ) . first
70
72
end
71
73
72
74
# For ordinary gems, this path is like 'lib/ruby/3.0.0/specifications/rspec-3.10.0.gemspec'.
76
78
#
77
79
# Since OS platform is unlikely to change between Bazel builds on the same machine,
78
80
# `#{gem_name}-#{gem_version}*.gemspec` would be sufficient to narrow down matches to at most one.
81
+ #
82
+ # Library path differs across implementations as `lib/ruby` on MRI and `lib/jruby` on JRuby.
79
83
SPEC_PATH = -> ( ruby_version , gem_name , gem_version ) do
80
- Dir . glob ( "lib/ruby /#{ ruby_version } /specifications/#{ gem_name } -#{ gem_version } *.gemspec" ) . first
84
+ Dir . glob ( "lib/#{ RbConfig :: CONFIG [ 'RUBY_INSTALL_NAME' ] } /#{ ruby_version } /specifications/#{ gem_name } -#{ gem_version } *.gemspec" ) . first
81
85
end
82
86
83
87
require 'bundler'
You can’t perform that action at this time.
0 commit comments