Commit 164e8d1
committed
Refactor Dev modules for better code quality and fix post-install messages
## Code Quality Improvements:
- **Refactored ServerManager class**: Split large methods into smaller, focused methods
- Extracted kill_processes into kill_running_processes, cleanup_socket_files, etc.
- Broke down show_help into help_usage, help_commands, help_options, etc.
- Simplified print_procfile_info by extracting box formatting helpers
- **Refactored FileManager class**: Reduced cyclomatic complexity of cleanup_stale_files
- Split into cleanup_overmind_sockets and cleanup_rails_pid_file
- Extracted helper methods for process detection and file cleanup
- **Removed most RuboCop overrides**: Code now naturally complies with style guidelines
- **Kept minimal justified overrides**: Only for legitimate cases (generator complexity, test patterns)
## User Experience Improvements:
- **Updated post-install message**: Added 'bin/dev prod' option as requested
- **Fixed customize message ordering**: Now shows customize tip before access URL
## Results:
- ✅ All RuboCop violations resolved (134 files, 0 offenses)
- ✅ Significantly improved code maintainability and readability
- ✅ Better separation of concerns in Dev modules
- ✅ Enhanced user messaging experience
🎨 Code quality improvement while maintaining full functionality1 parent c4d4684 commit 164e8d1
File tree
4 files changed
+194
-147
lines changed- lib
- generators/react_on_rails
- react_on_rails/dev
4 files changed
+194
-147
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
72 | 70 | | |
73 | 71 | | |
74 | 72 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | 73 | | |
79 | 74 | | |
80 | 75 | | |
81 | | - | |
82 | | - | |
83 | 76 | | |
84 | 77 | | |
85 | 78 | | |
86 | 79 | | |
87 | 80 | | |
88 | | - | |
| 81 | + | |
89 | 82 | | |
90 | 83 | | |
91 | 84 | | |
92 | 85 | | |
93 | 86 | | |
94 | 87 | | |
95 | 88 | | |
96 | | - | |
97 | | - | |
98 | 89 | | |
99 | 90 | | |
100 | 91 | | |
| |||
159 | 150 | | |
160 | 151 | | |
161 | 152 | | |
| 153 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
9 | 18 | | |
10 | | - | |
11 | 19 | | |
| 20 | + | |
12 | 21 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 22 | + | |
| 23 | + | |
28 | 24 | | |
29 | 25 | | |
30 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
31 | 30 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 31 | + | |
49 | 32 | | |
50 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
51 | 58 | | |
52 | 59 | | |
53 | 60 | | |
| |||
0 commit comments