Skip to content

Commit 5f6b0b0

Browse files
authored
Merge branch 'master' into dependabot/bundler/examples/simple_rails_api/rack-2.2.3.1
2 parents dd14077 + e97007b commit 5f6b0b0

File tree

4 files changed

+29
-20
lines changed

4 files changed

+29
-20
lines changed

README.adoc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
:icons: font
1111
:license: apache
1212

13+
== New Rules Ruby!
14+
15+
This repo will be retired eventually, as these rules have not been actively maintained and are in the process of being replaced by the new rules, which you can find here: https://github.com/bazel-contrib/rules_ruby
16+
17+
18+
1319

14-
====
15-
This repo is primarily maintained by https://github.com/kigster[Konstantin Gredeskoul] and https://github.com/yugui[Yuki "Yugui" Sonoda]. We are both very busy and would really love more contributors to join the core team. If you are interested in developing Ruby Rules for Bazel, please submit a couple of PRs and then lets talk!
16-
====
1720

1821
TIP: You can read or print this README in a proper PDF format by grabbing our link:README.pdf[README.pdf].
1922

@@ -205,7 +208,7 @@ ruby_rspec(
205208
specs = glob(["spec/**/*.rb"]),
206209
rspec_args = { "--format": "progress" },
207210
deps = [":foo"]
208-
}
211+
)
209212
----
210213

211214
==== Package Ruby files as a Gem

examples/simple_rails_api/Gemfile.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ GEM
6060
msgpack (~> 1.0)
6161
builder (3.2.4)
6262
byebug (11.1.3)
63-
concurrent-ruby (1.1.9)
63+
concurrent-ruby (1.1.10)
6464
crass (1.0.6)
6565
erubi (1.10.0)
6666
ffi (1.15.4)
67-
globalid (0.5.2)
67+
globalid (1.0.1)
6868
activesupport (>= 5.0)
69-
i18n (1.8.10)
69+
i18n (1.12.0)
7070
concurrent-ruby (~> 1.0)
7171
listen (3.0.8)
7272
rb-fsevent (~> 0.9, >= 0.9.4)
@@ -80,7 +80,7 @@ GEM
8080
method_source (1.0.0)
8181
mini_mime (1.1.1)
8282
mini_portile2 (2.8.0)
83-
minitest (5.14.4)
83+
minitest (5.17.0)
8484
msgpack (1.4.2)
8585
nio4r (2.5.8)
8686
nokogiri (1.13.4)
@@ -136,12 +136,12 @@ GEM
136136
sqlite3 (1.4.2)
137137
thor (1.1.0)
138138
thread_safe (0.3.6)
139-
tzinfo (1.2.9)
139+
tzinfo (1.2.10)
140140
thread_safe (~> 0.1)
141141
websocket-driver (0.7.5)
142142
websocket-extensions (>= 0.1.0)
143143
websocket-extensions (0.1.5)
144-
zeitwerk (2.4.2)
144+
zeitwerk (2.6.6)
145145

146146
PLATFORMS
147147
ruby

ruby/private/bundle/create_bundle_build_file.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@
8484
Dir.glob("lib/#{RbConfig::CONFIG['RUBY_INSTALL_NAME']}/#{ruby_version}/specifications/#{gem_name}-#{gem_version}*.gemspec").first
8585
end
8686

87+
HERE = File.absolute_path '.'
88+
8789
require 'bundler'
8890
require 'json'
8991
require 'stringio'
@@ -271,7 +273,15 @@ def register_gem(spec, template_out, bundle_lib_paths, bundle_binaries)
271273
# Usually, registering the directory paths listed in the `require_paths` of gemspecs is sufficient, but
272274
# some gems also require additional paths to be included in the load paths.
273275
require_paths += include_array(spec.name)
274-
gem_lib_paths = require_paths.map { |require_path| File.join(gem_path, require_path) }
276+
gem_lib_paths = require_paths.map do |require_path|
277+
# Gems with native extensions (like ffi) will sometimes have elements of
278+
# require_paths that are absolute rather than gem-path relative paths.
279+
# It is incorrect to prepend those paths with the gem_path and Bazel will
280+
# only allow relative paths as inputs to its glob() function.
281+
pathname = Pathname.new(require_path)
282+
pathname.absolute? ? pathname.relative_path_from(HERE).to_s : File.join(gem_path, require_path)
283+
end
284+
275285
bundle_lib_paths.push(*gem_lib_paths)
276286

277287
# paths to search for executables

ruby/private/sdk.bzl

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,22 @@ def rules_ruby_select_sdk(version = "host"):
88

99
supported_versions = [
1010
"host",
11-
"2.5.8",
12-
"2.5.9",
13-
"2.6.3",
14-
"2.6.4",
15-
"2.6.5",
16-
"2.6.6",
17-
"2.6.7",
18-
"2.6.8",
19-
"2.6.9",
11+
"2.7.0",
2012
"2.7.1",
2113
"2.7.2",
2214
"2.7.3",
2315
"2.7.4",
2416
"2.7.5",
17+
"2.7.6",
2518
"3.0.0",
2619
"3.0.1",
2720
"3.0.2",
2821
"3.0.3",
22+
"3.0.4",
2923
"3.1.0",
3024
"3.1.1",
25+
"3.1.2",
26+
"3.2.0",
3127
]
3228

3329
if version in supported_versions:

0 commit comments

Comments
 (0)