Commit 3100a08
Improve precompile hook error reporting and code clarity
This commit enhances the bin/dev precompile hook feature with better
error reporting and clearer code documentation based on code review
feedback.
Key improvements:
- Enhanced error reporting: Hook failures now display stdout and stderr
output to help users debug issues, using Open3.capture3 instead of
system()
- Improved documentation: Added comments explaining why
SHAKAPACKER_SKIP_PRECOMPILE_HOOK is always set (provides consistent
signal for custom scripts)
- Better code clarity: Added descriptive variable names in version check
(has_precompile_hook_support, has_skip_env_var_support)
- Structured changelog: Broke long entry into scannable sub-bullets
- Updated tests: All 7 test cases now use Open3.capture3 with proper
status mocks
- Reduced complexity: Extracted error handling into separate method to
fix cyclomatic complexity
All tests pass (35 examples, 0 failures) and RuboCop is clean (153
files, no offenses).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 02b6100 commit 3100a08
File tree
3 files changed
+77
-36
lines changed- lib/react_on_rails/dev
- spec/react_on_rails/dev
3 files changed
+77
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
186 | 189 | | |
187 | 190 | | |
188 | 191 | | |
| |||
211 | 214 | | |
212 | 215 | | |
213 | 216 | | |
214 | | - | |
215 | 217 | | |
| 218 | + | |
| 219 | + | |
216 | 220 | | |
217 | 221 | | |
218 | 222 | | |
| |||
223 | 227 | | |
224 | 228 | | |
225 | 229 | | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
230 | 235 | | |
231 | | - | |
232 | | - | |
| 236 | + | |
| 237 | + | |
233 | 238 | | |
| 239 | + | |
234 | 240 | | |
235 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
236 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
237 | 262 | | |
238 | 263 | | |
239 | 264 | | |
240 | 265 | | |
241 | 266 | | |
242 | | - | |
243 | | - | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
244 | 275 | | |
245 | 276 | | |
246 | 277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
293 | | - | |
| 292 | + | |
| 293 | + | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
304 | | - | |
| 303 | + | |
| 304 | + | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | | - | |
317 | | - | |
| 316 | + | |
| 317 | + | |
318 | 318 | | |
319 | | - | |
320 | | - | |
| 319 | + | |
| 320 | + | |
321 | 321 | | |
322 | | - | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
323 | 326 | | |
324 | 327 | | |
325 | 328 | | |
326 | 329 | | |
327 | 330 | | |
328 | 331 | | |
329 | 332 | | |
330 | | - | |
331 | | - | |
| 333 | + | |
| 334 | + | |
332 | 335 | | |
333 | | - | |
| 336 | + | |
334 | 337 | | |
335 | 338 | | |
336 | 339 | | |
337 | 340 | | |
338 | 341 | | |
339 | 342 | | |
340 | | - | |
| 343 | + | |
341 | 344 | | |
342 | 345 | | |
343 | 346 | | |
344 | 347 | | |
345 | 348 | | |
346 | 349 | | |
347 | 350 | | |
348 | | - | |
| 351 | + | |
349 | 352 | | |
350 | 353 | | |
351 | 354 | | |
352 | 355 | | |
353 | 356 | | |
354 | 357 | | |
355 | 358 | | |
356 | | - | |
| 359 | + | |
357 | 360 | | |
358 | 361 | | |
359 | 362 | | |
| |||
374 | 377 | | |
375 | 378 | | |
376 | 379 | | |
377 | | - | |
378 | | - | |
| 380 | + | |
| 381 | + | |
379 | 382 | | |
380 | | - | |
| 383 | + | |
381 | 384 | | |
382 | 385 | | |
383 | 386 | | |
| |||
397 | 400 | | |
398 | 401 | | |
399 | 402 | | |
400 | | - | |
401 | | - | |
| 403 | + | |
| 404 | + | |
402 | 405 | | |
403 | | - | |
| 406 | + | |
404 | 407 | | |
405 | 408 | | |
406 | 409 | | |
| |||
414 | 417 | | |
415 | 418 | | |
416 | 419 | | |
417 | | - | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
418 | 423 | | |
419 | 424 | | |
420 | 425 | | |
| |||
0 commit comments