Skip to content

Commit b83b77d

Browse files
committed
CC-2062: Update Ruby to 3.4
1 parent 02f7f19 commit b83b77d

File tree

15 files changed

+55
-17
lines changed

15 files changed

+55
-17
lines changed

compiled_starters/ruby/.codecrafters/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88

99
set -e # Exit on failure
1010

11-
exec bundle exec ruby app/server.rb "$@"
11+
exec bundle exec ruby app/main.rb "$@"

compiled_starters/ruby/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ and more.
1616

1717
# Passing the first stage
1818

19-
The entry point for your HTTP server implementation is in `app/server.rb`. Study
19+
The entry point for your HTTP server implementation is in `app/main.rb`. Study
2020
and uncomment the relevant code, and push your changes to pass the first stage:
2121

2222
```sh
@@ -30,8 +30,8 @@ Time to move on to the next stage!
3030

3131
Note: This section is for stages 2 and beyond.
3232

33-
1. Ensure you have `ruby (3.3)` installed locally
33+
1. Ensure you have `ruby (3.4)` installed locally
3434
1. Run `./your_program.sh` to run your program, which is implemented in
35-
`app/server.rb`.
35+
`app/main.rb`.
3636
1. Commit your changes and run `git push origin master` to submit your solution
3737
to CodeCrafters. Test output will be streamed to your terminal.

compiled_starters/ruby/app/main.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# You can use print statements as follows for debugging, they'll be visible when running tests.
2+
$stderr.puts "Logs from your program will appear here!"
3+
4+
# Uncomment this block to pass the first stage
5+
# puts "Implement code here!"

compiled_starters/ruby/codecrafters.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ debug: false
77
# Use this to change the Ruby version used to run your code
88
# on Codecrafters.
99
#
10-
# Available versions: ruby-3.3
11-
buildpack: ruby-3.3
10+
# Available versions: ruby-3.4
11+
buildpack: ruby-3.4

compiled_starters/ruby/your_program.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ set -e # Exit early if any commands fail
1212
#
1313
# - Edit this to change how your program runs locally
1414
# - Edit .codecrafters/run.sh to change how your program runs remotely
15-
exec bundle exec ruby app/server.rb "$@"
15+
exec bundle exec ruby app/main.rb "$@"

dockerfiles/ruby-3.4.Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# syntax=docker/dockerfile:1.7-labs
2+
FROM ruby:3.4-alpine3.23
3+
4+
# Required for installing the json/async gems
5+
RUN apk add --no-cache \
6+
build-base~=0.5 \
7+
libssl3~=3.5 \
8+
readline-dev~=8.3 \
9+
zlib-dev~=1.3
10+
11+
# Re-build if Gemfile or Gemfile.lock changes
12+
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="Gemfile,Gemfile.lock"
13+
14+
WORKDIR /app
15+
16+
# .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses
17+
COPY --exclude=.git --exclude=README.md . /app
18+
19+
RUN bundle install --verbose

solutions/ruby/01-at4/code/.codecrafters/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88

99
set -e # Exit on failure
1010

11-
exec bundle exec ruby app/server.rb "$@"
11+
exec bundle exec ruby app/main.rb "$@"

solutions/ruby/01-at4/code/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ and more.
1616

1717
# Passing the first stage
1818

19-
The entry point for your HTTP server implementation is in `app/server.rb`. Study
19+
The entry point for your HTTP server implementation is in `app/main.rb`. Study
2020
and uncomment the relevant code, and push your changes to pass the first stage:
2121

2222
```sh
@@ -30,8 +30,8 @@ Time to move on to the next stage!
3030

3131
Note: This section is for stages 2 and beyond.
3232

33-
1. Ensure you have `ruby (3.3)` installed locally
33+
1. Ensure you have `ruby (3.4)` installed locally
3434
1. Run `./your_program.sh` to run your program, which is implemented in
35-
`app/server.rb`.
35+
`app/main.rb`.
3636
1. Commit your changes and run `git push origin master` to submit your solution
3737
to CodeCrafters. Test output will be streamed to your terminal.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Uncomment this block to pass the first stage
2+
# puts "Implement code here!"

solutions/ruby/01-at4/code/codecrafters.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ debug: false
77
# Use this to change the Ruby version used to run your code
88
# on Codecrafters.
99
#
10-
# Available versions: ruby-3.3
11-
buildpack: ruby-3.3
10+
# Available versions: ruby-3.4
11+
buildpack: ruby-3.4

0 commit comments

Comments
 (0)