Skip to content

Commit caa7285

Browse files
authored
Update for ruby 3.2 (#473)
* Attempt to update for ruby 3.2 again (after ASF INFRA-27632 has been completed) * Also update README and switch to more vendor-neutral OCI standard Containerfile with podman as the reference command instead of docker * Make commands in README work with both docker and podman
1 parent 5caa9df commit caa7285

5 files changed

Lines changed: 46 additions & 101 deletions

File tree

File renamed without changes.

Gemfile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
ruby '>=2.7'
1+
ruby '>=3.2'
22
source 'https://rubygems.org'
33
gem 'jekyll', '>= 4.2.0'
44
gem 'jekyll-redirect-from', '>= 0.16.0'
5-
6-
gem "webrick", "~> 1.8"
7-
gem "google-protobuf", "3.25.5"

Gemfile.lock

Lines changed: 10 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,19 @@ GEM
44
addressable (2.8.8)
55
public_suffix (>= 2.0.2, < 8.0)
66
base64 (0.3.0)
7+
bigdecimal (4.0.1)
78
colorator (1.1.0)
89
concurrent-ruby (1.3.6)
910
csv (3.3.5)
1011
em-websocket (0.5.3)
1112
eventmachine (>= 0.12.9)
1213
http_parser.rb (~> 0)
1314
eventmachine (1.2.7)
14-
ffi (1.17.3)
15+
ffi (1.17.3-x86_64-linux-gnu)
1516
forwardable-extended (2.6.0)
16-
google-protobuf (3.25.5)
17-
google-protobuf (3.25.5-aarch64-linux)
18-
google-protobuf (3.25.5-arm64-darwin)
19-
google-protobuf (3.25.5-x86-linux)
20-
google-protobuf (3.25.5-x86_64-darwin)
21-
google-protobuf (3.25.5-x86_64-linux)
17+
google-protobuf (4.33.5-x86_64-linux-gnu)
18+
bigdecimal
19+
rake (>= 13)
2220
http_parser.rb (0.8.1)
2321
i18n (1.14.8)
2422
concurrent-ruby (~> 1.0)
@@ -62,94 +60,29 @@ GEM
6260
pathutil (0.16.2)
6361
forwardable-extended (~> 2.6)
6462
public_suffix (7.0.2)
63+
rake (13.3.1)
6564
rb-fsevent (0.11.2)
6665
rb-inotify (0.11.1)
6766
ffi (~> 1.0)
6867
rexml (3.4.4)
6968
rouge (4.7.0)
7069
safe_yaml (1.0.5)
71-
sass-embedded (1.77.5-aarch64-linux-android)
72-
google-protobuf (>= 3.25, < 5.0)
73-
sass-embedded (1.77.5-aarch64-linux-gnu)
74-
google-protobuf (>= 3.25, < 5.0)
75-
sass-embedded (1.77.5-aarch64-linux-musl)
76-
google-protobuf (>= 3.25, < 5.0)
77-
sass-embedded (1.77.5-aarch64-mingw-ucrt)
78-
google-protobuf (>= 3.25, < 5.0)
79-
sass-embedded (1.77.5-arm-linux-androideabi)
80-
google-protobuf (>= 3.25, < 5.0)
81-
sass-embedded (1.77.5-arm-linux-gnueabihf)
82-
google-protobuf (>= 3.25, < 5.0)
83-
sass-embedded (1.77.5-arm-linux-musleabihf)
84-
google-protobuf (>= 3.25, < 5.0)
85-
sass-embedded (1.77.5-arm64-darwin)
86-
google-protobuf (>= 3.25, < 5.0)
87-
sass-embedded (1.77.5-riscv64-linux-android)
88-
google-protobuf (>= 3.25, < 5.0)
89-
sass-embedded (1.77.5-riscv64-linux-gnu)
90-
google-protobuf (>= 3.25, < 5.0)
91-
sass-embedded (1.77.5-riscv64-linux-musl)
92-
google-protobuf (>= 3.25, < 5.0)
93-
sass-embedded (1.77.5-x86-cygwin)
94-
google-protobuf (>= 3.25, < 5.0)
95-
sass-embedded (1.77.5-x86-linux-android)
96-
google-protobuf (>= 3.25, < 5.0)
97-
sass-embedded (1.77.5-x86-linux-gnu)
98-
google-protobuf (>= 3.25, < 5.0)
99-
sass-embedded (1.77.5-x86-linux-musl)
100-
google-protobuf (>= 3.25, < 5.0)
101-
sass-embedded (1.77.5-x86-mingw-ucrt)
102-
google-protobuf (>= 3.25, < 5.0)
103-
sass-embedded (1.77.5-x86_64-cygwin)
104-
google-protobuf (>= 3.25, < 5.0)
105-
sass-embedded (1.77.5-x86_64-darwin)
106-
google-protobuf (>= 3.25, < 5.0)
107-
sass-embedded (1.77.5-x86_64-linux-android)
108-
google-protobuf (>= 3.25, < 5.0)
109-
sass-embedded (1.77.5-x86_64-linux-gnu)
110-
google-protobuf (>= 3.25, < 5.0)
111-
sass-embedded (1.77.5-x86_64-linux-musl)
112-
google-protobuf (>= 3.25, < 5.0)
70+
sass-embedded (1.97.3-x86_64-linux-gnu)
71+
google-protobuf (~> 4.31)
11372
terminal-table (3.0.2)
11473
unicode-display_width (>= 1.1.1, < 3)
11574
unicode-display_width (2.6.0)
11675
webrick (1.9.2)
11776

11877
PLATFORMS
119-
aarch64-linux
120-
aarch64-linux
121-
aarch64-linux-android
122-
aarch64-linux-musl
123-
aarch64-mingw-ucrt
124-
arm-linux
125-
arm-linux
126-
arm-linux-androideabi
127-
arm-linux-musl
128-
arm-linux-musleabihf
129-
arm64-darwin
130-
riscv64-linux
131-
riscv64-linux-android
132-
riscv64-linux-musl
133-
x86-cygwin
134-
x86-linux
135-
x86-linux
136-
x86-linux-android
137-
x86-linux-musl
138-
x86-mingw-ucrt
139-
x86_64-cygwin
140-
x86_64-darwin
14178
x86_64-linux
142-
x86_64-linux-android
143-
x86_64-linux-musl
14479

14580
DEPENDENCIES
146-
google-protobuf (= 3.25.5)
14781
jekyll (>= 4.2.0)
14882
jekyll-redirect-from (>= 0.16.0)
149-
webrick (~> 1.8)
15083

15184
RUBY VERSION
152-
ruby 3.3.4p94
85+
ruby 3.2.2
15386

15487
BUNDLED WITH
155-
2.5.16
88+
4.0.6

README.md

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -107,44 +107,59 @@ HTML styled "just right".
107107
Jekyll will print a local URL where the site can be viewed (usually,
108108
[http://0.0.0.0:4000/](http://0.0.0.0:4000/)).
109109

110-
### Testing using Docker environment
110+
### Testing using a Container environment
111+
112+
Note: The example commands below use `podman`, but you can replace it with a
113+
compatible tool, such as `docker`.
111114

112115
A containerized development environment can be built using the local
113-
Dockerfile. You can build it with the following command:
116+
Containerfile. You can build it with the following command:
114117

115118
```bash
116-
docker build -t webdev .
119+
podman build -t webdev -f Containerfile .
117120
```
118121

119122
This action will produce a `webdev` image, with all the website's build
120-
prerequisites preinstalled. When a container is run from this image, it
121-
will perform a `jekyll serve` command with the polling option enabled,
122-
so that changes you make locally will be immediately reflected after
123-
reloading the page in your browser.
124-
125-
When you run a container using the webdev image, your current working
126-
directory will be mounted, so that any changes made by the build inside
127-
the container will be reflected in your local workspace. This is done with
128-
the `-v` flag. To run the container, execute the following command:
123+
prerequisites preinstalled. When a container is run from this image, it will
124+
perform a `jekyll serve` command with the polling option enabled, so that
125+
changes you make locally will be immediately reflected after reloading the page
126+
in your browser. To run the container, execute the following command:
129127

130128
```bash
131-
docker run -d -v "$PWD":/mnt/workdir -p 4000:4000 webdev
129+
podman run -i -t --rm -v "$(pwd)":/mnt/workdir:Z -p 4000:4000 webdev
132130
```
133131

132+
Flags used in this command are as follows:
133+
134+
* `-i` : run interactively, to send keyboard commands to the process
135+
* `-t` : allocate a psuedo-TTY, to send signals like with Ctrl-C to exit
136+
* `--rm` : clean up the container resources after exiting
137+
* `-v "$(pwd)":/mnt/workdir:Z` : mount your current working directory, so that
138+
any changes made by the build inside the container will be reflected in the
139+
local workspace on the host; `:Z` causes the host files to be labeled for
140+
SELinux, so the container can access them; the most recent container running
141+
will relabel for its own access; use lower-case `:z` instead, if you need the
142+
directory to be shared across multiple running containers at the same time;
143+
restore any labels to their system defaults with `restorecon -RFv .`.
144+
* `-p 4000:4000` : forward port TCP from the container to the host, so you can
145+
view the served Jekyll site in a browser on the host
146+
134147
While this container is running, you will be able to review the rendered website
135148
in your local browser at [http://127.0.0.1:4000/](http://127.0.0.1:4000/).
136149

137150
Shell access can be obtained by overriding the default container command.
138151

139-
This is useful for adding new gems, or modifying the Gemfile.lock for updating
140-
existing dependencies.
152+
This is useful for adding new gems to `Gemfile` or to run `bundle update` to
153+
update the existing dependencies in `Gemfile.lock`.
154+
155+
When using shell access, the local directory must be mounted to ensure the
156+
`Gemfile` and `Gemfile.lock` updates are reflected in your local environment so
157+
you can create a commit and submit a PR.
141158

142-
When using shell access, the local directory must be mounted to ensure
143-
the Gemfile and Gemfile.lock updates are reflected in your local
144-
environment so you can create a commit and submit a PR.
159+
To do this, execute the same command as before, but with `/bin/bash` on the end:
145160

146161
```bash
147-
docker run -v "$PWD":/mnt/workdir -it webdev /bin/bash
162+
podman run -i -t --rm -v "$(pwd)":/mnt/workdir:Z -p 4000:4000 webdev /bin/bash
148163
```
149164

150165
You may need to manually delete the `_site` or `.jekyll-cache` directories if

css/accumulo.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
---
33

4-
@import "syntax-highlighting";
4+
@use "syntax-highlighting";
55

66
table {
77
margin: 10px 0px 30px 0px;

0 commit comments

Comments
 (0)