Skip to content

Commit a2309dc

Browse files
kigstertsawadammizutani
authored
Bump Ruby primary to 3.0.2 & Add sdk versions: 2.5.9, 2.6.8, 2.7.3, 2.7.4, 3.0.2 (#114)
* Add sdk versions: 2.5.9, 2.6.8, 2.7.3, 2.7.4, 3.0.2 * Upgrading baseline ruby to 3.0.2 * Default to bash in the Docker image * Bump build * Update ruby/private/sdk.bzl Co-authored-by: Minoru Mizutani <[email protected]> * Fix the build * Hoping to fix buildifier errrors * Fix Docker image, setup link for python * Remove additional include Co-authored-by: Takeo Sawada <[email protected]> Co-authored-by: Minoru Mizutani <[email protected]>
1 parent 17471e2 commit a2309dc

40 files changed

+172
-139
lines changed

.circleci/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# rules_ruby circleci Docker file.
33
#
4-
FROM ruby:3.0.1
4+
FROM ruby:3.0.2
55

66
# make Apt non-interactive
77
RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90circleci \
@@ -95,7 +95,10 @@ RUN apt-get install -y openjdk-11-jdk python2.7 python3 golang-go
9595
RUN curl -L -o /usr/bin/bazel https://github.com/bazelbuild/bazelisk/releases/download/v1.3.0/bazelisk-linux-amd64 \
9696
&& sudo chmod +x /usr/bin/bazel
9797

98+
RUN cd /usr/bin && ln -s python3 python
99+
98100
USER circleci
99101
ENV PATH /home/circleci/.local/bin:/home/circleci/bin:/usr/local/bin:/usr/bin:/bin:/sbin:${PATH}
100102

101-
CMD ["/bin/sh"]
103+
104+
CMD ["/bin/bash"]

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
working_directory: /home/circleci/repo
66
resource_class: medium
77
docker:
8-
- image: bazelruby/ruby-3.0.1
8+
- image: bazelruby/ruby-3.0.2
99
environment:
1010
PATH: "/usr/local/bin:/usr/bin:/sbin:/opt/bin:/home/circleci/repo/bin:/bin:/sbin:/usr/sbin"
1111
BUNDLE_PATH: /home/circleci/.bundle_cache
@@ -24,7 +24,7 @@ jobs:
2424
- run:
2525
name: Install Bundler
2626
command: |
27-
gem install bundler:2.0.2 --no-doc
27+
gem install bundler:2.2.28 --no-doc
2828
bundle install --jobs=4 --retry=3 --path ${BUNDLE_PATH}
2929
3030
- run:

.envrc

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
# vi: ft=sh
22

33
PATH_add bin
4-
5-
[[ -n $(command -V brew) ]] && {
6-
completion="$(brew --prefix)/etc/bash_completion"
7-
[[ -f "${completion}" ]] && {
8-
echo "Loading bash completion"
9-
source "${completion}"
10-
}
11-
}
12-
134
eval "$(rbenv init -)"
145
rbenv local $(cat .ruby-version)
156
echo "Ruby Version is $(ruby --version)"

.rubocop.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
inherit_from: .relaxed-rubocop-2.4.yml
1+
inherit_from:
2+
- .rubocop_todo.yml
3+
- .relaxed-rubocop-2.4.yml
4+
5+
26

37
AllCops:
48
TargetRubyVersion: 2.6
@@ -23,6 +27,7 @@ AllCops:
2327
- '**/*.ru'
2428
- '**/Gemfile'
2529
- '**/Rakefile'
30+
NewCops: enable
2631

2732
Layout/HashAlignment:
2833
Enabled: true

.rubocop_todo.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This configuration was generated by
2+
# `rubocop --auto-gen-config`
3+
# on 2021-11-08 22:06:35 UTC using RuboCop version 0.93.1.
4+
# The point is for the user to remove these configuration records
5+
# one by one as the offenses are removed from the code base.
6+
# Note that changes in the inspected code, or installation of new
7+
# versions of RuboCop, may require this file to be generated again.
8+
9+
# Offense count: 1
10+
Lint/UnreachableLoop:
11+
Exclude:
12+
- 'ruby/tests/testdata/bundle_includes_workspace/script.rb'
13+
14+
# Offense count: 1
15+
# Cop supports --auto-correct.
16+
# Configuration parameters: EnforcedStyle.
17+
# SupportedStyles: always, always_true, never
18+
Style/FrozenStringLiteralComment:
19+
Exclude:
20+
- 'ruby/tests/testdata/bundle_includes_workspace/script.rb'

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.1
1+
3.0.2

Gemfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ GEM
22
remote: https://rubygems.org/
33
specs:
44
ast (2.4.2)
5-
parallel (1.20.1)
6-
parser (3.0.1.1)
5+
parallel (1.21.0)
6+
parser (3.0.2.0)
77
ast (~> 2.4.1)
88
rainbow (3.0.0)
99
regexp_parser (2.1.1)
@@ -17,10 +17,10 @@ GEM
1717
rubocop-ast (>= 0.6.0)
1818
ruby-progressbar (~> 1.7)
1919
unicode-display_width (>= 1.4.0, < 2.0)
20-
rubocop-ast (1.7.0)
20+
rubocop-ast (1.11.0)
2121
parser (>= 3.0.1.1)
2222
ruby-progressbar (1.11.0)
23-
unicode-display_width (1.7.0)
23+
unicode-display_width (1.8.0)
2424

2525
PLATFORMS
2626
ruby
@@ -30,4 +30,4 @@ DEPENDENCIES
3030
rubocop (~> 0.88)
3131

3232
BUNDLED WITH
33-
2.1.4
33+
2.2.27

README.adoc

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

13+
1314
====
1415
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!
1516
====
@@ -55,9 +56,7 @@ NOTE: we have a short guide on https://github.com/bazelruby/rules_ruby/wiki/Buil
5556
** <<table-of-contents,Table of Contents>>
5657
** <<usage,Usage>>
5758
*** <<workspace-file,`WORKSPACE` File>>
58-
*** <<buildbazel-files,`BUILD.bazel` file(s)>>
59-
*** <<tool-specific-setup,Tool Specific Setup>>
60-
*** <<rule-dependency-diagram,Rule Dependency Diagram>>
59+
*** <<buildbazel-files,`BUILD.bazel` file(s)>> *** <<tool-specific-setup,Tool Specific Setup>> *** <<rule-dependency-diagram,Rule Dependency Diagram>>
6160
** <<rules,Rules>>
6261
*** <<ruby_library,`ruby_library`>>
6362
*** <<ruby_binary,`ruby_binary`>>
@@ -114,7 +113,7 @@ rules_ruby_dependencies()
114113
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
115114
bazel_skylib_workspace()
116115
117-
rules_ruby_select_sdk(version = "3.0.1")
116+
rules_ruby_select_sdk(version = "3.0.2")
118117
119118
#———————————————————————————————————————————————————————————————————————
120119
# Now, load the ruby_bundle rule & install gems specified in the Gemfile

WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ load("@bazel_skylib//lib:versions.bzl", "versions")
1212

1313
versions.check("3.4.1")
1414

15-
rules_ruby_select_sdk("3.0.1")
15+
rules_ruby_select_sdk("3.0.2")
1616

1717
local_repository(
1818
name = "bazelruby_rules_ruby_ruby_tests_testdata_another_workspace",

bin/deps

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
# shellcheck disable=SC1090
1717
source "${BASHMATIC_HOME}/init.sh" 1>/dev/null 2>&1
18-
1918
command -v rbenv >/dev/null && eval "$(rbenv init -)"
2019

2120
__version.detect() {

examples/example_gem/WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ load(
1515

1616
rules_ruby_dependencies()
1717

18-
rules_ruby_select_sdk("3.0.1")
18+
rules_ruby_select_sdk("3.0.2")
1919

2020
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
2121

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,84 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actioncable (6.0.4)
5-
actionpack (= 6.0.4)
4+
actioncable (6.0.4.1)
5+
actionpack (= 6.0.4.1)
66
nio4r (~> 2.0)
77
websocket-driver (>= 0.6.1)
8-
actionmailbox (6.0.4)
9-
actionpack (= 6.0.4)
10-
activejob (= 6.0.4)
11-
activerecord (= 6.0.4)
12-
activestorage (= 6.0.4)
13-
activesupport (= 6.0.4)
8+
actionmailbox (6.0.4.1)
9+
actionpack (= 6.0.4.1)
10+
activejob (= 6.0.4.1)
11+
activerecord (= 6.0.4.1)
12+
activestorage (= 6.0.4.1)
13+
activesupport (= 6.0.4.1)
1414
mail (>= 2.7.1)
15-
actionmailer (6.0.4)
16-
actionpack (= 6.0.4)
17-
actionview (= 6.0.4)
18-
activejob (= 6.0.4)
15+
actionmailer (6.0.4.1)
16+
actionpack (= 6.0.4.1)
17+
actionview (= 6.0.4.1)
18+
activejob (= 6.0.4.1)
1919
mail (~> 2.5, >= 2.5.4)
2020
rails-dom-testing (~> 2.0)
21-
actionpack (6.0.4)
22-
actionview (= 6.0.4)
23-
activesupport (= 6.0.4)
21+
actionpack (6.0.4.1)
22+
actionview (= 6.0.4.1)
23+
activesupport (= 6.0.4.1)
2424
rack (~> 2.0, >= 2.0.8)
2525
rack-test (>= 0.6.3)
2626
rails-dom-testing (~> 2.0)
2727
rails-html-sanitizer (~> 1.0, >= 1.2.0)
28-
actiontext (6.0.4)
29-
actionpack (= 6.0.4)
30-
activerecord (= 6.0.4)
31-
activestorage (= 6.0.4)
32-
activesupport (= 6.0.4)
28+
actiontext (6.0.4.1)
29+
actionpack (= 6.0.4.1)
30+
activerecord (= 6.0.4.1)
31+
activestorage (= 6.0.4.1)
32+
activesupport (= 6.0.4.1)
3333
nokogiri (>= 1.8.5)
34-
actionview (6.0.4)
35-
activesupport (= 6.0.4)
34+
actionview (6.0.4.1)
35+
activesupport (= 6.0.4.1)
3636
builder (~> 3.1)
3737
erubi (~> 1.4)
3838
rails-dom-testing (~> 2.0)
3939
rails-html-sanitizer (~> 1.1, >= 1.2.0)
40-
activejob (6.0.4)
41-
activesupport (= 6.0.4)
40+
activejob (6.0.4.1)
41+
activesupport (= 6.0.4.1)
4242
globalid (>= 0.3.6)
43-
activemodel (6.0.4)
44-
activesupport (= 6.0.4)
45-
activerecord (6.0.4)
46-
activemodel (= 6.0.4)
47-
activesupport (= 6.0.4)
48-
activestorage (6.0.4)
49-
actionpack (= 6.0.4)
50-
activejob (= 6.0.4)
51-
activerecord (= 6.0.4)
43+
activemodel (6.0.4.1)
44+
activesupport (= 6.0.4.1)
45+
activerecord (6.0.4.1)
46+
activemodel (= 6.0.4.1)
47+
activesupport (= 6.0.4.1)
48+
activestorage (6.0.4.1)
49+
actionpack (= 6.0.4.1)
50+
activejob (= 6.0.4.1)
51+
activerecord (= 6.0.4.1)
5252
marcel (~> 1.0.0)
53-
activesupport (6.0.4)
53+
activesupport (6.0.4.1)
5454
concurrent-ruby (~> 1.0, >= 1.0.2)
5555
i18n (>= 0.7, < 2)
5656
minitest (~> 5.1)
5757
tzinfo (~> 1.1)
5858
zeitwerk (~> 2.2, >= 2.2.2)
59-
bootsnap (1.7.5)
59+
bootsnap (1.9.1)
6060
msgpack (~> 1.0)
6161
builder (3.2.4)
6262
byebug (11.1.3)
6363
concurrent-ruby (1.1.9)
6464
crass (1.0.6)
6565
erubi (1.10.0)
66-
ffi (1.15.3)
67-
globalid (0.4.2)
68-
activesupport (>= 4.2.0)
66+
ffi (1.15.4)
67+
globalid (0.5.2)
68+
activesupport (>= 5.0)
6969
i18n (1.8.10)
7070
concurrent-ruby (~> 1.0)
7171
listen (3.0.8)
7272
rb-fsevent (~> 0.9, >= 0.9.4)
7373
rb-inotify (~> 0.9, >= 0.9.7)
74-
loofah (2.10.0)
74+
loofah (2.12.0)
7575
crass (~> 1.0.2)
7676
nokogiri (>= 1.5.9)
7777
mail (2.7.1)
7878
mini_mime (>= 0.1.1)
79-
marcel (1.0.1)
79+
marcel (1.0.2)
8080
method_source (1.0.0)
81-
mini_mime (1.1.0)
81+
mini_mime (1.1.1)
8282
mini_portile2 (2.6.1)
8383
minitest (5.14.4)
8484
msgpack (1.4.2)
@@ -92,33 +92,33 @@ GEM
9292
rack (2.2.3)
9393
rack-test (1.1.0)
9494
rack (>= 1.0, < 3)
95-
rails (6.0.4)
96-
actioncable (= 6.0.4)
97-
actionmailbox (= 6.0.4)
98-
actionmailer (= 6.0.4)
99-
actionpack (= 6.0.4)
100-
actiontext (= 6.0.4)
101-
actionview (= 6.0.4)
102-
activejob (= 6.0.4)
103-
activemodel (= 6.0.4)
104-
activerecord (= 6.0.4)
105-
activestorage (= 6.0.4)
106-
activesupport (= 6.0.4)
95+
rails (6.0.4.1)
96+
actioncable (= 6.0.4.1)
97+
actionmailbox (= 6.0.4.1)
98+
actionmailer (= 6.0.4.1)
99+
actionpack (= 6.0.4.1)
100+
actiontext (= 6.0.4.1)
101+
actionview (= 6.0.4.1)
102+
activejob (= 6.0.4.1)
103+
activemodel (= 6.0.4.1)
104+
activerecord (= 6.0.4.1)
105+
activestorage (= 6.0.4.1)
106+
activesupport (= 6.0.4.1)
107107
bundler (>= 1.3.0)
108-
railties (= 6.0.4)
108+
railties (= 6.0.4.1)
109109
sprockets-rails (>= 2.0.0)
110110
rails-dom-testing (2.0.3)
111111
activesupport (>= 4.2.0)
112112
nokogiri (>= 1.6)
113-
rails-html-sanitizer (1.3.0)
113+
rails-html-sanitizer (1.4.2)
114114
loofah (~> 2.3)
115-
railties (6.0.4)
116-
actionpack (= 6.0.4)
117-
activesupport (= 6.0.4)
115+
railties (6.0.4.1)
116+
actionpack (= 6.0.4.1)
117+
activesupport (= 6.0.4.1)
118118
method_source
119119
rake (>= 0.8.7)
120120
thor (>= 0.20.3, < 2.0)
121-
rake (13.0.4)
121+
rake (13.0.6)
122122
rb-fsevent (0.11.0)
123123
rb-inotify (0.10.1)
124124
ffi (~> 1.0)
@@ -158,4 +158,4 @@ DEPENDENCIES
158158
tzinfo-data
159159

160160
BUNDLED WITH
161-
2.1.4
161+
2.2.24

examples/simple_rails_api/WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ load(
1515

1616
rules_ruby_dependencies()
1717

18-
rules_ruby_select_sdk(version = "3.0.1")
18+
rules_ruby_select_sdk(version = "3.0.2")
1919

2020
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
2121

examples/simple_script/.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.0.2

0 commit comments

Comments
 (0)