|
135 | 135 | expect(File).to receive(:open).with(html_path).and_yield(html_file) |
136 | 136 |
|
137 | 137 | expect(s3_client).to receive(:put_object).with( |
138 | | - bucket: bucket_name, |
139 | | - key: 'bar.html', |
140 | | - body: html_file |
| 138 | + { |
| 139 | + bucket: bucket_name, |
| 140 | + key: "bar.html", |
| 141 | + body: html_file |
| 142 | + } |
141 | 143 | ) |
142 | 144 |
|
143 | 145 | expect(s3_saver).to receive(:determine_bucket_host).and_call_original |
|
155 | 157 | expect(File).to receive(:open).with(screenshot_path).and_yield(screenshot_file) |
156 | 158 |
|
157 | 159 | expect(s3_client).to receive(:put_object).with( |
158 | | - bucket: bucket_name, |
159 | | - key: 'bim.jpg', |
160 | | - body: screenshot_file |
| 160 | + { |
| 161 | + bucket: bucket_name, |
| 162 | + key: "bim.jpg", |
| 163 | + body: screenshot_file |
| 164 | + } |
161 | 165 | ) |
162 | 166 |
|
163 | 167 | s3_saver.save |
|
177 | 181 | expect(File).to receive(:open).with(html_path).and_yield(html_file) |
178 | 182 |
|
179 | 183 | expect(s3_client).to receive(:put_object).with( |
180 | | - bucket: bucket_name, |
181 | | - key: 'bar.html', |
182 | | - body: html_file, |
183 | | - acl: 'public-read' |
| 184 | + { |
| 185 | + bucket: bucket_name, |
| 186 | + key: "bar.html", |
| 187 | + body: html_file, |
| 188 | + acl: "public-read" |
| 189 | + } |
184 | 190 | ) |
185 | 191 |
|
186 | 192 | s3_saver.save |
|
196 | 202 | expect(File).to receive(:open).with(screenshot_path).and_yield(screenshot_file) |
197 | 203 |
|
198 | 204 | expect(s3_client).to receive(:put_object).with( |
199 | | - bucket: bucket_name, |
200 | | - key: 'bim.jpg', |
201 | | - body: screenshot_file, |
202 | | - acl: 'public-read' |
| 205 | + { |
| 206 | + bucket: bucket_name, |
| 207 | + key: "bim.jpg", |
| 208 | + body: screenshot_file, |
| 209 | + acl: "public-read" |
| 210 | + } |
203 | 211 | ) |
204 | 212 |
|
205 | 213 | s3_saver.save |
|
217 | 225 | expect(File).to receive(:open).with(html_path).and_yield(html_file) |
218 | 226 |
|
219 | 227 | expect(s3_client).to receive(:put_object).with( |
220 | | - bucket: bucket_name, |
221 | | - key: 'some/path/bar.html', |
222 | | - body: html_file |
| 228 | + { |
| 229 | + bucket: bucket_name, |
| 230 | + key: "some/path/bar.html", |
| 231 | + body: html_file |
| 232 | + } |
223 | 233 | ) |
224 | 234 |
|
225 | 235 | s3_saver_with_key_prefix.save |
|
235 | 245 | expect(File).to receive(:open).with(screenshot_path).and_yield(screenshot_file) |
236 | 246 |
|
237 | 247 | expect(s3_client).to receive(:put_object).with( |
238 | | - bucket: bucket_name, |
239 | | - key: 'some/path/bim.jpg', |
240 | | - body: screenshot_file |
| 248 | + { |
| 249 | + bucket: bucket_name, |
| 250 | + key: "some/path/bim.jpg", |
| 251 | + body: screenshot_file |
| 252 | + } |
241 | 253 | ) |
242 | 254 |
|
243 | 255 | s3_saver_with_key_prefix.save |
|
256 | 268 | expect(File).to receive(:open).with(html_path).and_yield(html_file) |
257 | 269 |
|
258 | 270 | expect(s3_client).to receive(:put_object).with( |
259 | | - bucket: bucket_name, |
260 | | - key: 'some/path/bar.html', |
261 | | - body: html_file, |
262 | | - acl: 'public-read' |
| 271 | + { |
| 272 | + bucket: bucket_name, |
| 273 | + key: "some/path/bar.html", |
| 274 | + body: html_file, |
| 275 | + acl: "public-read" |
| 276 | + } |
263 | 277 | ) |
264 | 278 |
|
265 | 279 | s3_saver_with_key_prefix.save |
|
275 | 289 | expect(File).to receive(:open).with(screenshot_path).and_yield(screenshot_file) |
276 | 290 |
|
277 | 291 | expect(s3_client).to receive(:put_object).with( |
278 | | - bucket: bucket_name, |
279 | | - key: 'some/path/bim.jpg', |
280 | | - body: screenshot_file, |
281 | | - acl: 'public-read' |
| 292 | + { |
| 293 | + bucket: bucket_name, |
| 294 | + key: "some/path/bim.jpg", |
| 295 | + body: screenshot_file, |
| 296 | + acl: "public-read" |
| 297 | + } |
282 | 298 | ) |
283 | 299 |
|
284 | 300 | s3_saver_with_key_prefix.save |
|
0 commit comments