Skip to content

Commit

Permalink
bump default rails to 7.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
onshi committed Aug 12, 2024
1 parent 28642a6 commit 0d2e2aa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
26 changes: 13 additions & 13 deletions src/docker_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -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",
"-",
]
);
Expand All @@ -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");

Expand All @@ -172,15 +172,15 @@ 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",
"--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",
"-",
]
);
Expand All @@ -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");

Expand All @@ -202,15 +202,15 @@ 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",
"--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",
"-",
]
);
Expand All @@ -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()],
Expand All @@ -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",
Expand All @@ -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");

Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/rails_new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub struct Cli {
pub args: Vec<String>,
#[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,
Expand Down Expand Up @@ -61,7 +61,7 @@ mod tests {
let yarn_version = m.get_one::<String>("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");

Expand Down

0 comments on commit 0d2e2aa

Please sign in to comment.