From 6f18041222f195e08e983b4cbcdafdc22d60c4e9 Mon Sep 17 00:00:00 2001 From: Jan Makara Date: Mon, 11 Nov 2024 13:15:25 +0100 Subject: [PATCH] bump default ruby to 3.3.6, bump default rails to 8.0.0 --- Dockerfile | 2 +- Dockerfile.unix | 2 +- src/docker_client.rs | 32 ++++++++++++++++---------------- src/rails_new.rs | 8 ++++---- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5b0968f..da8c802 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG RUBY_VERSION=3.3.5 +ARG RUBY_VERSION=3.3.6 FROM ruby:${RUBY_VERSION} ARG NODE_VERSION=22 diff --git a/Dockerfile.unix b/Dockerfile.unix index 095037b..f6c99f7 100644 --- a/Dockerfile.unix +++ b/Dockerfile.unix @@ -1,4 +1,4 @@ -ARG RUBY_VERSION=3.3.5 +ARG RUBY_VERSION=3.3.6 FROM ruby:${RUBY_VERSION} ARG USER_ID=1000 diff --git a/src/docker_client.rs b/src/docker_client.rs index 57caaf6..9c1c738 100644 --- a/src/docker_client.rs +++ b/src/docker_client.rs @@ -90,7 +90,7 @@ mod tests { #[test] fn build_image() { - let command = DockerClient::build_image("3.3.5", "7.2.1", None, None); + let command = DockerClient::build_image("3.3.6", "8.0.0", None, None); assert_eq!(command.get_program(), "docker"); @@ -101,11 +101,11 @@ mod tests { &[ "build", "--build-arg", - "RUBY_VERSION=3.3.5", + "RUBY_VERSION=3.3.6", "--build-arg", - "RAILS_VERSION=7.2.1", + "RAILS_VERSION=8.0.0", "-t", - "rails-new-3.3.5-7.2.1", + "rails-new-3.3.6-8.0.0", "-", ] ); @@ -113,7 +113,7 @@ mod tests { #[test] fn build_image_with_user_id() { - let command = DockerClient::build_image("3.3.5", "7.2.1", Some(1000), None); + let command = DockerClient::build_image("3.3.6", "8.0.0", Some(1000), None); assert_eq!(command.get_program(), "docker"); @@ -124,13 +124,13 @@ mod tests { &[ "build", "--build-arg", - "RUBY_VERSION=3.3.5", + "RUBY_VERSION=3.3.6", "--build-arg", - "RAILS_VERSION=7.2.1", + "RAILS_VERSION=8.0.0", "--build-arg", "USER_ID=1000", "-t", - "rails-new-3.3.5-7.2.1", + "rails-new-3.3.6-8.0.0", "-", ] ); @@ -138,7 +138,7 @@ mod tests { #[test] fn build_image_with_group_id() { - let command = DockerClient::build_image("3.3.5", "7.2.1", None, Some(1000)); + let command = DockerClient::build_image("3.3.6", "8.0.0", None, Some(1000)); assert_eq!(command.get_program(), "docker"); @@ -149,13 +149,13 @@ mod tests { &[ "build", "--build-arg", - "RUBY_VERSION=3.3.5", + "RUBY_VERSION=3.3.6", "--build-arg", - "RAILS_VERSION=7.2.1", + "RAILS_VERSION=8.0.0", "--build-arg", "GROUP_ID=1000", "-t", - "rails-new-3.3.5-7.2.1", + "rails-new-3.3.6-8.0.0", "-", ] ); @@ -163,7 +163,7 @@ mod tests { #[test] fn run_image() { - let command = DockerClient::run_image("3.3.5", "7.2.1", vec!["my_app".to_string()]); + let command = DockerClient::run_image("3.3.6", "8.0.0", vec!["my_app".to_string()]); assert_eq!(command.get_program(), "docker"); @@ -182,7 +182,7 @@ mod tests { &format!("{}:{}", current_dir, current_dir), "-w", current_dir, - "rails-new-3.3.5-7.2.1", + "rails-new-3.3.6-8.0.0", "rails", "new", "my_app", @@ -192,7 +192,7 @@ mod tests { #[test] fn get_help() { - let command = DockerClient::get_help("3.3.5", "7.2.1"); + let command = DockerClient::get_help("3.3.6", "8.0.0"); assert_eq!(command.get_program(), "docker"); @@ -203,7 +203,7 @@ mod tests { &[ "run", "--rm", - "rails-new-3.3.5-7.2.1", + "rails-new-3.3.6-8.0.0", "rails", "new", "--help", diff --git a/src/rails_new.rs b/src/rails_new.rs index 8fb41ff..570a8d4 100644 --- a/src/rails_new.rs +++ b/src/rails_new.rs @@ -6,9 +6,9 @@ pub struct Cli { #[clap(trailing_var_arg = true, required = true)] /// arguments passed to `rails new` pub args: Vec, - #[clap(long, short = 'u', default_value = "3.3.5")] + #[clap(long, short = 'u', default_value = "3.3.6")] pub ruby_version: String, - #[clap(long, short = 'r', default_value = "7.2.1")] + #[clap(long, short = 'r', default_value = "8.0.0")] pub rails_version: String, #[command(subcommand)] @@ -54,8 +54,8 @@ mod tests { let ruby_version = m.get_one::("ruby_version").unwrap(); let rails_version = m.get_one::("rails_version").unwrap(); - assert_eq!(ruby_version, "3.3.5"); - assert_eq!(rails_version, "7.2.1"); + assert_eq!(ruby_version, "3.3.6"); + assert_eq!(rails_version, "8.0.0"); Ok(()) }