zzot-semi-static 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/lib/semi-static/post.rb +1 -1
- data/lib/semi-static/posts.rb +1 -1
- data/lib/semi-static/site.rb +1 -1
- data/test/source/posts/{2005-03-27-a-bash-script-to-mess-with-the-containing-terminalapp-window.markdown → 2005/03/27/a-bash-script-to-mess-with-the-containing-terminalapp-window.markdown} +0 -0
- data/test/source/posts/{2008-11-24-lighting-up.markdown → 2008/11/24/lighting-up.markdown} +0 -0
- data/test/source/posts/{2008-11-26-impressions.md → 2008/11/26/impressions.md} +0 -0
- data/test/source/posts/{2008-12-04-the-working-mans-typeface.html → 2008/12/04/the-working-mans-typeface.html} +0 -0
- data/test/test_post.rb +4 -4
- metadata +15 -6
data/VERSION.yml
CHANGED
data/lib/semi-static/post.rb
CHANGED
data/lib/semi-static/posts.rb
CHANGED
@@ -31,7 +31,7 @@ module SemiStatic
|
|
31
31
|
|
32
32
|
##
|
33
33
|
# The format of the Date portion of a post's filename.
|
34
|
-
NAME_RE = /^([0-9]{4})
|
34
|
+
NAME_RE = /^([0-9]{4})\/([0-9]{2})\/([0-9]{2})\/(.*)/
|
35
35
|
|
36
36
|
##
|
37
37
|
# Parse the given file as a Post and add it to the list.
|
data/lib/semi-static/site.rb
CHANGED
@@ -266,7 +266,7 @@ module SemiStatic
|
|
266
266
|
def load_posts
|
267
267
|
@posts = Posts.new(self)
|
268
268
|
@tags = Tags.new :tag
|
269
|
-
with_source_files('posts', '
|
269
|
+
with_source_files('posts', '*/*/*/*.{html,haml,erb,txt,md,markdown}') do |path|
|
270
270
|
posts << path
|
271
271
|
end
|
272
272
|
posts.posts.sort! { |l,r| l.created <=> r.created }
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/test/test_post.rb
CHANGED
@@ -30,7 +30,7 @@ class TestPost < Test::Unit::TestCase
|
|
30
30
|
assert_equal '2008-11-24-lighting-up', post.name
|
31
31
|
|
32
32
|
# Test the various path/uri attributes
|
33
|
-
assert_equal '2008
|
33
|
+
assert_equal '2008/11/24/lighting-up.markdown', post.source_path
|
34
34
|
assert_equal '2008/11/24', post.output_dir
|
35
35
|
assert_equal '2008/11/24/lighting-up.html', post.output_path
|
36
36
|
assert_equal '/2008/11/24/lighting-up.html', post.uri
|
@@ -51,13 +51,13 @@ class TestPost < Test::Unit::TestCase
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def test_post_impressions
|
54
|
-
# with_test_site { |site| fail site.posts.to_yaml }
|
54
|
+
# with_test_site { |site| fail site.posts.names.keys.to_yaml }
|
55
55
|
with_test_site_post('2008-11-26-impressions') do |site,post|
|
56
56
|
# Make sure we got what we asked for
|
57
57
|
assert_equal '2008-11-26-impressions', post.name
|
58
58
|
|
59
59
|
# Test the various path/uri attributes
|
60
|
-
assert_equal '2008
|
60
|
+
assert_equal '2008/11/26/impressions.md', post.source_path
|
61
61
|
assert_equal '2008/11/26', post.output_dir
|
62
62
|
assert_equal '2008/11/26/impressions.html', post.output_path
|
63
63
|
assert_equal '/2008/11/26/impressions.html', post.uri
|
@@ -79,7 +79,7 @@ class TestPost < Test::Unit::TestCase
|
|
79
79
|
assert_equal '2008-12-04-the-working-mans-typeface', post.name
|
80
80
|
|
81
81
|
# Test the various path/uri attributes
|
82
|
-
assert_equal '2008
|
82
|
+
assert_equal '2008/12/04/the-working-mans-typeface.html', post.source_path
|
83
83
|
assert_equal '2008/12/04', post.output_dir
|
84
84
|
assert_equal '2008/12/04/the-working-mans-typeface.html', post.output_path
|
85
85
|
assert_equal '/2008/12/04/the-working-mans-typeface.html', post.uri
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zzot-semi-static
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Dady
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-03-
|
12
|
+
date: 2009-03-06 00:00:00 -08:00
|
13
13
|
default_executable: semi
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -155,10 +155,19 @@ files:
|
|
155
155
|
- test/source/pages/colophon.md
|
156
156
|
- test/source/pages/feed.xml.erb
|
157
157
|
- test/source/posts
|
158
|
-
- test/source/posts/2005
|
159
|
-
- test/source/posts/
|
160
|
-
- test/source/posts/
|
161
|
-
- test/source/posts/
|
158
|
+
- test/source/posts/2005
|
159
|
+
- test/source/posts/2005/03
|
160
|
+
- test/source/posts/2005/03/27
|
161
|
+
- test/source/posts/2005/03/27/a-bash-script-to-mess-with-the-containing-terminalapp-window.markdown
|
162
|
+
- test/source/posts/2008
|
163
|
+
- test/source/posts/2008/11
|
164
|
+
- test/source/posts/2008/11/24
|
165
|
+
- test/source/posts/2008/11/24/lighting-up.markdown
|
166
|
+
- test/source/posts/2008/11/26
|
167
|
+
- test/source/posts/2008/11/26/impressions.md
|
168
|
+
- test/source/posts/2008/12
|
169
|
+
- test/source/posts/2008/12/04
|
170
|
+
- test/source/posts/2008/12/04/the-working-mans-typeface.html
|
162
171
|
- test/source/scripts
|
163
172
|
- test/source/scripts/jquery-1.3.js
|
164
173
|
- test/source/scripts/jquery-1.3.min.js
|