Commit f478b3d
authored
Handling Version Loading in Gems Properly (#504)
If the version file is not loaded in the library code but is loaded in
the gemspec file, issues like
(#379) load errors or
missing constants can occur.
To be cautious, the gemspec avoids requiring the version file directly.
Instead, it reads the file content. This approach also includes a simple
validation to ensure the version string follows the SemVer format, so
mistakes in the version file can be detected early.
Additionally, this change fixes an actual case where the version file
was not being required properly.1 parent 9ea2782 commit f478b3d
2 files changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
| 1 | + | |
| 2 | + | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | | - | |
| 6 | + | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
0 commit comments