Refactor the gem spec out into a proper .gemspec file per ruby gem convention #253

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
7 participants

rtyler commented Jul 11, 2012

Also pulling into bundler's gem tasks to provide the build task

The .gemspec has the added benefit of making it such that one can use bundler
to reference this gem by :path or :git in the Gemfile, e.g.

gem 'facter', :git => 'git://github.com/puppetlabs/facter.git'
...

This will make it easier to work with non-yet-released versions of facter

Member

haus commented Jul 24, 2012

This adds a dependency on bundler to build gems, which isn't ideal and if you don't have bundler installed running rake gem gives an ambiguous error of

** Invoke gem (first_time) rake aborted! Don't know how to build task 'build'

We've started releasing prerelease gems of our release candidates. Will that address the same need?

@rtyler rtyler Refactor the gem spec out into a proper .gemspec file per ruby gem co…
…nvention

Also pulling into bundler's gem tasks to provide the `build` task

The .gemspec has the added benefit of making it such that one can use bundler
to reference this gem by :path or :git in the Gemfile, e.g.

    gem 'facter', :git => 'git://github.com/puppetlabs/facter.git'
    ...

This will make it easier to work with non-yet-released versions of facter
36f0fdd

rtyler commented Jul 24, 2012

Added a note to print out if Bundler isn't installed.

If the dependency on bundler is a sticking point, I can certainly remove that, I just saw an chance to perform some opportunistic refactoring and delegate that task to Bundler instead.

The release candidates will not address the same need, since there is still going to be a need going forward to easily work with in-development versions of Facter either from a local :path or a remote :git repo.

In general, it's become conventional as far as I've seen across the Ruby community to use a separate .gemspec file instead of embedding the gemspec directly in a Rakefile.

Contributor

slippycheeze commented Sep 5, 2012

@haus, what should be happening with this? You were the last person to touch it, and I would like to see it move, but want your feedback first.

Member

haus commented Sep 11, 2012

@daniel-pittman Some of the work has been superseded by the recent packaging work. @MosesMendoza should take a look, as he did most of the packaging updates.

Contributor

MosesMendoza commented Sep 11, 2012

@daniel-pittman, @haus, I think perhaps this was superceded by 0b49eae, in which @jeffmccune added a gemspec file? we still use a separate gem spec definition in the gem packaging tasks for automation, but it does not collide with 0b49eae.

Contributor

zaphod42 commented Sep 11, 2012

@MosesMendoza what would need to be done to not need two gemspecs?

CLA Signed by rtyler on 2012-07-09 21:00:00 -0700

Member

adrienthebo commented Apr 11, 2013

@MosesMendoza @haus poke, do you guys know what the status of this? Do we need separate gemspecs for packaging and Bundler, or can they be merged? Is this PR still relevant?

Member

adrienthebo commented Apr 15, 2013

A gemspec was added to Facter in 9dd8afb for compatibility and travis-ci, so this issue is resolved. I've filed GH-428 to document that the gemspec file isn't meant for building packages and provide information on how packages should be built.

I'm going to go ahead and close this pull request for the time being. Please re-open this pull request once the next actions are addressed, new information is available, or you have a question related to this pull request. We've become aware of difficulties re-opening pull requests, in the event you cannot please mention jeffmccune or adrienthebo with an @ sign in front and we'll re-open this pull request.

Closing the pull request doesn't mean we don't consider this change valuable, just that there are things that need to be addressed before it can be merged. If you have any questions or concerns, please don't hesitate to ping us in #puppet-dev on irc.freenode.net.

@whopper whopper pushed a commit to whopper/facter that referenced this pull request Mar 18, 2015

@melissa melissa Merge pull request #253 from MikaelSmith/maint/master/cleanup-build-ps
(maint) Cleanup Powershell build script
e3e2bd1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment