Skip to content

Commit

Permalink
Report error in parsing version number
Browse files Browse the repository at this point in the history
  • Loading branch information
squadette committed Feb 28, 2018
1 parent 7923549 commit a72813a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Changes since last non-beta release.

*Please add entries here for your pull requests that are not yet released.*

#### Fixed
- Improved error reporting on version mismatches between Javascript and Ruby packages.

### [10.1.1] - 2018-01-26
#### Fixed
- Fixed issue with server-rendering error handler: [PR 1020](https://github.com/shakacode/react_on_rails/pull/1020) by [jblasco3](https://github.com/jblasco3).
Expand Down
3 changes: 3 additions & 0 deletions lib/react_on_rails/version_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ def relative_path?
def major_minor_patch
return if relative_path?
match = raw.match(MAJOR_MINOR_PATCH_VERSION_REGEX)
unless match
raise "Cannot parse version number '#{raw}' (wildcard versions are not supported)"
end
[match[1], match[2], match[3]]
end

Expand Down

0 comments on commit a72813a

Please sign in to comment.