Assume Basic Gemfile #1501

Closed
trans opened this Issue Oct 24, 2011 · 5 comments

Comments

Projects
None yet
5 participants
@trans
Contributor

trans commented Oct 24, 2011

Almost all my projects are non-Rails projects --just plain Ruby gems. And in every one of those my Gemfile is exactly the same.

source :rubygems
gemspec

I'm sure that's common for other gem developers too.

So, I was thinking it would be great if Bundler would simply assume the above if no Gemfile is found but a gemspec is.

@indirect

This comment has been minimized.

Show comment Hide comment
@indirect

indirect Oct 24, 2011

Member

I suggest using bundle init --gemspec to create the simple Gemfile you mention. In order to function when invoked from subdirectories of a bundled project, Bundler recurses up the directory tree looking for a Gemfile. Assuming a Gemfile would change that behaviour in an inconsistent way, so I'm reluctant to make such a change.

Member

indirect commented Oct 24, 2011

I suggest using bundle init --gemspec to create the simple Gemfile you mention. In order to function when invoked from subdirectories of a bundled project, Bundler recurses up the directory tree looking for a Gemfile. Assuming a Gemfile would change that behaviour in an inconsistent way, so I'm reluctant to make such a change.

@trans

This comment has been minimized.

Show comment Hide comment
@trans

trans Oct 24, 2011

Contributor

I hear you. I deal with the same ascending search in a number of my tools too --and they don't have a special config file to cling to either. I worked out the searching for .git, .hg or _darcs is going to cover most cases. Basically you can just allow for the default in those cases, otherwise Gemfile is required.

Contributor

trans commented Oct 24, 2011

I hear you. I deal with the same ascending search in a number of my tools too --and they don't have a special config file to cling to either. I worked out the searching for .git, .hg or _darcs is going to cover most cases. Basically you can just allow for the default in those cases, otherwise Gemfile is required.

@simi

This comment has been minimized.

Show comment Hide comment
@simi

simi Jul 16, 2013

Contributor

What's problem of using just *.gemspec when exists? Is that because you have not specified source?

/cc @indirect

Contributor

simi commented Jul 16, 2013

What's problem of using just *.gemspec when exists? Is that because you have not specified source?

/cc @indirect

@gnufied

This comment has been minimized.

Show comment Hide comment
@gnufied

gnufied Jul 16, 2013

Member

So essentially we will have to recursively search for either .gemspec file or Gemfile. Also relying on presence of a .gemspec file will then become external interface of Bundler, which in turn means if someday Rubygems decide to change their gemspec extension this won't work. Currently when I specify gemspec in Gemfile how it resolves the corresponding gemspec is internal to Bundler.

My 2 cents on this matter I think it is more trouble than worth.

Member

gnufied commented Jul 16, 2013

So essentially we will have to recursively search for either .gemspec file or Gemfile. Also relying on presence of a .gemspec file will then become external interface of Bundler, which in turn means if someday Rubygems decide to change their gemspec extension this won't work. Currently when I specify gemspec in Gemfile how it resolves the corresponding gemspec is internal to Bundler.

My 2 cents on this matter I think it is more trouble than worth.

@radar

This comment has been minimized.

Show comment Hide comment
@radar

radar Aug 8, 2013

Contributor

@gnufied I agree that it's more trouble than it's worth.

Contributor

radar commented Aug 8, 2013

@gnufied I agree that it's more trouble than it's worth.

@radar radar closed this Aug 8, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment