-
Notifications
You must be signed in to change notification settings - Fork 33
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
Recover Directory Paths #29
base: master
Are you sure you want to change the base?
Conversation
I see the issue, great idea to fix it. Could you take a look at the failing tests and try to patch them? |
Not exactly sure what's going on with the Haven't ever contributed to a ruby project before, so not super sure of the ecosystem. Can I just knock the 1.9.3 version out of travis.yml? |
@danprince Fixed in #30. Would it be possible for you to rebase on origin/master? |
The process of creating a relative path from an absolute one seems to strip the trailing slash, identifying a path as a directory not a file. When this is converted into a Regex for adding to the ignore list, it also ignores files that start with the same name as ignored directories. This fix simply checks whether there was originally a trailing slash, then adds it again before it is converted into a regular expression.
Attempted the rebase, but the 1.93 version test is still there and failing for some reason. Can't understand why though, the output looks ok. |
Looks like some incompat with Rspec and equality operators? @envygeeks, have you seen this before? |
It normally happens when a hash isn't in the order you tested it in, I'll send up a pull to fix it. |
I'm dumb, I just went to fix this problem and looked at the source and the error and it just dawned on me what happened. You are using
|
Here is a patch for you @parkr @danprince: diff --git a/spec/watcher_spec.rb b/spec/watcher_spec.rb
index 1c6a32a..14202f5 100644
--- a/spec/watcher_spec.rb
+++ b/spec/watcher_spec.rb
@@ -10,7 +10,7 @@ describe(Jekyll::Watcher) do
let(:options) { base_opts }
let(:site) { instance_double(Jekyll::Site) }
- let(:default_ignored) { [/_config\.yml/, /_site\//, /\.jekyll\-metadata/] }
+ let(:default_ignored) { [/_config\.yml/, /#{Regexp.escape("_site/")}/, /\.jekyll\-metadata/] }
subject { described_class }
before(:each) do
FileUtils.mkdir(options['destination']) if options['destination']
@@ -88,7 +88,7 @@ describe(Jekyll::Watcher) do
end
context "with a custom destination" do
- let(:default_ignored) { [/_config\.yml/, /_dest\//, /\.jekyll\-metadata/] }
+ let(:default_ignored) { [/_config\.yml/, /#{Regexp.escape("_dest/")}/, /\.jekyll\-metadata/] }
context "when source is absolute" do
context "when destination is absolute" do |
@parkr @envygeeks Got it, cheers. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
/cc: @jekyll/build |
Started having problems with naming my SCSS components
site-*
, as they are required to begin with a leading_
. Obviously, this was getting caught in the ignored files for Listen.The process of creating a relative path from an absolute one seems to strip the trailing slash, identifying a path as a directory not a file. So when this is converted into a Regex for adding to the ignore list, it also ignores files that start with the same name as ignored directories.
This fix simply checks whether there was originally a trailing slash, then adds it again before it is converted into a regular expression. Not the most elegant solution, but it works for now (until there's a more fine grained alternative in place anyway). Fixes #22.