Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support alphanumeric ruby gem versions #21

Merged
merged 1 commit into from
Feb 15, 2016

Conversation

dblandin
Copy link
Contributor

This PR fixes a couple issues.

  • Expand the gem regex to support alphanumeric gem versions
  • Add handling to convert non-semver ruby versions to standard format

@codeclimate/review 🔎

@gdiggs
Copy link
Contributor

gdiggs commented Feb 15, 2016

LGTM. Can you squash the commits before you merge?

@@ -40,6 +40,9 @@ def calculate_points(upgrade_version)

def current_version
@current_version ||= Versionomy.parse(gem_version.to_s)
rescue Versionomy::Errors::ParseError
version = Versionomy.parse(gem_version.to_s, :rubygems)
Versionomy.create(major: version.field0, minor: version.field1, tiny: version.field2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be memoized, too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, yes it should. 👍

@dblandin dblandin force-pushed the devon/support-alphanumeric-gem-versions branch from 1052a09 to e0bd413 Compare February 15, 2016 20:01
Supports alphanumeric gem versions like `3.0.0.rc.2` or `2.2.2.backport2`
@dblandin dblandin force-pushed the devon/support-alphanumeric-gem-versions branch from e0bd413 to 316f909 Compare February 15, 2016 20:02
@dblandin
Copy link
Contributor Author

@jp @gordondiggs Squashed and rebased.

@jpignata
Copy link
Contributor

👍

dblandin added a commit that referenced this pull request Feb 15, 2016
…m-versions

Support alphanumeric ruby gem versions
@dblandin dblandin merged commit 0146c69 into master Feb 15, 2016
@dblandin dblandin deleted the devon/support-alphanumeric-gem-versions branch February 15, 2016 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants