-
Notifications
You must be signed in to change notification settings - Fork 12
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 links with directory_indexes #17
base: master
Are you sure you want to change the base?
Conversation
Thank you for this and the other issues you opened; I'll be happy to look at them over the next few days. However, one thing that you should know...I won't merge code if it doesn't have tests, so it's in your interest to get the test suite running in your development environment. What happened when you tried? |
No worries, I'm with you on not merging without tests! How do you run the test suite though?
|
I just checked Travis, you run |
Yeah, it's Minitest::Spec on this project, not RSpec. That was an experiment, really; if it gets too unwieldy, feel free to switch it to RSpec. |
Also, Guard is all set up for this project, so you can just have it running in the background instead of running tests manually. |
Okay I fixed the existing tests by adding a method I'll come back to this PR soon to add some real tests of the problem and its resolution. |
I'm not sure I understand what problem this PR is solving. Can you give me a concrete example of the "bad" behavior? |
Other than:
The "bad" behavior is this gem doesn't seem to work with pretty URLs, my fork does. Could be something wrong with my config, especially now that this PR is one year old. |
Sorry, I think I was reading too fast and overlooked some of your problem description. Let me take a less hurried look and see what I can figure out. |
Hello, did you have a chance to get a look at this PR to make breadcrumbs and directory indexes work together? I don't see any other users encountering this case in the issues of this repo since the creation of this PR though, so it doesn't look very important at all and I've been using my fork in the meantime. |
Let me refresh my memory on this and see what I can do. |
...but in the meantime, would you please respond to my review comments? |
Co-authored-by: Marnen Laibow-Koser <[email protected]>
FWIW, there are other people who would like for this to work. 👍 |
@aw-was-here Fantastic. Can you help by writing tests so this code can get merged? |
If I knew more ruby, I'd totally help out. Sorry! [As someone else involved with open source, I get how frustrating that is.] |
@aw-was-here Out of curiosity, if you don't know Ruby well, how are you using Middleman at all, and why would this feature be useful to you in the first place? @vinc Can we get this to a state where I can merge it? |
(Travis failures seem to be related to #20, not any code here.) |
To be honest after reading again the PR I'm not happy with using |
Here's a problem I found: when you add
activate :directory_indexes
toconfig.rb
, the links in the breadcrumb stay the same.If I have two pages,
/sources/foo/index.html.erb
and/sources/foo/bar.html.erb
and I visit/foo/bar/
in my browser (with pretty URLs) I expect to find links to/foo/
and/foo/bar/
in the breadcrumb. But that not the case, instead it's the usual/foo/index.html
and/foo/bar.html
.Here is how to reproduce the problem on a fresh install:
With this PR we get the expected links.
But there's just one catch that I found so far, without pretty URLs activated you still get
/foo/
instead of/foo/index.html
. Though that isn't a problem for me.P.S. I'd like to be able to run the test suite with
bundle exec rspec
to see if I break something and add a test for my PR but couldn't get it working. Sorry about that.