zzot-semi-static 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +63 -0
- data/VERSION.yml +2 -2
- data/lib/semi-static.rb +68 -1
- data/lib/semi-static/base.rb +3 -4
- data/lib/semi-static/convertable.rb +19 -6
- data/lib/semi-static/index.rb +19 -1
- data/lib/semi-static/layout.rb +9 -0
- data/lib/semi-static/post.rb +0 -21
- data/lib/semi-static/posts.rb +51 -3
- data/lib/semi-static/pygmentize.rb +11 -4
- data/lib/semi-static/site.rb +72 -7
- data/lib/semi-static/snippet.rb +7 -0
- data/lib/semi-static/statistics.rb +13 -0
- data/lib/semi-static/tags.rb +121 -0
- data/test/ref/test_layout/default_layout.html +43 -1
- data/test/ref/test_layout/post_layout.html +42 -0
- data/test/ref/test_page/about.html +42 -0
- data/test/ref/test_page/colophon.html +42 -0
- data/test/ref/test_post/impressions.html +48 -0
- data/test/ref/test_post/lighting-up.html +48 -0
- data/test/ref/test_post/the-working-mans-typeface.html +92 -45
- data/test/source/layouts/default.haml +4 -1
- data/test/source/layouts/post.erb +7 -3
- data/test/source/posts/2005-03-27-a-bash-script-to-mess-with-the-containing-terminalapp-window.markdown +2 -1
- data/test/source/posts/2008-11-24-lighting-up.markdown +0 -1
- data/test/source/posts/2008-11-26-impressions.md +0 -1
- data/test/source/posts/2008-12-04-the-working-mans-typeface.html +1 -1
- data/test/source/snippets/tags-widget.haml +6 -0
- data/test/test_layout.rb +2 -1
- data/test/test_post.rb +17 -14
- metadata +5 -4
- data/README.markdown +0 -84
- data/lib/semi-static/categories.rb +0 -74
@@ -24,6 +24,7 @@
|
|
24
24
|
</ul>
|
25
25
|
</div>
|
26
26
|
<div id='body'>
|
27
|
+
<div class='column' id='content'>
|
27
28
|
<h1 id='colophon'>Colophon</h1>
|
28
29
|
|
29
30
|
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis.</p>
|
@@ -33,6 +34,47 @@
|
|
33
34
|
<p>Aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet.</p>
|
34
35
|
|
35
36
|
<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam.</p>
|
37
|
+
</div>
|
38
|
+
<div class='column' id='sidebar'>
|
39
|
+
<div class='widget' id='tags'>
|
40
|
+
<h3 class='header'>Tags</h3>
|
41
|
+
<ul class='content'>
|
42
|
+
<li>
|
43
|
+
<a href='/tag/applescript/'>AppleScript (1)</a>
|
44
|
+
</li>
|
45
|
+
<li>
|
46
|
+
<a href='/tag/auto-show/'>Auto Show (1)</a>
|
47
|
+
</li>
|
48
|
+
<li>
|
49
|
+
<a href='/tag/catching-up/'>Catching Up (2)</a>
|
50
|
+
</li>
|
51
|
+
<li>
|
52
|
+
<a href='/tag/colbert-report/'>Colbert Report (1)</a>
|
53
|
+
</li>
|
54
|
+
<li>
|
55
|
+
<a href='/tag/comedy-central/'>Comedy Central (1)</a>
|
56
|
+
</li>
|
57
|
+
<li>
|
58
|
+
<a href='/tag/iphone/'>iPhone (1)</a>
|
59
|
+
</li>
|
60
|
+
<li>
|
61
|
+
<a href='/tag/raves/'>Raves (1)</a>
|
62
|
+
</li>
|
63
|
+
<li>
|
64
|
+
<a href='/tag/rss/'>RSS (2)</a>
|
65
|
+
</li>
|
66
|
+
<li>
|
67
|
+
<a href='/tag/travel/'>Travel (1)</a>
|
68
|
+
</li>
|
69
|
+
<li>
|
70
|
+
<a href='/tag/typography/'>Typography (1)</a>
|
71
|
+
</li>
|
72
|
+
<li>
|
73
|
+
<a href='/tag/work/'>Work (1)</a>
|
74
|
+
</li>
|
75
|
+
</ul>
|
76
|
+
</div>
|
77
|
+
</div>
|
36
78
|
</div>
|
37
79
|
<div id='footer'>
|
38
80
|
<p>
|
@@ -24,6 +24,8 @@
|
|
24
24
|
</ul>
|
25
25
|
</div>
|
26
26
|
<div id='body'>
|
27
|
+
<div class='column' id='content'>
|
28
|
+
|
27
29
|
<div class='semi_static_post' id='semi_static_post_2008_11_26_impressions'>
|
28
30
|
<div class='post-header'>
|
29
31
|
<h2 class='post-title'>
|
@@ -35,6 +37,11 @@
|
|
35
37
|
<span class='author'>Josh Dady</span>
|
36
38
|
on
|
37
39
|
<span class='date'>November 26, 2008</span>
|
40
|
+
|
41
|
+
in
|
42
|
+
<a href='/tag/rss/'>RSS</a>, <a href='/tag/catching-up/'>Catching Up</a>
|
43
|
+
|
44
|
+
|
38
45
|
</li>
|
39
46
|
<li class='link'>
|
40
47
|
<a class='permalink' href='/2008/11/26/impressions.html'>
|
@@ -90,6 +97,47 @@
|
|
90
97
|
})();
|
91
98
|
//]]>
|
92
99
|
</script>
|
100
|
+
</div>
|
101
|
+
<div class='column' id='sidebar'>
|
102
|
+
<div class='widget' id='tags'>
|
103
|
+
<h3 class='header'>Tags</h3>
|
104
|
+
<ul class='content'>
|
105
|
+
<li>
|
106
|
+
<a href='/tag/applescript/'>AppleScript (1)</a>
|
107
|
+
</li>
|
108
|
+
<li>
|
109
|
+
<a href='/tag/auto-show/'>Auto Show (1)</a>
|
110
|
+
</li>
|
111
|
+
<li>
|
112
|
+
<a href='/tag/catching-up/'>Catching Up (2)</a>
|
113
|
+
</li>
|
114
|
+
<li>
|
115
|
+
<a href='/tag/colbert-report/'>Colbert Report (1)</a>
|
116
|
+
</li>
|
117
|
+
<li>
|
118
|
+
<a href='/tag/comedy-central/'>Comedy Central (1)</a>
|
119
|
+
</li>
|
120
|
+
<li>
|
121
|
+
<a href='/tag/iphone/'>iPhone (1)</a>
|
122
|
+
</li>
|
123
|
+
<li>
|
124
|
+
<a href='/tag/raves/'>Raves (1)</a>
|
125
|
+
</li>
|
126
|
+
<li>
|
127
|
+
<a href='/tag/rss/'>RSS (2)</a>
|
128
|
+
</li>
|
129
|
+
<li>
|
130
|
+
<a href='/tag/travel/'>Travel (1)</a>
|
131
|
+
</li>
|
132
|
+
<li>
|
133
|
+
<a href='/tag/typography/'>Typography (1)</a>
|
134
|
+
</li>
|
135
|
+
<li>
|
136
|
+
<a href='/tag/work/'>Work (1)</a>
|
137
|
+
</li>
|
138
|
+
</ul>
|
139
|
+
</div>
|
140
|
+
</div>
|
93
141
|
</div>
|
94
142
|
<div id='footer'>
|
95
143
|
<p>
|
@@ -24,6 +24,8 @@
|
|
24
24
|
</ul>
|
25
25
|
</div>
|
26
26
|
<div id='body'>
|
27
|
+
<div class='column' id='content'>
|
28
|
+
|
27
29
|
<div class='semi_static_post' id='semi_static_post_2008_11_24_lighting_up'>
|
28
30
|
<div class='post-header'>
|
29
31
|
<h2 class='post-title'>
|
@@ -35,6 +37,11 @@
|
|
35
37
|
<span class='author'>Josh Dady</span>
|
36
38
|
on
|
37
39
|
<span class='date'>November 24, 2008</span>
|
40
|
+
|
41
|
+
in
|
42
|
+
<a href='/tag/travel/'>Travel</a>, <a href='/tag/catching-up/'>Catching Up</a>, <a href='/tag/iphone/'>iPhone</a>, <a href='/tag/rss/'>RSS</a>, <a href='/tag/auto-show/'>Auto Show</a>, <a href='/tag/work/'>Work</a>
|
43
|
+
|
44
|
+
|
38
45
|
</li>
|
39
46
|
<li class='link'>
|
40
47
|
<a class='permalink' href='/2008/11/24/lighting-up.html'>
|
@@ -90,6 +97,47 @@
|
|
90
97
|
})();
|
91
98
|
//]]>
|
92
99
|
</script>
|
100
|
+
</div>
|
101
|
+
<div class='column' id='sidebar'>
|
102
|
+
<div class='widget' id='tags'>
|
103
|
+
<h3 class='header'>Tags</h3>
|
104
|
+
<ul class='content'>
|
105
|
+
<li>
|
106
|
+
<a href='/tag/applescript/'>AppleScript (1)</a>
|
107
|
+
</li>
|
108
|
+
<li>
|
109
|
+
<a href='/tag/auto-show/'>Auto Show (1)</a>
|
110
|
+
</li>
|
111
|
+
<li>
|
112
|
+
<a href='/tag/catching-up/'>Catching Up (2)</a>
|
113
|
+
</li>
|
114
|
+
<li>
|
115
|
+
<a href='/tag/colbert-report/'>Colbert Report (1)</a>
|
116
|
+
</li>
|
117
|
+
<li>
|
118
|
+
<a href='/tag/comedy-central/'>Comedy Central (1)</a>
|
119
|
+
</li>
|
120
|
+
<li>
|
121
|
+
<a href='/tag/iphone/'>iPhone (1)</a>
|
122
|
+
</li>
|
123
|
+
<li>
|
124
|
+
<a href='/tag/raves/'>Raves (1)</a>
|
125
|
+
</li>
|
126
|
+
<li>
|
127
|
+
<a href='/tag/rss/'>RSS (2)</a>
|
128
|
+
</li>
|
129
|
+
<li>
|
130
|
+
<a href='/tag/travel/'>Travel (1)</a>
|
131
|
+
</li>
|
132
|
+
<li>
|
133
|
+
<a href='/tag/typography/'>Typography (1)</a>
|
134
|
+
</li>
|
135
|
+
<li>
|
136
|
+
<a href='/tag/work/'>Work (1)</a>
|
137
|
+
</li>
|
138
|
+
</ul>
|
139
|
+
</div>
|
140
|
+
</div>
|
93
141
|
</div>
|
94
142
|
<div id='footer'>
|
95
143
|
<p>
|
@@ -24,58 +24,105 @@
|
|
24
24
|
</ul>
|
25
25
|
</div>
|
26
26
|
<div id='body'>
|
27
|
-
<div class='
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
27
|
+
<div class='column' id='content'>
|
28
|
+
<div class='semi_static_post' id='semi_static_post_2008_12_04_the_working_mans_typeface'>
|
29
|
+
<div class='post-header'>
|
30
|
+
<h2 class='post-title'>
|
31
|
+
<a class='permalink' href='/2008/12/04/the-working-mans-typeface.html'>The Working Man's Typeface</a>
|
32
|
+
</h2>
|
33
|
+
<ul class='post-metadata'>
|
34
|
+
<li class='byline'>
|
35
|
+
By
|
36
|
+
<span class='author'>Josh Dady</span>
|
37
|
+
on
|
38
|
+
<span class='date'>December 4, 2008</span>
|
39
|
+
|
40
|
+
in
|
41
|
+
<a href='/tag/raves/'>Raves</a>, <a href='/tag/colbert-report/'>Colbert Report</a>, <a href='/tag/comedy-central/'>Comedy Central</a>, <a href='/tag/typography/'>Typography</a>
|
42
|
+
|
43
|
+
|
44
|
+
</li>
|
45
|
+
<li class='link'>
|
46
|
+
<a class='permalink' href='/2008/12/04/the-working-mans-typeface.html'>
|
47
|
+
Permalink
|
48
|
+
</a>
|
49
|
+
</li>
|
50
|
+
<li class='disqus_link'>
|
51
|
+
<a href='/2008/12/04/the-working-mans-typeface.html#disqus_thread'>Comments</a>
|
52
|
+
</li>
|
53
|
+
</ul>
|
54
|
+
</div>
|
55
|
+
<div class='post-body'>
|
50
56
|
|
51
|
-
|
57
|
+
<p>From Monday's <a href="http://www.colbertnation.com/home">Colbert Report</a>. You've got to be really secure in your audience to make a typography joke:</p>
|
52
58
|
|
53
|
-
|
54
|
-
|
59
|
+
<blockquote><style type='text/css'>.cc_box a:hover .cc_home{background:url('http://www.comedycentral.com/comedycentral/video/assets/syndicated-logo-over.png') !important;}.cc_links a{color:#b9b9b9;text-decoration:none;}.cc_show a{color:#707070;text-decoration:none;}.cc_title a{color:#868686;text-decoration:none;}.cc_links a:hover{color:#67bee2;text-decoration:underline;}</style><div class='cc_box' style='position:relative'><a href='http://www.comedycentral.com' target='_blank' style='display:inline; float:left; width:60px; height:31px;'><div class='cc_home' style='float:left; border:solid 1px #cfcfcf; border-width:1px 0px 0px 1px; width:60px; height:31px; background:url("http://www.comedycentral.com/comedycentral/video/assets/syndicated-logo-out.png");'></div></a><div style='font:bold 10px Arial,Helvetica,Verdana,sans-serif; float:left; width:299px; height:31px; border:solid 1px #cfcfcf; border-width:1px 1px 0px 0px; overflow:hidden; color:#707070;'><div class='cc_show' style='position:relative; background-color:#e5e5e5;padding-left:3px; height:14px; padding-top:2px; overflow:hidden;'><a href='http://www.colbertnation.com/' target='_blank'>The Colbert Report</a><span style='position:absolute; top:2px; right:3px;'>Mon - Thurs 11:30pm / 10:30c</span></div><div class='cc_title' style='font-size:11px; color:#868686; background-color:#f5f5f5; padding:3px; padding-top:1px; line-height:14px; height:21px; overflow:hidden;'><a href='http://www.colbertnation.com/the-colbert-report-videos/211966/december-01-2008/operation-humble-kanye' target='_blank'>Operation Humble Kanye</a></div></div><embed style='float:left; clear:left;' src='http://media.mtvnservices.com/mgid:cms:item:comedycentral.com:211966' width='360' height='301' type='application/x-shockwave-flash' wmode='window' allowFullscreen='true' flashvars='autoPlay=false' allowscriptaccess='always' allownetworking='all' bgcolor='#000000'></embed><div class='cc_links' style='float:left; clear:left; width:358px; border:solid 1px #cfcfcf; border-top:0px; font:10px Arial,Helvetica,Verdana,sans-serif; color:#b9b9b9; background-color:#f5f5f5;'><div style='width:177px; float:left; padding-left:3px;'><a target='_blank' href='http://www.colbertnation.com/video/tag/Christmas'>Colbert at Christmas</a><br /><a target='_blank' href='http://shop.comedycentral.com/detail.php?p=76445&v=comedy-central_shows_the-colbert-report&SESSID=e404c55c0698e438f4508b6b848da5eb'>Colbert Christmas DVD</a></div><div style='width:177px; float:left;'><a target='_blank' href='http://www.colbertnation.com/video?keywords=green+screen'>Green Screen</a><br /><a target='_blank' href='http://www.colbertnation.com/the-colbert-report-videos/81003/january-18-2007/bill-o-reilly'>Bill O'Reilly Interview</a></div><div style='clear:both'></div></div><div style='clear:both'></div></div>
|
60
|
+
</blockquote>
|
55
61
|
|
62
|
+
<script type="text/javascript" charset="utf-8">
|
63
|
+
var disqus_developer = 1;
|
64
|
+
</script>
|
65
|
+
<div id="disqus_thread"></div><script type="text/javascript" src="http://disqus.com/forums/zzot/embed.js"></script><noscript><a href="http://zzot.disqus.com/?url=ref">View the discussion thread.</a></noscript><a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
|
66
|
+
</div>
|
67
|
+
</div>
|
56
68
|
<script type="text/javascript" charset="utf-8">
|
57
69
|
var disqus_developer = 1;
|
58
70
|
</script>
|
59
|
-
<
|
71
|
+
<script type="text/javascript">
|
72
|
+
//<![CDATA[
|
73
|
+
(function() {
|
74
|
+
var links = document.getElementsByTagName('a');
|
75
|
+
var query = '?';
|
76
|
+
for(var i = 0; i < links.length; i++) {
|
77
|
+
if(links[i].href.indexOf('#disqus_thread') >= 0) {
|
78
|
+
query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
|
79
|
+
}
|
80
|
+
}
|
81
|
+
document.write('<script type="text/javascript" src="http://disqus.com/forums/zzot/get_num_replies.js' + query + '"></' + 'script>');
|
82
|
+
})();
|
83
|
+
//]]>
|
84
|
+
</script>
|
85
|
+
</div>
|
86
|
+
<div class='column' id='sidebar'>
|
87
|
+
<div class='widget' id='tags'>
|
88
|
+
<h3 class='header'>Tags</h3>
|
89
|
+
<ul class='content'>
|
90
|
+
<li>
|
91
|
+
<a href='/tag/applescript/'>AppleScript (1)</a>
|
92
|
+
</li>
|
93
|
+
<li>
|
94
|
+
<a href='/tag/auto-show/'>Auto Show (1)</a>
|
95
|
+
</li>
|
96
|
+
<li>
|
97
|
+
<a href='/tag/catching-up/'>Catching Up (2)</a>
|
98
|
+
</li>
|
99
|
+
<li>
|
100
|
+
<a href='/tag/colbert-report/'>Colbert Report (1)</a>
|
101
|
+
</li>
|
102
|
+
<li>
|
103
|
+
<a href='/tag/comedy-central/'>Comedy Central (1)</a>
|
104
|
+
</li>
|
105
|
+
<li>
|
106
|
+
<a href='/tag/iphone/'>iPhone (1)</a>
|
107
|
+
</li>
|
108
|
+
<li>
|
109
|
+
<a href='/tag/raves/'>Raves (1)</a>
|
110
|
+
</li>
|
111
|
+
<li>
|
112
|
+
<a href='/tag/rss/'>RSS (2)</a>
|
113
|
+
</li>
|
114
|
+
<li>
|
115
|
+
<a href='/tag/travel/'>Travel (1)</a>
|
116
|
+
</li>
|
117
|
+
<li>
|
118
|
+
<a href='/tag/typography/'>Typography (1)</a>
|
119
|
+
</li>
|
120
|
+
<li>
|
121
|
+
<a href='/tag/work/'>Work (1)</a>
|
122
|
+
</li>
|
123
|
+
</ul>
|
124
|
+
</div>
|
60
125
|
</div>
|
61
|
-
</div>
|
62
|
-
<script type="text/javascript" charset="utf-8">
|
63
|
-
var disqus_developer = 1;
|
64
|
-
</script>
|
65
|
-
<script type="text/javascript">
|
66
|
-
//<![CDATA[
|
67
|
-
(function() {
|
68
|
-
var links = document.getElementsByTagName('a');
|
69
|
-
var query = '?';
|
70
|
-
for(var i = 0; i < links.length; i++) {
|
71
|
-
if(links[i].href.indexOf('#disqus_thread') >= 0) {
|
72
|
-
query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
|
73
|
-
}
|
74
|
-
}
|
75
|
-
document.write('<script type="text/javascript" src="http://disqus.com/forums/zzot/get_num_replies.js' + query + '"></' + 'script>');
|
76
|
-
})();
|
77
|
-
//]]>
|
78
|
-
</script>
|
79
126
|
</div>
|
80
127
|
<div id='footer'>
|
81
128
|
<p>
|
@@ -18,7 +18,10 @@
|
|
18
18
|
%a{ :href => '/about.html' } About
|
19
19
|
%li.nav-colophon
|
20
20
|
%a{ :href => '/colophon.html' } Colophon
|
21
|
-
#body
|
21
|
+
#body
|
22
|
+
#content.column~ content
|
23
|
+
#sidebar.column
|
24
|
+
= snippet 'tags-widget'
|
22
25
|
#footer
|
23
26
|
%p
|
24
27
|
Copyright © 2003–2009 Josh Dady.
|
@@ -12,10 +12,14 @@ layout: default
|
|
12
12
|
By
|
13
13
|
<span class='author'><%= page.author %></span>
|
14
14
|
on
|
15
|
-
<span class='date'><%= page.
|
15
|
+
<span class='date'><%= page.created.strftime '%B %e, %Y' %></span>
|
16
|
+
<% unless page.tags.empty? %>
|
17
|
+
in
|
18
|
+
<%= page.tags.collect { |t| "<a href='#{t.uri}'>#{t.name}</a>" }.join ', ' %>
|
19
|
+
<% end %>
|
16
20
|
<% if page.time? %>
|
17
|
-
|
18
|
-
|
21
|
+
at
|
22
|
+
<span class='time'><%= page.time %></span>
|
19
23
|
<% end %>
|
20
24
|
</li>
|
21
25
|
<li class='link'>
|
data/test/test_layout.rb
CHANGED
@@ -32,9 +32,10 @@ class TestLayout < Test::Unit::TestCase
|
|
32
32
|
def permalink; "/2009/01/13/test-post.html"; end
|
33
33
|
def comments_link; "#{uri}#comments"; end
|
34
34
|
def author; "Josh Dady"; end
|
35
|
-
def
|
35
|
+
def created; Time.local(2009, 1, 13); end
|
36
36
|
def time?; true; end
|
37
37
|
def time; "11:52 AM"; end
|
38
|
+
def tags; []; end
|
38
39
|
def comments_link; "#{permalink}##comments"; end
|
39
40
|
def comment_count; 0; end
|
40
41
|
end
|
data/test/test_post.rb
CHANGED
@@ -13,21 +13,12 @@ class TestPost < Test::Unit::TestCase
|
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
def test_post_categories
|
17
|
-
with_test_site do |site|
|
18
|
-
assert_not_nil site
|
19
|
-
assert_not_nil site.categories
|
20
|
-
assert_equal [ :applescript, :life, :raves ], site.categories.slugs
|
21
|
-
assert_equal [ 'AppleScript', 'Life', 'Raves' ], site.categories.names
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
16
|
def test_post_tags
|
26
17
|
with_test_site do |site|
|
27
18
|
assert_not_nil site
|
28
19
|
assert_not_nil site.tags
|
29
|
-
assert_equal [ :'auto-show', :'catching-up', :'colbert-report',
|
30
|
-
:'comedy-central', :iphone, :rss, :travel,
|
20
|
+
assert_equal [ :applescript, :'auto-show', :'catching-up', :'colbert-report',
|
21
|
+
:'comedy-central', :iphone, :raves, :rss, :travel,
|
31
22
|
:typography, :work ],
|
32
23
|
site.tags.slugs
|
33
24
|
end
|
@@ -47,7 +38,13 @@ class TestPost < Test::Unit::TestCase
|
|
47
38
|
# Test that the metadata was processed correctly
|
48
39
|
assert_equal 'Lighting Up', post.title
|
49
40
|
assert_equal :post, post.layout_name
|
50
|
-
|
41
|
+
|
42
|
+
assert post.tags.include? site.tags[:'auto-show']
|
43
|
+
assert post.tags.include? site.tags[:'catching-up']
|
44
|
+
assert post.tags.include? site.tags[:iphone]
|
45
|
+
assert post.tags.include? site.tags[:rss]
|
46
|
+
assert post.tags.include? site.tags[:travel]
|
47
|
+
assert post.tags.include? site.tags[:work]
|
51
48
|
|
52
49
|
assert_render_equal_ref 'test_post/lighting-up.html', post
|
53
50
|
end
|
@@ -68,7 +65,9 @@ class TestPost < Test::Unit::TestCase
|
|
68
65
|
# Test that the metadata was processed correctly
|
69
66
|
assert_equal 'Impressions', post.title
|
70
67
|
assert_equal :post, post.layout_name
|
71
|
-
|
68
|
+
|
69
|
+
assert post.tags.include? site.tags[:'catching-up']
|
70
|
+
assert post.tags.include? site.tags[:rss]
|
72
71
|
|
73
72
|
assert_render_equal_ref 'test_post/impressions.html', post
|
74
73
|
end
|
@@ -88,7 +87,11 @@ class TestPost < Test::Unit::TestCase
|
|
88
87
|
# Test that the metadata was processed correctly
|
89
88
|
assert_equal 'The Working Man\'s Typeface', post.title
|
90
89
|
assert_equal :post, post.layout_name
|
91
|
-
|
90
|
+
|
91
|
+
assert post.tags.include? site.tags[:'colbert-report']
|
92
|
+
assert post.tags.include? site.tags[:'comedy-central']
|
93
|
+
assert post.tags.include? site.tags[:raves]
|
94
|
+
assert post.tags.include? site.tags[:typography]
|
92
95
|
|
93
96
|
assert_render_equal_ref 'test_post/the-working-mans-typeface.html', post
|
94
97
|
end
|