Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

[Source::Path] Sort gemspecs by relative depth #3428

Merged
merged 2 commits into from
Feb 27, 2015

Conversation

segiddins
Copy link
Member

@indirect
Copy link
Member

hah, clever. I was going to have two globs, the first only matching the top level. I think this is a better general solution

@segiddins
Copy link
Member Author

Let me know if you want specs for this change

-Samuel E. Giddins

On Feb 23, 2015, at 6:25 PM, André Arko [email protected] wrote:

hah, clever. I was going to have two globs, the first only matching the top level. I think this is a better general solution


Reply to this email directly or view it on GitHub.

@indirect
Copy link
Member

I think the existing specs probably cover this sufficiently? Of course, I may regret saying that in a few weeks or months, so if you could add a spec that would be great. 👍

@segiddins
Copy link
Member Author

Hm, I can't use the premailer example to make a realworld spec, since only their development dependencies differ.

@TimMoore
Copy link
Contributor

👍 thanks @segiddins!

A spec would be good, if only to make sure nobody breaks it again in the future. It might work to use the build_lib helper to build a simple gem with an invalid gemspec (one with just raise "FAIL" in it for example) in a subdirectory that sorts before the real one alphabetically. Then the spec can verify that the path gem still works in a Gemfile.

@segiddins
Copy link
Member Author

@TimMoore would be happy to -- any pointers on how to do that with build_lib? It always just seems to be used like build_lib 'foo'

@TimMoore
Copy link
Contributor

@segiddins it can take a block, and yields a builder object that can be used to write files into the path. See https://github.com/bundler/bundler/blob/master/spec/install/path_spec.rb#L56 for example

      build_lib "rack", "1.0.0", :to_system => true do |s|
        s.write "lib/rack.rb", "raise 'FAIL'"
      end

@segiddins
Copy link
Member Author

@TimMoore updated with a spec + comments :)

Turned out the issue was Index#<< overriding the earlier specs -- in other words, the glob pattern was not the actual problem.

@indirect
Copy link
Member

Yay specs! :)

On Thu, Feb 26, 2015 at 4:13 PM, Samuel E. Giddins
[email protected] wrote:

@TimMoore updated with a spec + comments :)

Turned out the issue was Index#<< overriding the earlier specs -- in other words, the glob pattern was not the actual problem.

Reply to this email directly or view it on GitHub:
#3428 (comment)

@TimMoore
Copy link
Contributor

LGTM 👍

TimMoore added a commit that referenced this pull request Feb 27, 2015
[Source::Path] Sort gemspecs by relative depth
@TimMoore TimMoore merged commit d8f6169 into rubygems:master Feb 27, 2015
@segiddins segiddins deleted the seg-path-depth-sort branch February 27, 2015 07:35
@coilysiren coilysiren modified the milestone: Release Archive Oct 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gem path points to "gemfiles" directory
4 participants