From 0d2e2aa472877820951f76c80994d8242f404bbe Mon Sep 17 00:00:00 2001 From: Jan Makara Date: Mon, 12 Aug 2024 02:03:21 +0200 Subject: [PATCH] bump default rails to 7.2.0 --- src/docker_client.rs | 26 +++++++++++++------------- src/rails_new.rs | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/docker_client.rs b/src/docker_client.rs index 1639657..85a6878 100644 --- a/src/docker_client.rs +++ b/src/docker_client.rs @@ -131,7 +131,7 @@ mod tests { #[test] fn build_image() { - let command = DockerClient::build_image("3.2.4", "7.1.3", "22.1", "1.22.22", None, None); + let command = DockerClient::build_image("3.2.4", "7.2.0", "22.1", "1.22.22", None, None); assert_eq!(command.get_program(), "docker"); @@ -144,13 +144,13 @@ mod tests { "--build-arg", "RUBY_VERSION=3.2.4", "--build-arg", - "RAILS_VERSION=7.1.3", + "RAILS_VERSION=7.2.0", "--build-arg", "NODE_VERSION=22.1", "--build-arg", "YARN_VERSION=1.22.22", "-t", - "rails-new-ruby-3.2.4-rails-7.1.3-node-22.1-yarn-1.22.22", + "rails-new-ruby-3.2.4-rails-7.2.0-node-22.1-yarn-1.22.22", "-", ] ); @@ -159,7 +159,7 @@ mod tests { #[test] fn build_image_with_user_id() { let command = - DockerClient::build_image("3.2.4", "7.1.3", "22.1", "1.22.22", Some(1000), None); + DockerClient::build_image("3.2.4", "7.2.0", "22.1", "1.22.22", Some(1000), None); assert_eq!(command.get_program(), "docker"); @@ -172,7 +172,7 @@ mod tests { "--build-arg", "RUBY_VERSION=3.2.4", "--build-arg", - "RAILS_VERSION=7.1.3", + "RAILS_VERSION=7.2.0", "--build-arg", "NODE_VERSION=22.1", "--build-arg", @@ -180,7 +180,7 @@ mod tests { "--build-arg", "USER_ID=1000", "-t", - "rails-new-ruby-3.2.4-rails-7.1.3-node-22.1-yarn-1.22.22", + "rails-new-ruby-3.2.4-rails-7.2.0-node-22.1-yarn-1.22.22", "-", ] ); @@ -189,7 +189,7 @@ mod tests { #[test] fn build_image_with_group_id() { let command = - DockerClient::build_image("3.2.4", "7.1.3", "22.1", "1.22.22", None, Some(1000)); + DockerClient::build_image("3.2.4", "7.2.0", "22.1", "1.22.22", None, Some(1000)); assert_eq!(command.get_program(), "docker"); @@ -202,7 +202,7 @@ mod tests { "--build-arg", "RUBY_VERSION=3.2.4", "--build-arg", - "RAILS_VERSION=7.1.3", + "RAILS_VERSION=7.2.0", "--build-arg", "NODE_VERSION=22.1", "--build-arg", @@ -210,7 +210,7 @@ mod tests { "--build-arg", "GROUP_ID=1000", "-t", - "rails-new-ruby-3.2.4-rails-7.1.3-node-22.1-yarn-1.22.22", + "rails-new-ruby-3.2.4-rails-7.2.0-node-22.1-yarn-1.22.22", "-", ] ); @@ -220,7 +220,7 @@ mod tests { fn run_image() { let command = DockerClient::run_image( "3.2.4", - "7.1.3", + "7.2.0", "22.1", "1.22.22", vec!["my_app".to_string()], @@ -242,7 +242,7 @@ mod tests { &format!("{}:{}", current_dir, current_dir), "-w", current_dir, - "rails-new-ruby-3.2.4-rails-7.1.3-node-22.1-yarn-1.22.22", + "rails-new-ruby-3.2.4-rails-7.2.0-node-22.1-yarn-1.22.22", "rails", "new", "my_app", @@ -252,7 +252,7 @@ mod tests { #[test] fn get_help() { - let command = DockerClient::get_help("3.2.4", "7.1.3", "22.1", "1.22.22"); + let command = DockerClient::get_help("3.2.4", "7.2.0", "22.1", "1.22.22"); assert_eq!(command.get_program(), "docker"); @@ -263,7 +263,7 @@ mod tests { &[ "run", "--rm", - "rails-new-ruby-3.2.4-rails-7.1.3-node-22.1-yarn-1.22.22", + "rails-new-ruby-3.2.4-rails-7.2.0-node-22.1-yarn-1.22.22", "rails", "new", "--help", diff --git a/src/rails_new.rs b/src/rails_new.rs index f3f009f..ec007be 100644 --- a/src/rails_new.rs +++ b/src/rails_new.rs @@ -8,7 +8,7 @@ pub struct Cli { pub args: Vec, #[clap(long, short = 'u', default_value = "3.3.4")] pub ruby_version: String, - #[clap(long, short = 'r', default_value = "7.1.3")] + #[clap(long, short = 'r', default_value = "7.2.0")] pub rails_version: String, #[clap(long, short = 'n', default_value = "22.1")] pub node_version: String, @@ -61,7 +61,7 @@ mod tests { let yarn_version = m.get_one::("yarn_version").unwrap(); assert_eq!(ruby_version, "3.3.4"); - assert_eq!(rails_version, "7.1.3"); + assert_eq!(rails_version, "7.2.0"); assert_eq!(node_version, "22.1"); assert_eq!(yarn_version, "1.22.22");