Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: publify/publify
...
head fork: Flameeyes/typo
compare: master
Checking mergeability… Don't worry, you can still create the pull request.
  • 16 commits
  • 57 files changed
  • 5 commit comments
  • 1 contributor
Commits on Feb 17, 2013
@Flameeyes Flameeyes admin/feedback: make sure that "Mark checked item as (Ham|Spam)" do w…
…hat they say.

The behaviour of these was to just toggle the state, now they are
actually marking them as ham/spam so that they don't misbehave.
1c09ab7
@Flameeyes Flameeyes akismet: save the user agent and submit it when checking for/submitti…
…ng spam.

The User-Agent sent by the commenter is often a good piece of
information to identify whether a comment is spam or not, so make sure
not to blackhole it and instead store and submit it.
0f9582e
@Flameeyes Flameeyes gravatar: use protocol-relative URIs for HTTPS compatibility. c051dfc
@Flameeyes Flameeyes Fix text filter settings on editing/autosaving old posts and pages. 2f864a5
@Flameeyes Flameeyes flickr: make use of protocol-relative URIs on the returned source data.
Also, for lightbox, make sure that it uses fully relative paths for
the stylesheets and lightbox as otherwise it can also escape the HTTPS
protocol.
49f5cc1
@Flameeyes Flameeyes comments: use relative URLs for comment forms.
Using full, absoltue URLs will cause testing environment to comment on
production instances, and will also break HTTPS support on
mixed-protocols sites.
f28c8b6
@Flameeyes Flameeyes Remove executable permissions to files that shouldn't be executed. 9043a05
@Flameeyes Flameeyes Fix links to relative paths instead of absolute paths.
This unbreaks the view on a local test system and supports HTTPS more
properly.
3bff4ad
@Flameeyes Flameeyes excerpts: pre-process the excerpts with the filter
This allows posts with markup early in the body to not show said markup.
58f615f
Commits on Feb 18, 2013
@Flameeyes Flameeyes Add very basic support for OpenGraph data.
This allows at least the title of the page and the title of the site
to be expressed as OpenGraphs
020c936
@Flameeyes Flameeyes Fix usage of undefined "article" variable. 791682f
@Flameeyes Flameeyes Avoid using capturing regexps just to make sure that substitutions wi…
…ll happen.
48b69ad
Commits on Mar 01, 2013
@Flameeyes Flameeyes Avoid resetting tags when posts are published via trigger. 7eeeac7
Commits on Aug 07, 2013
@Flameeyes Flameeyes Fix atom feed to not use the draft creation time as publishing date. 214d860
Commits on Nov 07, 2013
@Flameeyes Flameeyes Fix comment fields saving in cookies.
Instead of saving the md5 of the email actually save the email, and make also sure that the path is set properly.
eeaab41
@Flameeyes Flameeyes Use the asynchronous version of Google Analytics. 754566c
Showing with 92 additions and 50 deletions.
  1. +2 −2 app/controllers/admin/content_controller.rb
  2. +2 −2 app/controllers/admin/feedback_controller.rb
  3. +1 −1  app/controllers/admin/pages_controller.rb
  4. +2 −2 app/controllers/application_controller.rb
  5. +3 −5 app/controllers/comments_controller.rb
  6. +14 −11 app/helpers/application_helper.rb
  7. +2 −2 app/helpers/content_helper.rb
  8. +7 −2 app/models/article.rb
  9. +0 −1  app/models/comment.rb
  10. +13 −0 app/models/content_base.rb
  11. +13 −4 app/models/feedback.rb
  12. +1 −1  app/views/shared/_atom_item_article.atom.builder
  13. +2 −0  app/views/shared/_page_header.html.erb
  14. +9 −0 db/migrate/108_adds_feedback_useragent.rb
  15. 0  lib/generators/sidebar/templates/Rakefile
  16. +11 −11 lib/transforms.rb
  17. 0  public/images/admin/blue/ui-bg_diagonals-thick_90_eeeeee_40x40.png
  18. 0  public/images/admin/blue/ui-bg_flat_100_bbd451_40x100.png
  19. 0  public/images/admin/blue/ui-bg_flat_100_f9f9f9_40x100.png
  20. 0  public/images/admin/blue/ui-bg_flat_15_cd0a0a_40x100.png
  21. 0  public/images/admin/blue/ui-bg_glass_100_e4f1fb_1x400.png
  22. 0  public/images/admin/blue/ui-bg_glass_50_4b7f9e_1x400.png
  23. 0  public/images/admin/blue/ui-bg_glass_80_d7ebf9_1x400.png
  24. 0  public/images/admin/blue/ui-bg_highlight-hard_70_000000_1x100.png
  25. 0  public/images/admin/blue/ui-bg_highlight-soft_100_719ab2_1x100.png
  26. 0  public/images/admin/blue/ui-icons_2694e8_256x240.png
  27. 0  public/images/admin/blue/ui-icons_2e83ff_256x240.png
  28. 0  public/images/admin/blue/ui-icons_3d80b3_256x240.png
  29. 0  public/images/admin/blue/ui-icons_72a7cf_256x240.png
  30. 0  public/images/admin/blue/ui-icons_ffffff_256x240.png
  31. 0  public/javascripts/ckcustom.js
  32. 0  public/javascripts/growler.js
  33. 0  public/stylesheets/growler.css
  34. 0  public/stylesheets/lightbox.css
  35. 0  themes/typographic/images/accept.png
  36. 0  themes/typographic/images/accept50.png
  37. 0  themes/typographic/images/bg_white.png
  38. 0  themes/typographic/images/bullet_bottom.png
  39. 0  themes/typographic/images/bullet_right.png
  40. 0  themes/typographic/images/email_open.png
  41. 0  themes/typographic/images/email_open50.png
  42. 0  themes/typographic/images/meta.png
  43. 0  themes/typographic/images/page_edit.png
  44. 0  themes/typographic/images/page_edit50.png
  45. 0  themes/typographic/images/tag.png
  46. 0  themes/typographic/images/user.png
  47. 0  themes/typographic/images/user50.png
  48. 0  themes/typographic/images/world_link.png
  49. 0  themes/typographic/images/world_link50.png
  50. 0  themes/typographic/stylesheets/colors.css
  51. 0  themes/typographic/stylesheets/layout.css
  52. 0  themes/typographic/stylesheets/reset.css
  53. 0  themes/typographic/stylesheets/style.css
  54. 0  themes/typographic/views/theme/static_view_test.html.erb
  55. +1 −1  vendor/plugins/typo_avatar_gravatar/lib/typo_avatar_gravatar.rb
  56. +3 −1 vendor/plugins/typo_textfilter_flickr/lib/typo_textfilter_flickr.rb
  57. +6 −4 vendor/plugins/typo_textfilter_lightbox/lib/typo_textfilter_lightbox.rb
View
4 app/controllers/admin/content_controller.rb
@@ -86,7 +86,7 @@ def autosave
id = params[:article][:id] if params[:article] && params[:article][:id]
@article = Article.get_or_build_article(id)
- @article.text_filter = current_user.text_filter if current_user.simple_editor?
+ @article.text_filter ||= set_textfilter
get_fresh_or_existing_draft_for_article
@@ -140,7 +140,7 @@ def new_or_edit
id = params[:id]
id = params[:article][:id] if params[:article] && params[:article][:id]
@article = Article.get_or_build_article(id)
- @article.text_filter = set_textfilter
+ @article.text_filter ||= set_textfilter
@post_types = PostType.find(:all)
if request.post?
View
4 app/controllers/admin/feedback_controller.rb
@@ -156,10 +156,10 @@ def bulkops
return
end
when 'Mark Checked Items as Ham'
- update_feedback(items, :change_state!)
+ update_feedback(items, :mark_as_ham!)
flash[:notice]= _("Marked %d item(s) as Ham",ids.size)
when 'Mark Checked Items as Spam'
- update_feedback(items, :change_state!)
+ update_feedback(items, :mark_as_spam!)
flash[:notice]= _("Marked %d item(s) as Spam",ids.size)
when 'Confirm Classification of Checked Items'
update_feedback(items, :confirm_classification!)
View
2  app/controllers/admin/pages_controller.rb
@@ -17,7 +17,7 @@ def index
def new
@page = Page.new(params[:page])
@page.user_id = current_user.id
- @page.text_filter = set_textfilter
+ @page.text_filter ||= set_textfilter
if request.post?
@page.published_at = Time.now
if @page.save
View
4 app/controllers/application_controller.rb
@@ -56,8 +56,8 @@ def reset_local_cache
# The base URL for this request, calculated by looking up the URL for the main
# blog index page.
- def blog_base_url
- url_for(:controller => '/articles').gsub(%r{/$},'')
+ def blog_base_url(only_path = false)
+ url_for(:controller => '/articles', :only_path => only_path).gsub(%r{/$},'')
end
def add_to_cookies(name, value, path=nil, expires=nil)
View
8 app/controllers/comments_controller.rb
@@ -78,11 +78,9 @@ def set_headers
end
def set_cookies_for comment
- add_to_cookies(:author, comment.author)
- add_to_cookies(:url, comment.url)
- if ! comment.email.blank?
- add_to_cookies(:gravatar_id, Digest::MD5.hexdigest(comment.email.strip))
- end
+ add_to_cookies(:author, comment.author, '/')
+ add_to_cookies(:url, comment.url, '/')
+ add_to_cookies(:email, comment.email.strip, '/')
end
def get_article
View
25 app/helpers/application_helper.rb
@@ -21,19 +21,19 @@ def pluralize(size, zero, one , many )
end
# Produce a link to the permalink_url of 'item'.
- def link_to_permalink(item, title, anchor=nil, style=nil, nofollow=nil)
+ def link_to_permalink(item, title, anchor=nil, style=nil, nofollow=nil, only_path=false)
options = {}
options[:class] = style if style
options[:rel] = "nofollow" if nofollow
- link_to title, item.permalink_url(anchor), options
+ link_to title, item.permalink_url(anchor,only_path), options
end
# The '5 comments' link from the bottom of articles
def comments_link(article)
comment_count = article.published_comments.size
# FIXME Why using own pluralize metchod when the Localize._ provides the same funciotnality, but better? (by simply calling _('%d comments', comment_count) and using the en translation: l.store "%d comments", ["No nomments", "1 comment", "%d comments"])
- link_to_permalink(article,pluralize(comment_count, _('no comments'), _('1 comment'), _('%d comments', comment_count)),'comments')
+ link_to_permalink(article,pluralize(comment_count, _('no comments'), _('1 comment'), _('%d comments', comment_count)),'comments', nil, nil, true)
end
def avatar_tag(options = {})
@@ -93,14 +93,17 @@ def author_link(article)
def google_analytics
unless this_blog.google_analytics.empty?
<<-HTML
- <script type="text/javascript">
- var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
- document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
- </script>
- <script type="text/javascript">
- var pageTracker = _gat._getTracker("#{this_blog.google_analytics}");
- pageTracker._trackPageview();
- </script>
+ <script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', '#{this_blog.google_analytics}']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+ </script>
HTML
end
end
View
4 app/helpers/content_helper.rb
@@ -1,11 +1,11 @@
require 'digest/sha1'
module ContentHelper
def category_links(article, prefix="Posted in")
- _(prefix) + " " + article.categories.map { |c| link_to h(c.name), category_url(c), :rel => 'tag'}.join(", ")
+ _(prefix) + " " + article.categories.map { |c| link_to h(c.name), c.permalink_url(nil, true), :rel => 'tag'}.join(", ")
end
def tag_links(article, prefix="Tags")
- _(prefix) + " " + article.tags.map { |tag| link_to tag.display_name, tag.permalink_url, :rel => "tag"}.sort.join(", ")
+ _(prefix) + " " + article.tags.map { |tag| link_to tag.display_name, tag.permalink_url(nil, true), :rel => "tag"}.sort.join(", ")
end
def next_link(article, prefix="")
View
9 app/models/article.rb
@@ -144,11 +144,11 @@ def trackback_url
end
def comment_url
- blog.url_for("comments?article_id=#{self.id}", :only_path => false)
+ blog.url_for("comments?article_id=#{self.id}", :only_path => true)
end
def preview_comment_url
- blog.url_for("comments/preview?article_id=#{self.id}", :only_path => false)
+ blog.url_for("comments/preview?article_id=#{self.id}", :only_path => true)
end
def feed_url(format)
@@ -243,6 +243,11 @@ def self.search(query, args={})
end
def keywords_to_tags
+ # if keywords is empty, we want to reset the tags altogether, but
+ # if they do not exists (for instance because we're triggered by a
+ # publication_pending) we don't want to destroy the tags
+ return if keywords.nil?
+
Article.transaction do
tags.clear
tags <<
View
1  app/models/comment.rb
@@ -7,7 +7,6 @@ class Comment < Feedback
content_fields :body
validates_presence_of :author, :body
- attr_accessor :user_agent
attr_accessor :referrer
attr_accessor :permalink
View
13 app/models/content_base.rb
@@ -70,6 +70,19 @@ def html_map field
content_fields.include? field
end
+ def excerpt_text(length = 160)
+ if respond_to?(:excerpt) and (excerpt || "") != ""
+ text = generate_html(:excerpt, excerpt)
+ else
+ text = html(:all)
+ end
+
+ text = text.strip_html
+
+ return text.slice(0, length) +
+ (text.length > length ? '...' : '');
+ end
+
def invalidates_cache?(on_destruction = false)
@invalidates_cache ||= if on_destruction
just_changed_published_status? || published?
View
17 app/models/feedback.rb
@@ -66,8 +66,7 @@ def blog_allows_feedback?
end
def akismet_options
- {:user_ip => ip,
- :comment_type => self.class.to_s.downcase,
+ {:comment_type => self.class.to_s.downcase,
:comment_author => originator,
:comment_author_email => email,
:comment_author_url => url,
@@ -110,7 +109,7 @@ def akismet_is_spam?(options={})
begin
Timeout.timeout(defined?($TESTING) ? 30 : 60) do
- akismet.comment_check(ip, nil, akismet_options)
+ akismet.comment_check(ip, user_agent, akismet_options)
end
rescue Timeout::Error => e
nil
@@ -130,6 +129,16 @@ def change_state!
result
end
+ def mark_as_ham!
+ mark_as_ham
+ save!
+ end
+
+ def mark_as_spam!
+ mark_as_ham
+ save!
+ end
+
def report_as_spam
report_as('spam')
end
@@ -143,7 +152,7 @@ def report_as spam_or_ham
begin
Timeout.timeout(defined?($TESTING) ? 5 : 3600) {
akismet.send("submit_#{spam_or_ham}",
- ip, nil, akismet_options)
+ ip, user_agent, akismet_options)
}
rescue Timeout::Error => e
nil
View
2  app/views/shared/_atom_item_article.atom.builder
@@ -1,4 +1,4 @@
-feed.entry item, :id => "urn:uuid:#{item.guid}", :url => item.permalink_url do |entry|
+feed.entry item, :id => "urn:uuid:#{item.guid}", :url => item.permalink_url, :published => item.published_at do |entry|
entry.author do
name = item.user.name rescue item.author
email = item.user.email rescue nil
View
2  app/views/shared/_page_header.html.erb
@@ -22,3 +22,5 @@
<%= this_blog.custom_tracking_field unless this_blog.custom_tracking_field.blank? %>
<%= google_analytics %>
+<%= meta_tag 'og:site_name', this_blog.blog_name %>
+<%= meta_tag 'og:title', @article ? @article.title : @page_title %>
View
9 db/migrate/108_adds_feedback_useragent.rb
@@ -0,0 +1,9 @@
+class AddsFeedbackUseragent < ActiveRecord::Migration
+ def up
+ add_column :feedback, :user_agent, :string
+ end
+
+ def down
+ remove_column :feedback, :user_agent
+ end
+end
View
0  lib/generators/sidebar/templates/Rakefile 100755 → 100644
File mode changed
View
22 lib/transforms.rb
@@ -43,9 +43,9 @@ def to_title(item, settings, params)
s = self
# Tags for params
- s = s.gsub('%date%', parse_date(s, params)) if s =~ /(%date%)/
+ s = s.gsub('%date%', parse_date(s, params)) if s =~ /%date%/
s = s.gsub('%search%', params[:q]) if params[:q]
- s = s.gsub('%page%', parse_page(s, params)) if s=~ /(%page%)/
+ s = s.gsub('%page%', parse_page(s, params)) if s=~ /%page%/
# Tags for settings
s = s.gsub('%blog_name%', settings.blog_name)
@@ -53,18 +53,18 @@ def to_title(item, settings, params)
s = s.gsub('%meta_keywords%', settings.meta_keywords)
# Tags for item
- s = s.gsub('%title%', item.title) if s =~ /(%title)/ and item.respond_to? :title
- s = s.gsub('%excerpt%', (item.body || '').strip_html.slice(0, 160)) if s =~ /(%excerpt%)/ and item.respond_to? :body
- s = s.gsub('%description%', item.description) if s =~ /(%description%)/ and item.respond_to? :description
- s = s.gsub('%name%', item.name) if s =~ /(%name%)/ and item.respond_to? :name
- s = s.gsub('%author%', item.name) if s =~ /(%author%)/ and item.respond_to? :name
+ s = s.gsub('%title%', item.title) if s =~ /%title/ and item.respond_to? :title
+ s = s.gsub('%excerpt%', item.excerpt_text) if s =~ /%excerpt%/ and item.respond_to? :excerpt_text
+ s = s.gsub('%description%', item.description) if s =~ /%description%/ and item.respond_to? :description
+ s = s.gsub('%name%', item.name) if s =~ /%name%/ and item.respond_to? :name
+ s = s.gsub('%author%', item.name) if s =~ /%author%/ and item.respond_to? :name
- if s =~ /(%categories%)/ and item.respond_to? :categories
- s = s.gsub('%categories%', article.categories.map { |c| c.name }.join(", "))
+ if s =~ /%categories%/ and item.respond_to? :categories
+ s = s.gsub('%categories%', item.categories.map { |c| c.name }.join(", "))
end
- if s =~ /(%tags%)/ and item.respond_to? :tags
- s = s.gsub('%tags%', article.tags.map { |t| t.display_name }.join(", "))
+ if s =~ /%tags%/ and item.respond_to? :tags
+ s = s.gsub('%tags%', item.tags.map { |t| t.display_name }.join(", "))
end
# Other
View
0  public/images/admin/blue/ui-bg_diagonals-thick_90_eeeeee_40x40.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  public/images/admin/blue/ui-bg_flat_100_bbd451_40x100.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  public/images/admin/blue/ui-bg_flat_100_f9f9f9_40x100.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  public/images/admin/blue/ui-bg_flat_15_cd0a0a_40x100.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  public/images/admin/blue/ui-bg_glass_100_e4f1fb_1x400.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  public/images/admin/blue/ui-bg_glass_50_4b7f9e_1x400.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  public/images/admin/blue/ui-bg_glass_80_d7ebf9_1x400.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  public/images/admin/blue/ui-bg_highlight-hard_70_000000_1x100.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  public/images/admin/blue/ui-bg_highlight-soft_100_719ab2_1x100.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  public/images/admin/blue/ui-icons_2694e8_256x240.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  public/images/admin/blue/ui-icons_2e83ff_256x240.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  public/images/admin/blue/ui-icons_3d80b3_256x240.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  public/images/admin/blue/ui-icons_72a7cf_256x240.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  public/images/admin/blue/ui-icons_ffffff_256x240.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  public/javascripts/ckcustom.js 100755 → 100644
File mode changed
View
0  public/javascripts/growler.js 100755 → 100644
File mode changed
View
0  public/stylesheets/growler.css 100755 → 100644
File mode changed
View
0  public/stylesheets/lightbox.css 100755 → 100644
File mode changed
View
0  themes/typographic/images/accept.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  themes/typographic/images/accept50.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  themes/typographic/images/bg_white.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  themes/typographic/images/bullet_bottom.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  themes/typographic/images/bullet_right.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  themes/typographic/images/email_open.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  themes/typographic/images/email_open50.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  themes/typographic/images/meta.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  themes/typographic/images/page_edit.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  themes/typographic/images/page_edit50.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  themes/typographic/images/tag.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0  themes/typographic/images/user.png 100755 → 100644
Diff not rendered
View
0  themes/typographic/images/user50.png 100755 → 100644
Diff not rendered
View
0  themes/typographic/images/world_link.png 100755 → 100644
Diff not rendered
View
0  themes/typographic/images/world_link50.png 100755 → 100644
Diff not rendered
View
0  themes/typographic/stylesheets/colors.css 100755 → 100644
File mode changed
View
0  themes/typographic/stylesheets/layout.css 100755 → 100644
File mode changed
View
0  themes/typographic/stylesheets/reset.css 100755 → 100644
File mode changed
View
0  themes/typographic/stylesheets/style.css 100755 → 100644
File mode changed
View
0  themes/typographic/views/theme/static_view_test.html.erb 100755 → 100644
File mode changed
View
2  vendor/plugins/typo_avatar_gravatar/lib/typo_avatar_gravatar.rb
@@ -25,7 +25,7 @@ def gravatar_tag(email, options={})
options[:default] = CGI::escape(options[:default]) if options.include?(:default)
options[:size] ||= 48
- url = "http://www.gravatar.com/avatar.php?" << options.map { |key,value| "#{key}=#{value}" }.sort.join("&amp;")
+ url = "//www.gravatar.com/avatar.php?" << options.map { |key,value| "#{key}=#{value}" }.sort.join("&amp;")
"<img src=\"#{url}\" class=\"avatar gravatar\" alt=\"Gravatar\" />"
end
end
View
4 vendor/plugins/typo_textfilter_flickr/lib/typo_textfilter_flickr.rb
@@ -54,7 +54,9 @@ def self.macrofilter(blog,content,attrib,params,text="")
details = sizes.find {|s| s['label'].downcase == size.downcase } || sizes.first
width = details['width']
height = details['height']
- imageurl = details['source']
+ # use protocol-relative URL after getting the source address
+ # so not to break HTTPS support
+ imageurl = details['source'].sub(/^https?:/, '')
imagelink = flickrimage.urls.find {|u| u.type == "photopage"}.to_s
caption ||= sanitize(CGI.unescapeHTML(flickrimage.description)) unless flickrimage.description.blank?
View
10 vendor/plugins/typo_textfilter_lightbox/lib/typo_textfilter_lightbox.rb
@@ -89,9 +89,11 @@ def self.macrofilter(blog,content,attrib,params,text="")
width = thumbdetails['width']
height = thumbdetails['height']
- thumburl = thumbdetails['source']
- displayurl = displaydetails['source']
+ # use protocol-relative URL after getting the source address
+ # so not to break HTTPS support
+ thumburl = thumbdetails['source'].sub(/^https?:/, '')
+ displayurl = displaydetails['source'].sub(/^https?:/, '')
caption ||= flickrimage.description
title ||= flickrimage.title
@@ -123,8 +125,8 @@ def self.macrofilter(blog,content,attrib,params,text="")
def self.set_whiteboard(blog, content)
content.whiteboard['page_header_lightbox'] = <<-HTML
- <link href="#{blog.base_url}/stylesheets/lightbox.css" media="all" rel="Stylesheet" type="text/css" />
- <script src="#{blog.base_url}/javascripts/lightbox.js" type="text/javascript"></script>
+ <link href="#{blog_base_url(true)}/stylesheets/lightbox.css" media="all" rel="Stylesheet" type="text/css" />
+ <script src="#{blog_base_url(true)}/javascripts/lightbox.js" type="text/javascript"></script>
HTML
end
end

Showing you all comments on commits in this comparison.

@mvz
Owner

It turns out this breaks the specs pretty badly and actually keeps the text filter at textile unless set through params.

@Flameeyes

How does it break it exactly? Besides, I honestly care less about the specs than the actual behaviour. Current master is TFU in this regard, as editing always reset to none.

@mvz
Owner

This causes as failing spec

@mvz
Owner

Article sets text_filter to textile automatically, so the calls to set_textfilter never happen. This will also happen in production, so this means set_textfilter can just be removed.

With failing specs there is nothing to fall back on in development, so I'm not going to merge anything in with specs failing.

@Flameeyes

Do as you wish, but know that right now the thing is messed up in production.

Maybe I should just give up on Typo, if specs are more important than behaviour.

Something went wrong with that request. Please try again.