postview 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/HISTORY +34 -9
- data/README.rdoc +11 -7
- data/Rakefile +4 -0
- data/VERSION +4 -4
- data/lib/postview.rb +6 -1
- data/lib/postview/application.rb +26 -33
- data/lib/postview/cli.rb +2 -0
- data/lib/postview/extensions.rb +8 -0
- data/lib/postview/helpers.rb +67 -9
- data/lib/postview/patches.rb +2 -0
- data/lib/postview/settings.rb +19 -3
- data/lib/postview/site.rb +19 -4
- data/tasks/history.rake +2 -2
- data/test/application_test.rb +12 -12
- data/test/extensions.rb +3 -3
- data/test/fixtures/application/posts/{20090529-postview_blogware.ruby.sinatra.mkd → 20090529-third_article.t1.t2.t3.mkd} +0 -0
- data/test/fixtures/application/posts/{20090602-postview_blogware.ruby.sinatra.mkd → 20090602-fourth_article.t1.t2.t3.t4.mkd} +0 -0
- data/test/fixtures/application/posts/archive/{20080529-postview_blogware.ruby.sinatra.mkd → 20080529-first_article.t1.mkd} +0 -0
- data/test/fixtures/application/posts/archive/{20080602-postview_blogware.ruby.sinatra.mkd → 20080602-second_article.t1.t2.mkd} +0 -0
- data/test/fixtures/application/posts/drafts/{20090730-draft_postview_blogware.ruby.sinatra.mkd → 20090730-fifth_article.t1.t2.t3.t4.t5.mkd} +0 -0
- data/test/fixtures/application/themes/gemstone/about.erb +22 -0
- data/test/fixtures/application/themes/gemstone/archive/index.erb +21 -0
- data/test/fixtures/application/themes/gemstone/archive/show.erb +4 -4
- data/test/fixtures/application/themes/gemstone/error.erb +0 -0
- data/test/fixtures/application/themes/gemstone/images/logo.png +0 -0
- data/test/fixtures/application/themes/gemstone/images/navigation-bar.gif +0 -0
- data/test/fixtures/application/themes/gemstone/images/postview.png +0 -0
- data/test/fixtures/application/themes/gemstone/images/rack.png +0 -0
- data/test/fixtures/application/themes/gemstone/images/ruby.png +0 -0
- data/test/fixtures/application/themes/gemstone/images/sinatra.png +0 -0
- data/test/fixtures/application/themes/gemstone/index.erb +38 -0
- data/test/fixtures/application/themes/gemstone/layout.erb +124 -0
- data/test/fixtures/application/themes/gemstone/posts/index.erb +21 -0
- data/test/fixtures/application/themes/gemstone/posts/show.erb +17 -0
- data/test/fixtures/application/themes/gemstone/search.erb +40 -0
- data/test/fixtures/application/themes/gemstone/stylesheets/postview.css +238 -0
- data/test/fixtures/application/themes/gemstone/tags/index.erb +12 -0
- data/test/fixtures/application/themes/gemstone/tags/show.erb +40 -0
- data/test/helpers_test.rb +70 -0
- data/test/settings_test.rb +2 -2
- data/test/site_test.rb +15 -14
- data/themes/default/about.erb +3 -5
- data/themes/default/archive/index.erb +1 -1
- data/themes/default/archive/show.erb +4 -4
- data/themes/default/index.erb +2 -2
- data/themes/default/layout.erb +20 -7
- data/themes/default/posts/index.erb +1 -1
- data/themes/default/posts/show.erb +4 -4
- data/themes/default/search.erb +5 -5
- data/themes/default/tags/index.erb +1 -1
- data/themes/default/tags/show.erb +6 -6
- metadata +27 -8
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<div class="text">
|
|
6
6
|
|
|
7
7
|
<dl>
|
|
8
|
-
<% for post in
|
|
8
|
+
<% for post in all_archived_posts %>
|
|
9
9
|
<dt>
|
|
10
10
|
<b><%=link_to "#{post.publish_date} - #{post.title}", archive_path, post, :title => post.title%></b>
|
|
11
11
|
(<%= post.tags.map{ |tag| link_to tag.capitalize, tags_path, tag, :title => tag.capitalize }.join(', ') %>)
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<div class="entry">
|
|
2
2
|
|
|
3
|
-
<h1><%= link_to
|
|
3
|
+
<h1><%= link_to current_post.title, posts_path, current_post %></h1>
|
|
4
4
|
|
|
5
5
|
<span class="entry-meta">
|
|
6
|
-
Published at <%=
|
|
7
|
-
tagged with <%=
|
|
6
|
+
Published at <%= current_post.publish_date.strftime('%A, %B %d, %Y') %>,
|
|
7
|
+
tagged with <%= current_post.tags.map{ |tag| link_to tag.capitalize, tags_path, tag, :title => tag.capitalize }.join(', ') %>.
|
|
8
8
|
</span>
|
|
9
9
|
|
|
10
10
|
<div class="text">
|
|
11
11
|
|
|
12
|
-
<%=
|
|
12
|
+
<%= current_post.content %>
|
|
13
13
|
|
|
14
14
|
</div><!--text-->
|
|
15
15
|
|
data/themes/default/index.erb
CHANGED
data/themes/default/layout.erb
CHANGED
|
@@ -60,11 +60,24 @@
|
|
|
60
60
|
|
|
61
61
|
<h1>Related Posts</h1>
|
|
62
62
|
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
<
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
<div class="text">
|
|
64
|
+
|
|
65
|
+
<h2>Published</h2>
|
|
66
|
+
|
|
67
|
+
<ul>
|
|
68
|
+
<% for post in related_posts_in :posts %>
|
|
69
|
+
<li><%= link_to "#{post.publish_date} - #{post.title}", :posts, post, :title => post.title %></li>
|
|
70
|
+
<% end %>
|
|
71
|
+
</ul>
|
|
72
|
+
|
|
73
|
+
<h2>Archived</h2>
|
|
74
|
+
|
|
75
|
+
<ul>
|
|
76
|
+
<% for post in related_posts_in :archive %>
|
|
77
|
+
<li><%= link_to "#{post.publish_date} - #{post.title}", :archive, post, :title => post.title %></li>
|
|
78
|
+
<% end %>
|
|
79
|
+
</ul>
|
|
80
|
+
</div>
|
|
68
81
|
|
|
69
82
|
</div>
|
|
70
83
|
|
|
@@ -73,8 +86,8 @@
|
|
|
73
86
|
<h1>Related Tags</h1>
|
|
74
87
|
|
|
75
88
|
<ul>
|
|
76
|
-
<% for tag in
|
|
77
|
-
<li><%= link_to "#{tag.capitalize} (#{count_posts_by_tag(tag)})",
|
|
89
|
+
<% for tag in all_related_tags %>
|
|
90
|
+
<li><%= link_to "#{tag.capitalize} (#{count_posts_by_tag(tag)})", :tags, tag, :title => tag.capitalize %></li>
|
|
78
91
|
<% end %>
|
|
79
92
|
</ul>
|
|
80
93
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<div class="text">
|
|
6
6
|
|
|
7
7
|
<dl>
|
|
8
|
-
<% for post in
|
|
8
|
+
<% for post in all_posts %>
|
|
9
9
|
<dt>
|
|
10
10
|
<b><%=link_to "#{post.publish_date} - #{post.title}", posts_path, post%></b>
|
|
11
11
|
(<%= post.tags.map{ |tag| link_to tag.capitalize, tags_path, tag, :title => tag.capitalize }.join(', ') %>)
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<div class="entry">
|
|
2
2
|
|
|
3
|
-
<h1><%= link_to
|
|
3
|
+
<h1><%= link_to current_post.title, posts_path, current_post %></h1>
|
|
4
4
|
|
|
5
5
|
<span class="entry-meta">
|
|
6
|
-
Published at <%=
|
|
7
|
-
tagged with <%=
|
|
6
|
+
Published at <%= current_post.publish_date.strftime('%A, %B %d, %Y') %>,
|
|
7
|
+
tagged with <%= current_post.tags.map{ |tag| link_to tag.capitalize, tags_path, tag, :title => tag.capitalize }.join(', ') %>.
|
|
8
8
|
</span>
|
|
9
9
|
|
|
10
10
|
<div class="text">
|
|
11
11
|
|
|
12
|
-
<%=
|
|
12
|
+
<%= current_post.content %>
|
|
13
13
|
|
|
14
14
|
</div><!--text-->
|
|
15
15
|
|
data/themes/default/search.erb
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
<div class="text">
|
|
6
6
|
|
|
7
7
|
<p>
|
|
8
|
-
<%=
|
|
8
|
+
<%= posts_found.size %> found in posts and <%= archived_posts_found.size %> found in archive.
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
|
-
<% unless
|
|
11
|
+
<% unless posts_found.empty? %>
|
|
12
12
|
<h2><%= title_path :posts %></h2>
|
|
13
13
|
|
|
14
14
|
<ul>
|
|
15
|
-
<% for post in
|
|
15
|
+
<% for post in posts_found %>
|
|
16
16
|
<li>
|
|
17
17
|
<%= post.publish_date.strftime('%Y-%m-%d') %> - <strong><%= link_to post.title, posts_path, post, :title => post.title %></strong>
|
|
18
18
|
<span>(<%= post.tags.map{ |tag| link_to tag.capitalize, tags_path, tag, :title => tag.capitalize }.join(', ') %>)</span>
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
</ul>
|
|
22
22
|
<% end %>
|
|
23
23
|
|
|
24
|
-
<% unless
|
|
24
|
+
<% unless archived_posts_found.empty? %>
|
|
25
25
|
<h2><%= title_path :archive %></h2>
|
|
26
26
|
|
|
27
27
|
<ul>
|
|
28
|
-
<% for post in
|
|
28
|
+
<% for post in archived_posts_found %>
|
|
29
29
|
<li>
|
|
30
30
|
<b><%= link_to "#{post.publish_date} - #{post.title}", archive_path, post, :title => post.title %></b>
|
|
31
31
|
<span>(<%= post.tags.map{ |tag| link_to tag.capitalize, tags_path, tag, :title => tag.capitalize }.join(', ') %>)</span>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<div class="entry">
|
|
2
2
|
|
|
3
|
-
<h1>Posts tagged with <%=
|
|
3
|
+
<h1>Posts tagged with <%= current_tag.capitalize %></h1>
|
|
4
4
|
|
|
5
5
|
<div class="text">
|
|
6
6
|
|
|
7
7
|
<p>
|
|
8
|
-
<%=
|
|
8
|
+
<%= posts_found.size %> found in posts and <%= archived_posts_found.size %> found in archive.
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
|
-
<% unless
|
|
11
|
+
<% unless posts_found.empty? %>
|
|
12
12
|
<h2><%= title_path :posts %></h2>
|
|
13
13
|
|
|
14
14
|
<ul>
|
|
15
|
-
<% for post in
|
|
15
|
+
<% for post in posts_found %>
|
|
16
16
|
<li>
|
|
17
17
|
<b><%= link_to "#{post.publish_date} - #{post.title}", posts_path, post, :title => post.title %></b>
|
|
18
18
|
<span>(<%= post.tags.map{ |tag| link_to tag.capitalize, tags_path, tag, :title => tag.capitalize }.join(', ') %>)</span>
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
</ul>
|
|
22
22
|
<% end %>
|
|
23
23
|
|
|
24
|
-
<% unless
|
|
24
|
+
<% unless archived_posts_found.empty? %>
|
|
25
25
|
<h2><%= title_path :archive %></h2>
|
|
26
26
|
|
|
27
27
|
<ul>
|
|
28
|
-
<% for post in
|
|
28
|
+
<% for post in archived_posts_found %>
|
|
29
29
|
<li>
|
|
30
30
|
<b><%= link_to "#{post.publish_date} - #{post.title}", archive_path, post, :title => post.title %></b>
|
|
31
31
|
<span>(<%= post.tags.map{ |tag| link_to tag.capitalize, tags_path, tag, :title => tag.capitalize }.join(', ') %>)</span>
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: postview
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hallison Batista
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-09-
|
|
12
|
+
date: 2009-09-15 00:00:00 -04:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
@@ -68,24 +68,28 @@ files:
|
|
|
68
68
|
- lib/postview/patches.rb
|
|
69
69
|
- lib/postview/cli.rb
|
|
70
70
|
- lib/postview/helpers.rb
|
|
71
|
+
- lib/postview/extensions.rb
|
|
71
72
|
- lib/postview.rb
|
|
72
73
|
- test/helper.rb
|
|
73
74
|
- test/site_test.rb
|
|
75
|
+
- test/helpers_test.rb
|
|
74
76
|
- test/settings_test.rb
|
|
75
77
|
- test/application_test.rb
|
|
76
78
|
- test/extensions.rb
|
|
77
|
-
- test/fixtures/application/posts/archive/
|
|
78
|
-
- test/fixtures/application/posts/archive/
|
|
79
|
-
- test/fixtures/application/posts/
|
|
80
|
-
- test/fixtures/application/posts/
|
|
81
|
-
- test/fixtures/application/posts/
|
|
79
|
+
- test/fixtures/application/posts/archive/20080602-second_article.t1.t2.mkd
|
|
80
|
+
- test/fixtures/application/posts/archive/20080529-first_article.t1.mkd
|
|
81
|
+
- test/fixtures/application/posts/20090602-fourth_article.t1.t2.t3.t4.mkd
|
|
82
|
+
- test/fixtures/application/posts/drafts/20090730-fifth_article.t1.t2.t3.t4.t5.mkd
|
|
83
|
+
- test/fixtures/application/posts/20090529-third_article.t1.t2.t3.mkd
|
|
82
84
|
- test/fixtures/application/config/settings.yml
|
|
83
85
|
- test/fixtures/application/empty.yml
|
|
84
86
|
- test/fixtures/application/themes/gemstone/search.erb
|
|
85
87
|
- test/fixtures/application/themes/gemstone/posts/index.erb
|
|
86
88
|
- test/fixtures/application/themes/gemstone/posts/show.erb
|
|
89
|
+
- test/fixtures/application/themes/gemstone/error.erb
|
|
87
90
|
- test/fixtures/application/themes/gemstone/layout.erb
|
|
88
91
|
- test/fixtures/application/themes/gemstone/stylesheets/gemstone.css
|
|
92
|
+
- test/fixtures/application/themes/gemstone/stylesheets/postview.css
|
|
89
93
|
- test/fixtures/application/themes/gemstone/tags/index.erb
|
|
90
94
|
- test/fixtures/application/themes/gemstone/tags/show.erb
|
|
91
95
|
- test/fixtures/application/themes/gemstone/javascripts/gemstone.js
|
|
@@ -93,9 +97,15 @@ files:
|
|
|
93
97
|
- test/fixtures/application/themes/gemstone/archive/show.erb
|
|
94
98
|
- test/fixtures/application/themes/gemstone/index.erb
|
|
95
99
|
- test/fixtures/application/themes/gemstone/about.erb
|
|
100
|
+
- test/fixtures/application/themes/gemstone/images/rack.png
|
|
101
|
+
- test/fixtures/application/themes/gemstone/images/ruby.png
|
|
96
102
|
- test/fixtures/application/themes/gemstone/images/trojan.com
|
|
103
|
+
- test/fixtures/application/themes/gemstone/images/logo.png
|
|
104
|
+
- test/fixtures/application/themes/gemstone/images/navigation-bar.gif
|
|
97
105
|
- test/fixtures/application/themes/gemstone/images/banners/banner.jpg
|
|
98
106
|
- test/fixtures/application/themes/gemstone/images/favicon.ico
|
|
107
|
+
- test/fixtures/application/themes/gemstone/images/sinatra.png
|
|
108
|
+
- test/fixtures/application/themes/gemstone/images/postview.png
|
|
99
109
|
- test/fixtures/application/config.ru
|
|
100
110
|
- tasks/homepage.rake
|
|
101
111
|
- tasks/version.rake
|
|
@@ -125,7 +135,16 @@ has_rdoc: true
|
|
|
125
135
|
homepage: http://postview.rubyforge.org/
|
|
126
136
|
licenses: []
|
|
127
137
|
|
|
128
|
-
post_install_message:
|
|
138
|
+
post_install_message: |
|
|
139
|
+
------------------------------------------------------------------------------
|
|
140
|
+
Postview v0.8.0 (September, 15 2009, Beta release)
|
|
141
|
+
|
|
142
|
+
Thanks for use this lightweight blogware. Now, you can read your posts by
|
|
143
|
+
editing in your favorite editor.
|
|
144
|
+
|
|
145
|
+
Please, feedback in http://github.com/hallison/postview/issues.
|
|
146
|
+
------------------------------------------------------------------------------
|
|
147
|
+
|
|
129
148
|
rdoc_options:
|
|
130
149
|
- --line-numbers
|
|
131
150
|
- --inline-source
|