@@ -65,8 +65,12 @@ impl DockerClient {
65
65
66
66
fn set_workdir ( command : & mut Command ) {
67
67
let path = std:: env:: current_dir ( ) . expect ( "Failed to get current directory" ) ;
68
- let absolute_path = path. canonicalize ( ) . expect ( "Failed to get current directory" ) ;
69
- let current_dir = absolute_path. to_str ( ) . expect ( "Failed to get current directory" ) ;
68
+ let absolute_path = path
69
+ . canonicalize ( )
70
+ . expect ( "Failed to get current directory" ) ;
71
+ let current_dir = absolute_path
72
+ . to_str ( )
73
+ . expect ( "Failed to get current directory" ) ;
70
74
71
75
command
72
76
. arg ( "-v" )
@@ -90,7 +94,7 @@ mod tests {
90
94
91
95
#[ test]
92
96
fn build_image ( ) {
93
- let command = DockerClient :: build_image ( "3.2.3 " , "7.1.3 " , None , None ) ;
97
+ let command = DockerClient :: build_image ( "3.3.5 " , "7.2.1 " , None , None ) ;
94
98
95
99
assert_eq ! ( command. get_program( ) , "docker" ) ;
96
100
@@ -101,19 +105,19 @@ mod tests {
101
105
& [
102
106
"build" ,
103
107
"--build-arg" ,
104
- "RUBY_VERSION=3.2.3 " ,
108
+ "RUBY_VERSION=3.3.5 " ,
105
109
"--build-arg" ,
106
- "RAILS_VERSION=7.1.3 " ,
110
+ "RAILS_VERSION=7.2.1 " ,
107
111
"-t" ,
108
- "rails-new-3.2.3 -7.1.3 " ,
112
+ "rails-new-3.3.5 -7.2.1 " ,
109
113
"-" ,
110
114
]
111
115
) ;
112
116
}
113
117
114
118
#[ test]
115
119
fn build_image_with_user_id ( ) {
116
- let command = DockerClient :: build_image ( "3.2.3 " , "7.1.3 " , Some ( 1000 ) , None ) ;
120
+ let command = DockerClient :: build_image ( "3.3.5 " , "7.2.1 " , Some ( 1000 ) , None ) ;
117
121
118
122
assert_eq ! ( command. get_program( ) , "docker" ) ;
119
123
@@ -124,21 +128,21 @@ mod tests {
124
128
& [
125
129
"build" ,
126
130
"--build-arg" ,
127
- "RUBY_VERSION=3.2.3 " ,
131
+ "RUBY_VERSION=3.3.5 " ,
128
132
"--build-arg" ,
129
- "RAILS_VERSION=7.1.3 " ,
133
+ "RAILS_VERSION=7.2.1 " ,
130
134
"--build-arg" ,
131
135
"USER_ID=1000" ,
132
136
"-t" ,
133
- "rails-new-3.2.3 -7.1.3 " ,
137
+ "rails-new-3.3.5 -7.2.1 " ,
134
138
"-" ,
135
139
]
136
140
) ;
137
141
}
138
142
139
143
#[ test]
140
144
fn build_image_with_group_id ( ) {
141
- let command = DockerClient :: build_image ( "3.2.3 " , "7.1.3 " , None , Some ( 1000 ) ) ;
145
+ let command = DockerClient :: build_image ( "3.3.5 " , "7.2.1 " , None , Some ( 1000 ) ) ;
142
146
143
147
assert_eq ! ( command. get_program( ) , "docker" ) ;
144
148
@@ -149,21 +153,21 @@ mod tests {
149
153
& [
150
154
"build" ,
151
155
"--build-arg" ,
152
- "RUBY_VERSION=3.2.3 " ,
156
+ "RUBY_VERSION=3.3.5 " ,
153
157
"--build-arg" ,
154
- "RAILS_VERSION=7.1.3 " ,
158
+ "RAILS_VERSION=7.2.1 " ,
155
159
"--build-arg" ,
156
160
"GROUP_ID=1000" ,
157
161
"-t" ,
158
- "rails-new-3.2.3 -7.1.3 " ,
162
+ "rails-new-3.3.5 -7.2.1 " ,
159
163
"-" ,
160
164
]
161
165
) ;
162
166
}
163
167
164
168
#[ test]
165
169
fn run_image ( ) {
166
- let command = DockerClient :: run_image ( "3.2.3 " , "7.1.3 " , vec ! [ "my_app" . to_string( ) ] ) ;
170
+ let command = DockerClient :: run_image ( "3.3.5 " , "7.2.1 " , vec ! [ "my_app" . to_string( ) ] ) ;
167
171
168
172
assert_eq ! ( command. get_program( ) , "docker" ) ;
169
173
@@ -182,7 +186,7 @@ mod tests {
182
186
& format!( "{}:{}" , current_dir, current_dir) ,
183
187
"-w" ,
184
188
current_dir,
185
- "rails-new-3.2.3 -7.1.3 " ,
189
+ "rails-new-3.3.5 -7.2.1 " ,
186
190
"rails" ,
187
191
"new" ,
188
192
"my_app" ,
@@ -192,7 +196,7 @@ mod tests {
192
196
193
197
#[ test]
194
198
fn get_help ( ) {
195
- let command = DockerClient :: get_help ( "3.2.3 " , "7.1.3 " ) ;
199
+ let command = DockerClient :: get_help ( "3.3.5 " , "7.2.1 " ) ;
196
200
197
201
assert_eq ! ( command. get_program( ) , "docker" ) ;
198
202
@@ -203,7 +207,7 @@ mod tests {
203
207
& [
204
208
"run" ,
205
209
"--rm" ,
206
- "rails-new-3.2.3 -7.1.3 " ,
210
+ "rails-new-3.3.5 -7.2.1 " ,
207
211
"rails" ,
208
212
"new" ,
209
213
"--help" ,
0 commit comments