diff --git a/compiled_starters/ruby/.codecrafters/run.sh b/compiled_starters/ruby/.codecrafters/run.sh index d6d88c5..619aa01 100755 --- a/compiled_starters/ruby/.codecrafters/run.sh +++ b/compiled_starters/ruby/.codecrafters/run.sh @@ -8,4 +8,4 @@ set -e # Exit on failure -exec bundle exec ruby app/server.rb "$@" +exec bundle exec ruby app/main.rb "$@" diff --git a/compiled_starters/ruby/README.md b/compiled_starters/ruby/README.md index c6ce1a8..b4f4bba 100644 --- a/compiled_starters/ruby/README.md +++ b/compiled_starters/ruby/README.md @@ -16,7 +16,7 @@ and more. # Passing the first stage -The entry point for your HTTP server implementation is in `app/server.rb`. Study +The entry point for your HTTP server implementation is in `app/main.rb`. Study and uncomment the relevant code, and push your changes to pass the first stage: ```sh @@ -30,8 +30,8 @@ Time to move on to the next stage! Note: This section is for stages 2 and beyond. -1. Ensure you have `ruby (3.3)` installed locally +1. Ensure you have `ruby (3.4)` installed locally 1. Run `./your_program.sh` to run your program, which is implemented in - `app/server.rb`. + `app/main.rb`. 1. Commit your changes and run `git push origin master` to submit your solution to CodeCrafters. Test output will be streamed to your terminal. diff --git a/compiled_starters/ruby/app/server.rb b/compiled_starters/ruby/app/main.rb similarity index 100% rename from compiled_starters/ruby/app/server.rb rename to compiled_starters/ruby/app/main.rb diff --git a/compiled_starters/ruby/codecrafters.yml b/compiled_starters/ruby/codecrafters.yml index 09d9152..d4cad15 100644 --- a/compiled_starters/ruby/codecrafters.yml +++ b/compiled_starters/ruby/codecrafters.yml @@ -7,5 +7,5 @@ debug: false # Use this to change the Ruby version used to run your code # on Codecrafters. # -# Available versions: ruby-3.3 -buildpack: ruby-3.3 +# Available versions: ruby-3.4 +buildpack: ruby-3.4 diff --git a/compiled_starters/ruby/your_program.sh b/compiled_starters/ruby/your_program.sh index 604d815..fcb2853 100755 --- a/compiled_starters/ruby/your_program.sh +++ b/compiled_starters/ruby/your_program.sh @@ -12,4 +12,4 @@ set -e # Exit early if any commands fail # # - Edit this to change how your program runs locally # - Edit .codecrafters/run.sh to change how your program runs remotely -exec bundle exec ruby app/server.rb "$@" +exec bundle exec ruby app/main.rb "$@" diff --git a/dockerfiles/ruby-3.4.Dockerfile b/dockerfiles/ruby-3.4.Dockerfile new file mode 100644 index 0000000..9140b73 --- /dev/null +++ b/dockerfiles/ruby-3.4.Dockerfile @@ -0,0 +1,19 @@ +# syntax=docker/dockerfile:1.7-labs +FROM ruby:3.4-alpine3.23 + +# Required for installing the json/async gems +RUN apk add --no-cache \ + build-base~=0.5 \ + libssl3~=3.5 \ + readline-dev~=8.3 \ + zlib-dev~=1.3 + +# Re-build if Gemfile or Gemfile.lock changes +ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="Gemfile,Gemfile.lock" + +WORKDIR /app + +# .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses +COPY --exclude=.git --exclude=README.md . /app + +RUN bundle install --verbose diff --git a/solutions/ruby/01-at4/code/.codecrafters/run.sh b/solutions/ruby/01-at4/code/.codecrafters/run.sh index d6d88c5..619aa01 100755 --- a/solutions/ruby/01-at4/code/.codecrafters/run.sh +++ b/solutions/ruby/01-at4/code/.codecrafters/run.sh @@ -8,4 +8,4 @@ set -e # Exit on failure -exec bundle exec ruby app/server.rb "$@" +exec bundle exec ruby app/main.rb "$@" diff --git a/solutions/ruby/01-at4/code/README.md b/solutions/ruby/01-at4/code/README.md index c6ce1a8..b4f4bba 100644 --- a/solutions/ruby/01-at4/code/README.md +++ b/solutions/ruby/01-at4/code/README.md @@ -16,7 +16,7 @@ and more. # Passing the first stage -The entry point for your HTTP server implementation is in `app/server.rb`. Study +The entry point for your HTTP server implementation is in `app/main.rb`. Study and uncomment the relevant code, and push your changes to pass the first stage: ```sh @@ -30,8 +30,8 @@ Time to move on to the next stage! Note: This section is for stages 2 and beyond. -1. Ensure you have `ruby (3.3)` installed locally +1. Ensure you have `ruby (3.4)` installed locally 1. Run `./your_program.sh` to run your program, which is implemented in - `app/server.rb`. + `app/main.rb`. 1. Commit your changes and run `git push origin master` to submit your solution to CodeCrafters. Test output will be streamed to your terminal. diff --git a/solutions/ruby/01-at4/code/app/server.rb b/solutions/ruby/01-at4/code/app/main.rb similarity index 100% rename from solutions/ruby/01-at4/code/app/server.rb rename to solutions/ruby/01-at4/code/app/main.rb diff --git a/solutions/ruby/01-at4/code/codecrafters.yml b/solutions/ruby/01-at4/code/codecrafters.yml index 09d9152..d4cad15 100644 --- a/solutions/ruby/01-at4/code/codecrafters.yml +++ b/solutions/ruby/01-at4/code/codecrafters.yml @@ -7,5 +7,5 @@ debug: false # Use this to change the Ruby version used to run your code # on Codecrafters. # -# Available versions: ruby-3.3 -buildpack: ruby-3.3 +# Available versions: ruby-3.4 +buildpack: ruby-3.4 diff --git a/solutions/ruby/01-at4/code/your_program.sh b/solutions/ruby/01-at4/code/your_program.sh index 604d815..fcb2853 100755 --- a/solutions/ruby/01-at4/code/your_program.sh +++ b/solutions/ruby/01-at4/code/your_program.sh @@ -12,4 +12,4 @@ set -e # Exit early if any commands fail # # - Edit this to change how your program runs locally # - Edit .codecrafters/run.sh to change how your program runs remotely -exec bundle exec ruby app/server.rb "$@" +exec bundle exec ruby app/main.rb "$@" diff --git a/solutions/ruby/01-at4/diff/app/server.rb.diff b/solutions/ruby/01-at4/diff/app/main.rb.diff similarity index 100% rename from solutions/ruby/01-at4/diff/app/server.rb.diff rename to solutions/ruby/01-at4/diff/app/main.rb.diff diff --git a/starter_templates/ruby/code/.codecrafters/run.sh b/starter_templates/ruby/code/.codecrafters/run.sh index d6d88c5..619aa01 100755 --- a/starter_templates/ruby/code/.codecrafters/run.sh +++ b/starter_templates/ruby/code/.codecrafters/run.sh @@ -8,4 +8,4 @@ set -e # Exit on failure -exec bundle exec ruby app/server.rb "$@" +exec bundle exec ruby app/main.rb "$@" diff --git a/starter_templates/ruby/code/app/server.rb b/starter_templates/ruby/code/app/main.rb similarity index 100% rename from starter_templates/ruby/code/app/server.rb rename to starter_templates/ruby/code/app/main.rb diff --git a/starter_templates/ruby/config.yml b/starter_templates/ruby/config.yml index 2e68e84..bbda1a7 100644 --- a/starter_templates/ruby/config.yml +++ b/starter_templates/ruby/config.yml @@ -1,3 +1,3 @@ attributes: - required_executable: ruby (3.3) - user_editable_file: app/server.rb + required_executable: ruby (3.4) + user_editable_file: app/main.rb