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

Fix #291 don't trim gem version. #292

Merged
merged 1 commit into from Nov 27, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/fpm/package/gem.rb
Expand Up @@ -111,8 +111,8 @@ def load_package_info(gem_path)
# expand spec's version to match RationalVersioningPolicy to prevent cases
# where missing 'build' number prevents correct dependency resolution by target
# package manager. Ie. for dpkg 1.1 != 1.1.0
m = spec.version.to_s.match /^(\d)?.?(\d+)?.?(\d+)?/
self.version = m.captures.map {|m| m ? m : 0}.join('.')
m = spec.version.to_s.scan(/(\d)\.?/)
Copy link
Owner

Choose a reason for hiding this comment

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

i think the \d should be \d+ here

Copy link
Owner

Choose a reason for hiding this comment

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

I'll fix that prior to release.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah! yes. Thanks for taking care of it.

self.version = m.flatten.fill('0', m.length..2).join('.')

self.vendor = spec.author
self.url = spec.homepage
Expand Down