typo 4.0.1 → 4.0.2
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/.DS_Store +0 -0
- data/app/apis/blogger_service.rb +2 -2
- data/app/apis/meta_weblog_service.rb +2 -2
- data/app/controllers/xml_controller.rb +1 -1
- data/app/helpers/admin/base_helper.rb +2 -2
- data/app/helpers/application_helper.rb +9 -2
- data/app/helpers/articles_helper.rb +5 -4
- data/app/helpers/xml_helper.rb +3 -3
- data/app/models/blog.rb +3 -2
- data/app/views/accounts/logout.rhtml +3 -3
- data/app/views/layouts/administration.rhtml +2 -2
- data/app/views/notification_mailer/_mail_footer.rhtml +2 -2
- data/app/views/notification_mailer/comment.rhtml +1 -1
- data/bin/typo +1 -1
- data/config/routes.rb +15 -8
- data/lib/tasks/release.rake +3 -3
- data/lib/typo_version.rb +1 -1
- data/public/javascripts/typo.js +2 -2
- data/test/mocks/themes/azure/layouts/default.rhtml +3 -3
- data/themes/azure/layouts/default.rhtml +4 -4
- data/themes/scribbish/views/articles/read.rhtml +8 -8
- metadata +5 -4
data/.DS_Store
ADDED
Binary file
|
data/app/apis/blogger_service.rb
CHANGED
@@ -55,13 +55,13 @@ class BloggerService < TypoWebService
|
|
55
55
|
:lastname => "",
|
56
56
|
:nickname => username,
|
57
57
|
:email => "",
|
58
|
-
:url => controller.url_for(:controller => "
|
58
|
+
:url => controller.url_for(:controller => "articles")
|
59
59
|
)
|
60
60
|
end
|
61
61
|
|
62
62
|
def getUsersBlogs(appkey, username, password)
|
63
63
|
[BloggerStructs::Blog.new(
|
64
|
-
:url => controller.url_for(:controller => "
|
64
|
+
:url => controller.url_for(:controller => "articles"),
|
65
65
|
:blogid => 1,
|
66
66
|
:blogName => this_blog.blog_name
|
67
67
|
)]
|
@@ -149,7 +149,7 @@ class MetaWeblogService < TypoWebService
|
|
149
149
|
resource = Resource.create(:filename => data['name'], :mime => data['type'], :created_at => Time.now)
|
150
150
|
resource.write_to_disk(data['bits'])
|
151
151
|
|
152
|
-
MetaWeblogStructs::Url.new("url" => controller.url_for(:controller => "
|
152
|
+
MetaWeblogStructs::Url.new("url" => controller.url_for(:controller => "files", :action => "#{resource.filename}"))
|
153
153
|
end
|
154
154
|
|
155
155
|
def article_dto_from(article)
|
@@ -188,7 +188,7 @@ class MetaWeblogService < TypoWebService
|
|
188
188
|
end
|
189
189
|
|
190
190
|
def server_url
|
191
|
-
controller.url_for(:only_path => false, :controller => "
|
191
|
+
controller.url_for(:only_path => false, :controller => "articles")
|
192
192
|
end
|
193
193
|
|
194
194
|
def pub_date(time)
|
@@ -107,7 +107,7 @@ class XmlController < ContentController
|
|
107
107
|
tag = Tag.find_by_name(params[:id])
|
108
108
|
fetch_items(tag.articles)
|
109
109
|
@feed_title << ": Tag #{tag.display_name}"
|
110
|
-
@link = url_for({:controller => "
|
110
|
+
@link = url_for({:controller => "articles", :action => 'tag', :tag => tag.name},
|
111
111
|
{:only_path => false})
|
112
112
|
end
|
113
113
|
|
@@ -26,9 +26,9 @@ module Admin::BaseHelper
|
|
26
26
|
|
27
27
|
def current_user_notice
|
28
28
|
unless session[:user]
|
29
|
-
link_to "log in", :controller => "
|
29
|
+
link_to "log in", :controller => "accounts", :action=>"login"
|
30
30
|
else
|
31
|
-
link_to "log out", :controller => "
|
31
|
+
link_to "log out", :controller => "accounts", :action=>"logout"
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -6,6 +6,13 @@ module ApplicationHelper
|
|
6
6
|
url_for options.update(:only_path => false)
|
7
7
|
end
|
8
8
|
|
9
|
+
def url_for(options = { })
|
10
|
+
if options[:controller] && options[:controller] =~ /^\/?$/
|
11
|
+
options[:controller] = '/articles'
|
12
|
+
end
|
13
|
+
super(options)
|
14
|
+
end
|
15
|
+
|
9
16
|
def config_value(name)
|
10
17
|
this_blog[name]
|
11
18
|
end
|
@@ -88,10 +95,10 @@ module ApplicationHelper
|
|
88
95
|
page.html(@controller,:body)
|
89
96
|
end
|
90
97
|
|
91
|
-
def strip_html(text)
|
98
|
+
def strip_html(text)
|
92
99
|
text.strip_html
|
93
100
|
end
|
94
|
-
|
101
|
+
|
95
102
|
def markup_help_popup(markup, text)
|
96
103
|
if markup and markup.commenthelp.size > 1
|
97
104
|
"<a href=\"#{url_for :controller => '/articles', :action => 'markup_help', :id => markup.id}\" onClick=\"return popup(this, 'Typo Markup Help')\">#{text}</a>"
|
@@ -9,7 +9,8 @@ module ArticlesHelper
|
|
9
9
|
:confirm => "Are you sure you want to delete this #{type}?"
|
10
10
|
}, :class => "admintools") <<
|
11
11
|
link_to('edit', {
|
12
|
-
:controller => "admin/#{type.pluralize}
|
12
|
+
:controller => "admin/#{type.pluralize}",
|
13
|
+
:article_id => model.article.id,
|
13
14
|
:action => "edit", :id => model
|
14
15
|
}, :class => "admintools"),
|
15
16
|
:id => "admin_#{type}_#{model.id}", :style => "display: none")
|
@@ -79,14 +80,14 @@ module ArticlesHelper
|
|
79
80
|
|
80
81
|
def category_links(article)
|
81
82
|
"Posted in " + article.categories.collect { |c| link_to h(c.name),
|
82
|
-
{ :controller => "articles", :action => "category", :id => c.permalink },
|
83
|
+
{ :controller => "/articles", :action => "category", :id => c.permalink },
|
83
84
|
:rel => "tag"
|
84
85
|
}.join(", ")
|
85
86
|
end
|
86
87
|
|
87
88
|
def tag_links(article)
|
88
89
|
"Tags " + article.tags.collect { |tag| link_to tag.display_name,
|
89
|
-
{ :controller => "articles", :action => "tag", :id => tag.name },
|
90
|
+
{ :controller => "/articles", :action => "tag", :id => tag.name },
|
90
91
|
:rel => "tag"
|
91
92
|
}.sort.join(", ")
|
92
93
|
end
|
@@ -144,7 +145,7 @@ module ArticlesHelper
|
|
144
145
|
end
|
145
146
|
|
146
147
|
def urlspec_for_grouping(grouping)
|
147
|
-
{ :controller => "articles", :action => grouping.class.to_prefix, :id => grouping.permalink }
|
148
|
+
{ :controller => "/articles", :action => grouping.class.to_prefix, :id => grouping.permalink }
|
148
149
|
end
|
149
150
|
|
150
151
|
def title_for_grouping(grouping)
|
data/app/helpers/xml_helper.rb
CHANGED
@@ -18,9 +18,9 @@ module XmlHelper
|
|
18
18
|
def blog_title
|
19
19
|
this_blog.blog_name || "Unnamed blog"
|
20
20
|
end
|
21
|
-
|
21
|
+
|
22
22
|
def tag_link(tag)
|
23
|
-
url_for :controller => "articles", :action => 'tag', :id => tag.name, :only_path => false
|
23
|
+
url_for :controller => "/articles", :action => 'tag', :id => tag.name, :only_path => false
|
24
24
|
end
|
25
25
|
|
26
26
|
def collection_lastmod(collection)
|
@@ -39,6 +39,6 @@ module XmlHelper
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def category_link(category)
|
42
|
-
url_for :controller => "articles", :action => 'category', :id => category.permalink, :only_path => false
|
42
|
+
url_for :controller => "/articles", :action => 'category', :id => category.permalink, :only_path => false
|
43
43
|
end
|
44
44
|
end
|
data/app/models/blog.rb
CHANGED
@@ -159,12 +159,13 @@ class Blog < ActiveRecord::Base
|
|
159
159
|
:month => sprintf("%.2d", article.published_at.month),
|
160
160
|
:day => sprintf("%.2d", article.published_at.day),
|
161
161
|
:title => article.permalink, :anchor => anchor,
|
162
|
-
:only_path => only_path
|
162
|
+
:only_path => only_path,
|
163
|
+
:controller => '/articles')
|
163
164
|
end
|
164
165
|
|
165
166
|
def server_url
|
166
167
|
if controller
|
167
|
-
controller.send :url_for, :only_path => false, :controller => "/"
|
168
|
+
controller.send :url_for, :only_path => false, :controller => "/articles"
|
168
169
|
else
|
169
170
|
settings[:canonical_server_url]
|
170
171
|
end
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
<p>
|
5
5
|
You are now logged out of the system.
|
6
|
-
<%= link_to "Do you want to go to your blog?", :controller => "
|
6
|
+
<%= link_to "Do you want to go to your blog?", :controller => "articles" %>
|
7
7
|
</p>
|
8
|
-
|
8
|
+
|
9
9
|
<%= link_to "« login", :action => "login" %><br />
|
10
|
-
|
10
|
+
|
11
11
|
</div>
|
12
12
|
|
@@ -18,10 +18,10 @@
|
|
18
18
|
<div id="info">
|
19
19
|
<%= link_to "settings", :controller=>"/admin/general", :action => 'index' %> |
|
20
20
|
<%= current_user_notice rescue nil %> |
|
21
|
-
<%= link_to 'your blog »', :controller => "/" %>
|
21
|
+
<%= link_to 'your blog »', :controller => "/articles" %>
|
22
22
|
|
23
23
|
</div>
|
24
|
-
<h1><%= link_to "Typo admin - #{this_blog.blog_name rescue nil}", :controller => "/admin/" %></h1>
|
24
|
+
<h1><%= link_to "Typo admin - #{this_blog.blog_name rescue nil}", :controller => "/admin/general" %></h1>
|
25
25
|
</div>
|
26
26
|
<!-- /HEADER -->
|
27
27
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
</div>
|
2
2
|
|
3
3
|
<p><em>This is being sent to <%=h @user.name %> because you asked to be notified via email whenever
|
4
|
-
new content is posted to <%= link_to @blog_name, @controller.url_for(:controller => 'articles', :action => 'index') %>
|
4
|
+
new content is posted to <%= link_to @blog_name, @controller.url_for(:controller => '/articles', :action => 'index') %>
|
5
5
|
To unsubscribe, go to
|
6
|
-
<a href="<%= @link_url = @controller.url_for(:controller => 'admin/users', :action => 'edit', :id => @user.id) %>"><%=h @link_url%></a>
|
6
|
+
<a href="<%= @link_url = @controller.url_for(:controller => '/admin/users', :action => 'edit', :id => @user.id) %>"><%=h @link_url%></a>
|
7
7
|
and change your user settings.</p>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<p>A new comment has been posted on
|
2
|
-
<%= link_to @blog_name, @controller.url_for(:controller => 'articles', :action => 'index') %>, responding to
|
2
|
+
<%= link_to @blog_name, @controller.url_for(:controller => '/articles', :action => 'index') %>, responding to
|
3
3
|
<%= link_to h(@comment.article.title), article_url(@controller, @comment.article) %>.</p>
|
4
4
|
|
5
5
|
<%= render :partial => './mail_header' %>
|
data/bin/typo
CHANGED
data/config/routes.rb
CHANGED
@@ -24,7 +24,7 @@ ActionController::Routing::Routes.draw do |map|
|
|
24
24
|
map.xml 'xml/:format/:type/:id/feed.xml', :controller => 'xml', :action => 'feed'
|
25
25
|
map.xml 'xml/rss', :controller => 'xml', :action => 'feed', :type => 'feed', :format => 'rss'
|
26
26
|
map.xml 'sitemap.xml', :controller => 'xml', :action => 'feed', :format => 'googlesitemap', :type => 'sitemap'
|
27
|
-
|
27
|
+
|
28
28
|
# allow neat perma urls
|
29
29
|
map.connect 'articles',
|
30
30
|
:controller => 'articles', :action => 'index'
|
@@ -77,17 +77,24 @@ ActionController::Routing::Routes.draw do |map|
|
|
77
77
|
map.connect 'images/theme/:filename',
|
78
78
|
:controller => 'theme', :action => 'images'
|
79
79
|
|
80
|
+
# For the tests
|
81
|
+
map.connect 'theme/static_view_test', :controller => 'theme', :action => 'static_view_test'
|
82
|
+
|
80
83
|
map.connect 'plugins/filters/:filter/:public_action',
|
81
84
|
:controller => 'textfilter', :action => 'public_action'
|
82
85
|
|
83
|
-
#
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
:controller =>
|
86
|
+
# Work around the Bad URI bug
|
87
|
+
%w{ accounts articles backend files live sidebar textfilter xml }.each do |i|
|
88
|
+
map.connect "#{i}", :controller => "#{i}", :action => 'index'
|
89
|
+
map.connect "#{i}/:action", :controller => "#{i}"
|
90
|
+
map.connect "#{i}/:action/:id", :controller => i, :id => nil
|
91
|
+
end
|
88
92
|
|
89
|
-
|
90
|
-
|
93
|
+
%w{blacklist cache categories comments content feedback general pages
|
94
|
+
resources sidebar textfilters themes trackbacks users}.each do |i|
|
95
|
+
map.connect "/admin/#{i}", :controller => "admin/#{i}", :action => 'index'
|
96
|
+
map.connect "/admin/#{i}/:action/:id", :controller => "admin/#{i}", :action => nil, :id => nil
|
97
|
+
end
|
91
98
|
|
92
99
|
map.connect '*from', :controller => 'redirect', :action => 'redirect'
|
93
100
|
end
|
data/lib/tasks/release.rake
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'rake/gempackagetask'
|
2
2
|
require 'rake/contrib/rubyforgepublisher'
|
3
3
|
|
4
|
-
PKG_VERSION = "4.0.
|
4
|
+
PKG_VERSION = "4.0.2"
|
5
5
|
PKG_NAME = "typo"
|
6
6
|
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
|
7
7
|
RUBY_FORGE_PROJECT = 'typo'
|
@@ -30,11 +30,11 @@ spec = Gem::Specification.new do |s|
|
|
30
30
|
s.platform = Gem::Platform::RUBY
|
31
31
|
s.executables = ['typo']
|
32
32
|
|
33
|
-
s.add_dependency("rails", "= 1.1.
|
33
|
+
s.add_dependency("rails", "= 1.1.6")
|
34
34
|
s.add_dependency("mongrel", ">= 0.3.13.3")
|
35
35
|
s.add_dependency("mongrel_cluster", ">= 0.2.0")
|
36
36
|
s.add_dependency("sqlite3-ruby", ">= 1.1.0")
|
37
|
-
s.add_dependency("rails-app-installer", ">= 0.1.
|
37
|
+
s.add_dependency("rails-app-installer", ">= 0.1.2")
|
38
38
|
end
|
39
39
|
|
40
40
|
Rake::GemPackageTask.new(spec) do |p|
|
data/lib/typo_version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
TYPO_VERSION = '4.0.
|
1
|
+
TYPO_VERSION = '4.0.2'
|
data/public/javascripts/typo.js
CHANGED
@@ -45,8 +45,8 @@ function commentAdded(request) {
|
|
45
45
|
Element.cleanWhitespace('commentList');
|
46
46
|
new Effect.BlindDown($('commentList').lastChild);
|
47
47
|
if ($('dummy_comment')) { Element.remove('dummy_comment'); }
|
48
|
-
$('commentform').elements[
|
49
|
-
$('commentform').elements[
|
48
|
+
$('commentform').elements["comment_body"].value = '';
|
49
|
+
$('commentform').elements["comment_body"].focus();
|
50
50
|
}
|
51
51
|
|
52
52
|
function failure(request) {
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<h2 id="subtitle"><%= this_blog.blog_subtitle %></h2>
|
17
17
|
</div>
|
18
18
|
</div>
|
19
|
-
|
19
|
+
|
20
20
|
<div id="search"> <%= render :partial => "shared/search" %></div>
|
21
21
|
<% benchmark "BENCHMARK: layout/content" do %>
|
22
22
|
|
@@ -27,12 +27,12 @@
|
|
27
27
|
</div>
|
28
28
|
<% end %>
|
29
29
|
<div id="sidebar">
|
30
|
-
|
30
|
+
|
31
31
|
<div id="search-results"></div>
|
32
32
|
<% benchmark "BENCHMARK: layout/sidebars" do %>
|
33
33
|
<%= render_sidebars %>
|
34
34
|
<% end %>
|
35
|
-
|
35
|
+
|
36
36
|
<%= link_to image_tag("powered.gif"), "http://www.typosphere.org/", {:class => "powered" } %>
|
37
37
|
</div>
|
38
38
|
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<h2 id="subtitle"><%= this_blog.blog_subtitle %></h2>
|
17
17
|
</div>
|
18
18
|
</div>
|
19
|
-
|
19
|
+
|
20
20
|
<div id="search"> <%= render :partial => "shared/search" %></div>
|
21
21
|
<% benchmark "BENCHMARK: layout/content" do %>
|
22
22
|
|
@@ -27,12 +27,12 @@
|
|
27
27
|
</div>
|
28
28
|
<% end %>
|
29
29
|
<div id="sidebar">
|
30
|
-
|
30
|
+
|
31
31
|
<div id="search-results"></div>
|
32
32
|
<% benchmark "BENCHMARK: layout/sidebars" do %>
|
33
33
|
<%= render_sidebars %>
|
34
34
|
<% end %>
|
35
|
-
|
35
|
+
|
36
36
|
<%= link_to image_tag("powered.gif"), "http://www.typosphere.org/", {:class => "powered" } %>
|
37
37
|
</div>
|
38
38
|
|
@@ -41,7 +41,7 @@
|
|
41
41
|
<div id="footer">
|
42
42
|
<ul>
|
43
43
|
<li><a href="http://validator.w3.org/check?uri=referer">Valid XHTML 1.0</a></li>
|
44
|
-
<li><a href="http://jigsaw.w3.org/css-validator/validator?uri=<%= server_url_for :controller => '
|
44
|
+
<li><a href="http://jigsaw.w3.org/css-validator/validator?uri=<%= server_url_for :controller => '/' %>">Valid CSS</a></li>
|
45
45
|
</ul>
|
46
46
|
</div>
|
47
47
|
</div>
|
@@ -5,9 +5,9 @@
|
|
5
5
|
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
6
6
|
<rdf:Description
|
7
7
|
rdf:about=""
|
8
|
-
trackback:ping="<%= server_url_for :controller=>"articles", :action=>"trackback", :id=>@article %>"
|
8
|
+
trackback:ping="<%= server_url_for :controller=>"/articles", :action=>"trackback", :id=>@article %>"
|
9
9
|
dc:title="<%=h @article.title.gsub(/-+/, '-') %>"
|
10
|
-
dc:identifier="<%= server_url_for :controller=>"articles", :action=>"read", :id=>@article %>"
|
10
|
+
dc:identifier="<%= server_url_for :controller=>"/articles", :action=>"read", :id=>@article %>"
|
11
11
|
dc:description="<%=h strip_html(article_html(@article)[0..255]).gsub(/-+/, '-') %>"
|
12
12
|
dc:creator="<%= h @article.author %>"
|
13
13
|
dc:date="<%= @article.updated_at.xmlschema %>" />
|
@@ -20,20 +20,20 @@
|
|
20
20
|
<h5><a name="trackbacks">Trackbacks</a></h5>
|
21
21
|
<p>
|
22
22
|
Use the following link to trackback from your own site:<br />
|
23
|
-
<%= server_url_for :controller => 'articles', :action => 'trackback', :id => @article %>
|
24
|
-
</p>
|
23
|
+
<%= server_url_for :controller => '/articles', :action => 'trackback', :id => @article %>
|
24
|
+
</p>
|
25
25
|
|
26
26
|
<% unless @article.trackbacks.blank? -%>
|
27
27
|
<ol id="trackbacks" class="trackbacks">
|
28
28
|
<%= render(:partial => "trackback", :collection => @article.trackbacks) %>
|
29
|
-
</ol>
|
30
|
-
<% end -%>
|
29
|
+
</ol>
|
30
|
+
<% end -%>
|
31
31
|
<% end -%>
|
32
32
|
|
33
33
|
<% if @article.allow_comments? or @article.comments.size > 0 -%>
|
34
|
-
<h5><a name="comments">Comments</a></h5>
|
34
|
+
<h5><a name="comments">Comments</a></h5>
|
35
35
|
<p><a href="#commentform">Leave a response</a></p>
|
36
|
-
|
36
|
+
|
37
37
|
<div id="comments_div">
|
38
38
|
<%= render :partial => "comment" %>
|
39
39
|
</div>
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: typo
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 4.0.
|
7
|
-
date: 2006-08-
|
6
|
+
version: 4.0.2
|
7
|
+
date: 2006-08-10 00:00:00 -07:00
|
8
8
|
summary: Modern weblog engine.
|
9
9
|
require_paths:
|
10
10
|
- .
|
@@ -29,6 +29,7 @@ post_install_message:
|
|
29
29
|
authors:
|
30
30
|
- Tobias Luetke
|
31
31
|
files:
|
32
|
+
- .DS_Store
|
32
33
|
- app
|
33
34
|
- bin
|
34
35
|
- components
|
@@ -1013,7 +1014,7 @@ dependencies:
|
|
1013
1014
|
requirements:
|
1014
1015
|
- - "="
|
1015
1016
|
- !ruby/object:Gem::Version
|
1016
|
-
version: 1.1.
|
1017
|
+
version: 1.1.6
|
1017
1018
|
version:
|
1018
1019
|
- !ruby/object:Gem::Dependency
|
1019
1020
|
name: mongrel
|
@@ -1049,5 +1050,5 @@ dependencies:
|
|
1049
1050
|
requirements:
|
1050
1051
|
- - ">="
|
1051
1052
|
- !ruby/object:Gem::Version
|
1052
|
-
version: 0.1.
|
1053
|
+
version: 0.1.2
|
1053
1054
|
version:
|