Permalink
Browse files

Merge pull request #632 from bhollis/tilde

Fix handling directories with ~ in them.
  • Loading branch information...
2 parents 42f9e33 + ee6add0 commit e5713f74d5edae8d4dec07dc85ff2a9d561c941c @tdreyno tdreyno committed Oct 11, 2012
@@ -0,0 +1,14 @@
+@encoding
+
+Feature: Tilde directories
+ In order to support ~ characters in directories
+
+ Scenario: Build directories with containing ~ characters in their name
+ Given a fixture app "empty-app"
+ And a file named "source/~notexistinguser/index.html" with:
+ """
+ It works!
+ """
+ And the Server is running
+ When I go to "/~notexistinguser/index.html"
+ Then I should see "It works!"
@@ -127,8 +127,7 @@ def parse_json_front_matter(content)
# @param [String] path
# @return [Array<Thor::CoreExt::HashWithIndifferentAccess, String>]
def frontmatter_and_content(path)
- full_path = File.expand_path(path, @app.source_dir)
-
+ full_path = File.expand_path(File.join(@app.source_dir, path))
content = File.read(full_path)
data = {}

0 comments on commit e5713f7

Please sign in to comment.