Permalink
Browse files

Moves all Typo references to Publify.

Specs pass.
Adds a migration to move typo:code to publify:code in the contents.
  • Loading branch information...
1 parent 5c676f9 commit 63b3ffbd3a16212c3e01bcdbf217938f3a659bfd @fdv fdv committed Jul 9, 2013
Showing with 780 additions and 702 deletions.
  1. +1 −1 Rakefile
  2. +1 −1 app/apis/blogger_service.rb
  3. +1 −1 app/apis/meta_weblog_service.rb
  4. +1 −1 app/apis/movable_type_service.rb
  5. +1 −1 app/apis/{typo_web_service.rb → publify_web_service.rb}
  6. +2 −2 app/controllers/accounts_controller.rb
  7. +1 −1 app/controllers/admin/base_controller.rb
  8. +2 −2 app/controllers/admin/cache_controller.rb
  9. +12 −12 app/controllers/admin/dashboard_controller.rb
  10. +4 −4 app/controllers/setup_controller.rb
  11. +3 −3 app/helpers/admin/base_helper.rb
  12. +2 −2 app/helpers/admin/dashboard_helper.rb
  13. +5 −4 app/helpers/application_helper.rb
  14. +2 −2 app/mailers/notification_mailer.rb
  15. +3 −3 app/models/article.rb
  16. +3 −3 app/models/blog.rb
  17. +1 −1 app/models/feedback.rb
  18. +2 −2 app/models/user.rb
  19. +1 −1 app/services/admin/token_checker.rb
  20. +1 −1 app/views/admin/cache/index.html.erb
  21. +2 −2 app/views/admin/dashboard/_overview.html.erb
  22. +4 −4 app/views/admin/dashboard/{_typo_dev.html.erb → _publify_dev.html.erb}
  23. +1 −1 app/views/admin/dashboard/_welcome.html.erb
  24. +1 −1 app/views/admin/dashboard/index.html.erb
  25. +2 −2 app/views/admin/post_types/new.html.erb
  26. +1 −1 app/views/admin/seo/index.html.erb
  27. +1 −1 app/views/admin/seo/permalinks.html.erb
  28. +3 −3 app/views/admin/settings/feedback.html.erb
  29. +3 −3 app/views/admin/settings/index.html.erb
  30. +1 −1 app/views/admin/settings/write.html.erb
  31. +1 −1 app/views/admin/sidebar/index.html.erb
  32. +6 −6 app/views/layouts/administration.html.erb
  33. +1 −1 app/views/layouts/sidebar.html.erb
  34. +1 −1 app/views/setup/index.html.erb
  35. +1 −1 app/views/shared/_atom_header.atom.builder
  36. +2 −2 app/views/shared/_page_header.html.erb
  37. +2 −2 app/views/xml/rsd.rsd.builder
  38. +1 −1 config.ru
  39. +8 −8 config/application.rb
  40. +3 −3 config/database.yml.mysql
  41. +3 −3 config/database.yml.postgresql
  42. +1 −1 config/environment.rb
  43. +1 −1 config/environments/development.rb
  44. +1 −1 config/environments/production.rb
  45. +1 −1 config/environments/test.rb
  46. +6 −6 config/initializers/access_rules.rb
  47. +2 −2 config/initializers/secret_token.rb
  48. +2 −2 config/initializers/session_store.rb
  49. +2 −2 config/routes.rb
  50. +2 −2 db/converters/README
  51. +2 −2 db/converters/feed.rb
  52. +1 −1 db/converters/mt3.rb
  53. +2 −2 db/converters/rss.rb
  54. +2 −2 db/converters/s9y.rb
  55. +1 −1 db/converters/textpattern.rb
  56. +47 −0 db/migrate/109_drops_typo_references_for_publify.rb
  57. +1 −1 db/schema.mysql-v3.sql
  58. +1 −1 db/schema.mysql.sql
  59. +1 −1 db/schema.postgresql.sql
  60. +50 −20 db/schema.rb
  61. +1 −1 db/schema.sqlite.sql
  62. +1 −1 db/schema.sqlite3.sql
  63. +1 −1 db/schema.sqlserver.sql
  64. +1 −1 db/seeds.rb
  65. +3 −3 doc/CACHE.SETUP.README
  66. +23 −23 lang/da_DK.rb
  67. +23 −23 lang/de_DE.rb
  68. +23 −23 lang/es_MX.rb
  69. +34 −34 lang/fr_FR.rb
  70. +26 −26 lang/he_IL.rb
  71. +25 −25 lang/it_IT.rb
  72. +23 −23 lang/ja_JP.rb
  73. +23 −23 lang/lt_LT.rb
  74. +30 −30 lang/nb_NO.rb
  75. +21 −21 lang/nl_NL.rb
  76. +24 −24 lang/pl_PL.rb
  77. +23 −23 lang/pt_BR.rb
  78. +23 −23 lang/ro_RO.rb
  79. +25 −25 lang/zh_CN.rb
  80. +24 −24 lang/zh_TW.rb
  81. +2 −2 lib/avatar_plugin.rb
  82. +1 −1 lib/livesearch_sidebar/lib/livesearch_sidebar.rb
  83. +1 −1 lib/meta_sidebar/app/views/meta_sidebar/_content.html.erb
  84. +1 −1 lib/meta_sidebar/lib/meta_sidebar.rb
  85. +10 −10 lib/{typo_converter → publify_converter}/README
  86. +2 −2 lib/{typo_converter → publify_converter}/Rakefile
  87. 0 lib/{typo_converter → publify_converter}/db/wp25_schema.rb
  88. +1 −1 lib/{typo_converter → publify_converter}/init.rb
  89. +6 −6 lib/{typo_converter → publify_converter}/lib/converters/base.rb
  90. 0 lib/{typo_converter → publify_converter}/lib/converters/dotclear.rb
  91. 0 lib/{typo_converter → publify_converter}/lib/converters/dotclear/category.rb
  92. 0 lib/{typo_converter → publify_converter}/lib/converters/dotclear/comment.rb
  93. 0 lib/{typo_converter → publify_converter}/lib/converters/dotclear/post.rb
  94. 0 lib/{typo_converter → publify_converter}/lib/converters/dotclear/user.rb
  95. +1 −1 lib/{typo_converter → publify_converter}/lib/converters/dotclear_2.rb
  96. 0 lib/{typo_converter → publify_converter}/lib/converters/dotclear_2/category.rb
  97. 0 lib/{typo_converter → publify_converter}/lib/converters/dotclear_2/comment.rb
  98. 0 lib/{typo_converter → publify_converter}/lib/converters/dotclear_2/post.rb
  99. 0 lib/{typo_converter → publify_converter}/lib/converters/dotclear_2/tag.rb
  100. 0 lib/{typo_converter → publify_converter}/lib/converters/dotclear_2/user.rb
  101. +1 −1 lib/{typo_converter → publify_converter}/lib/converters/wp25.rb
  102. 0 lib/{typo_converter → publify_converter}/lib/converters/wp25/comment.rb
  103. 0 lib/{typo_converter → publify_converter}/lib/converters/wp25/option.rb
  104. 0 lib/{typo_converter → publify_converter}/lib/converters/wp25/post.rb
  105. 0 lib/{typo_converter → publify_converter}/lib/converters/wp25/term.rb
  106. 0 lib/{typo_converter → publify_converter}/lib/converters/wp25/term_relationship.rb
  107. 0 lib/{typo_converter → publify_converter}/lib/converters/wp25/term_taxonomy.rb
  108. 0 lib/{typo_converter → publify_converter}/lib/converters/wp25/user.rb
  109. 0 lib/{typo_converter → publify_converter}/lib/tasks/typo_converters_tasks.rake
  110. +1 −1 lib/{typo_converter → publify_converter}/spec/converters/wp25_spec.rb
  111. 0 lib/{typo_converter → publify_converter}/spec/factories/wp25_factories.rb
  112. 0 lib/{typo_converter → publify_converter}/spec/spec_helper.rb
  113. 0 lib/{typo_converter → publify_converter}/spec/typo_converter_spec.rb
  114. +1 −1 lib/{typo_guid.rb → publify_guid.rb}
  115. +2 −0 lib/publify_login_system.rb
  116. +3 −3 lib/{typo_login_system → publify_login_system}/access_control.rb
  117. 0 lib/{typo_login_system → publify_login_system}/login_system.rb
  118. +3 −3 lib/{typo_plugins.rb → publify_plugins.rb}
  119. 0 lib/{typo_sidebar.rb → publify_sidebar.rb}
  120. +1 −1 lib/{typo_textfilter_code.rb → publify_textfilter_code.rb}
  121. +1 −1 lib/{typo_textfilter_flickr.rb → publify_textfilter_flickr.rb}
  122. +1 −1 lib/{typo_textfilter_htmlfilter.rb → publify_textfilter_htmlfilter.rb}
  123. +4 −4 lib/{typo_textfilter_lightbox.rb → publify_textfilter_lightbox.rb}
  124. +4 −4 lib/{typo_textfilter_markdown.rb → publify_textfilter_markdown.rb}
  125. +1 −1 lib/{typo_textfilter_none.rb → publify_textfilter_none.rb}
  126. +2 −2 lib/{typo_textfilter_smartypants.rb → publify_textfilter_smartypants.rb}
  127. +1 −1 lib/{typo_textfilter_textile.rb → publify_textfilter_textile.rb}
  128. +1 −1 lib/{typo_textfilter_textile_and_markdown.rb → publify_textfilter_textile_and_markdown.rb}
  129. +1 −1 lib/{typo_textfilters.rb → publify_textfilters.rb}
  130. +1 −1 lib/{typo_time.rb → publify_time.rb}
  131. 0 lib/{typo_version.rb → publify_version.rb}
  132. +1 −1 lib/search_sidebar/lib/search_sidebar.rb
  133. +1 −1 lib/static_sidebar/lib/static_sidebar.rb
  134. +1 −1 lib/tasks/genethumb.rake
  135. +4 −4 lib/tasks/release.rake
  136. +1 −1 lib/tasks/sweep_cache.rake
  137. +5 −5 lib/text_filter_plugin.rb
  138. +0 −2 lib/typo_login_system.rb
  139. +4 −4 public/javascripts/administration.js
  140. +1 −1 public/javascripts/{typo.js → publify.js}
  141. 0 public/javascripts/{typo_carousel.js → publify_carousel.js}
  142. +1 −1 public/stylesheets/calendar_date_select/default.css
  143. +9 −9 spec/controllers/accounts_controller_spec.rb
  144. +6 −6 spec/controllers/admin/dashboard_controller_spec.rb
  145. +1 −1 spec/controllers/admin/feedback_controller_spec.rb
  146. +1 −1 spec/controllers/admin/pages_controller_spec.rb
  147. +2 −2 spec/controllers/articles_controller_spec.rb
  148. +2 −2 spec/controllers/theme_controller_spec.rb
  149. +2 −2 spec/factories.rb
  150. +5 −5 spec/lib/{typo_time_spec.rb → publify_time_spec.rb}
  151. +2 −2 spec/lib/text_filter_plugin_spec.rb
  152. +1 −1 spec/models/article_spec.rb
  153. +2 −2 spec/models/configuration_spec.rb
  154. +32 −32 spec/models/text_filter_spec.rb
  155. +1 −1 spec/models/user_spec.rb
  156. +2 −2 spec/services/admin/token_checker_spec.rb
  157. +1 −1 spec/spec_helper.rb
  158. +2 −2 spec/views/comments/index_atom_feed_spec.rb
  159. +2 −2 spec/views/shared/_atom_header_spec.rb
  160. +2 −2 spec/views/trackbacks/index_atom_feed_spec.rb
  161. +15 −15 themes/bootstrap/README.md
  162. +3 −3 themes/bootstrap/about.markdown
  163. +1 −1 themes/bootstrap/views/layouts/default.html.erb
  164. +1 −1 themes/typographic/views/layouts/default.html.erb
  165. +1 −1 vendor/plugins/easy-ckeditor/public/javascripts/ckeditor/lang/da.js
  166. +1 −1 vendor/plugins/easy-ckeditor/public/javascripts/ckeditor/lang/fo.js
  167. 0 vendor/plugins/{typo_avatar_gravatar → publify_avatar_gravatar}/MIT-LICENSE
  168. +1 −1 vendor/plugins/{typo_avatar_gravatar → publify_avatar_gravatar}/README
  169. +3 −3 vendor/plugins/{typo_avatar_gravatar → publify_avatar_gravatar}/Rakefile
  170. +4 −0 vendor/plugins/publify_avatar_gravatar/init.rb
  171. 0 vendor/plugins/{typo_avatar_gravatar → publify_avatar_gravatar}/install.rb
  172. +2 −2 ...ar_gravatar/lib/typo_avatar_gravatar.rb → publify_avatar_gravatar/lib/publify_avatar_gravatar.rb}
  173. 0 vendor/plugins/{typo_avatar_gravatar → publify_avatar_gravatar}/uninstall.rb
  174. +0 −4 vendor/plugins/typo_avatar_gravatar/init.rb
View
@@ -4,4 +4,4 @@
require File.expand_path('../config/application', __FILE__)
require 'rake'
-TypoBlog::Application.load_tasks
+Publify::Application.load_tasks
@@ -36,7 +36,7 @@ class BloggerApi < ActionWebService::API::Base
end
-class BloggerService < TypoWebService
+class BloggerService < PublifyWebService
web_service_api BloggerApi
before_invocation :authenticate
@@ -61,7 +61,7 @@ class MetaWeblogApi < ActionWebService::API::Base
end
-class MetaWeblogService < TypoWebService
+class MetaWeblogService < PublifyWebService
web_service_api MetaWeblogApi
before_invocation :authenticate
@@ -65,7 +65,7 @@ class MovableTypeApi < ActionWebService::API::Base
end
-class MovableTypeService < TypoWebService
+class MovableTypeService < PublifyWebService
web_service_api MovableTypeApi
before_invocation :authenticate, :except => [:getTrackbackPings, :supportedMethods, :supportedTextFilters]
@@ -1,4 +1,4 @@
-class TypoWebService < ActionWebService::Base
+class PublifyWebService < ActionWebService::Base
attr_accessor :controller
def initialize(controller)
@@ -70,7 +70,7 @@ def logout
self.current_user = nil
session[:user_id] = nil
cookies.delete :auth_token
- cookies.delete :typo_user_profile
+ cookies.delete :publify_user_profile
redirect_to :action => 'login'
end
@@ -103,7 +103,7 @@ def successful_login
:httponly => true # Help prevent auth_token theft.
}
end
- add_to_cookies(:typo_user_profile, self.current_user.profile_label, '/')
+ add_to_cookies(:publify_user_profile, self.current_user.profile_label, '/')
self.current_user.update_connection_time
flash[:notice] = _("Login successful")
@@ -31,7 +31,7 @@ def check_and_generate_secret_token
begin
checker.generate_token
- flash[:error] = _("For security reasons, you should restart your Typo application. Enjoy your blogging experience.")
+ flash[:error] = _("For security reasons, you should restart your Publify application. Enjoy your blogging experience.")
rescue
flash[:error] = _("Error: can't generate secret token. Security is at risk. Please, change %s content", checker.file)
end
@@ -5,7 +5,7 @@ def index
@cache_size = 0
@cache_number = 0
- FileUtils.mkdir_p(TypoBlog::Application.config.action_controller.page_cache_directory) unless File.exists?(TypoBlog::Application.config.action_controller.page_cache_directory)
+ FileUtils.mkdir_p(Publify::Application.config.action_controller.page_cache_directory) unless File.exists?(Publify::Application.config.action_controller.page_cache_directory)
if request.post?
begin
@@ -16,7 +16,7 @@ def index
end
end
- Find.find(TypoBlog::Application.config.action_controller.page_cache_directory) do |path|
+ Find.find(Publify::Application.config.action_controller.page_cache_directory) do |path|
if FileTest.directory?(path)
if File.basename(path)[0] == ?.
Find.prune
@@ -19,28 +19,28 @@ def index
@statuserposts = Article.published.count(conditions: {user_id: current_user.id})
@statspam = Comment.spam.count
@inbound_links = inbound_links
- @typo_links = typo_dev
- typo_version
+ @publify_links = publify_dev
+ publify_version
end
- def typo_version
- typo_version = nil
+ def publify_version
+ publify_version = nil
version = TYPO_VERSION.to_s.split('.')
begin
- url = "http://blog.typosphere.org/version.txt"
+ url = "http://blog.publify.co/version.txt"
open(url) do |http|
- typo_version = http.read[0..5]
- version = typo_version.split('.')
+ publify_version = http.read[0..5]
+ version = publify_version.split('.')
end
rescue
end
if version[0].to_i > TYPO_MAJOR.to_i
- flash.now[:error] = _("You are late from at least one major version of Typo. You should upgrade immediately. Download and install %s", "<a href='http://typosphere.org/stable.tgz'>#{_("the latest Typo version")}</a>").html_safe
+ flash.now[:error] = _("You are late from at least one major version of Publify. You should upgrade immediately. Download and install %s", "<a href='http://publify.co/stable.tgz'>#{_("the latest Publify version")}</a>").html_safe
elsif version[1].to_i > TYPO_SUB.to_i
- flash.now[:warning] = _("There's a new version of Typo available which may contain important bug fixes. Why don't you upgrade to %s ?", "<a href='http://typosphere.org/stable.tgz'>#{_("the latest Typo version")}</a>").html_safe
+ flash.now[:warning] = _("There's a new version of Publify available which may contain important bug fixes. Why don't you upgrade to %s ?", "<a href='http://publify.co/stable.tgz'>#{_("the latest Publify version")}</a>").html_safe
elsif version[2].to_i > TYPO_MINOR.to_i
- flash.now[:notice] = _("There's a new version of Typo available. Why don't you upgrade to %s ?", "<a href='http://typosphere.org/stable.tgz'>#{_("the latest Typo version")}</a>").html_safe
+ flash.now[:notice] = _("There's a new version of Publify available. Why don't you upgrade to %s ?", "<a href='http://publify.co/stable.tgz'>#{_("the latest Publify version")}</a>").html_safe
end
end
@@ -53,8 +53,8 @@ def inbound_links
parse(url).reverse.compact
end
- def typo_dev
- url = "http://blog.typosphere.org/articles.rss"
+ def publify_dev
+ url = "http://blog.publify.co/articles.rss"
parse(url)[0..4]
end
@@ -8,7 +8,7 @@ def index
this_blog.blog_name = params[:setting][:blog_name]
this_blog.base_url = blog_base_url
- @user = User.new(:login => 'admin', :email => params[:setting][:email], :nickname => "Typo Admin")
+ @user = User.new(:login => 'admin', :email => params[:setting][:email], :nickname => "Publify Admin")
@user.generate_password!
@user.name = @user.login
@@ -26,7 +26,7 @@ def index
self.current_user = @user
session[:user_id] = @user.id
- # FIXME: Crappy hack : by default, the auto generated post is user_id less and it makes Typo crash
+ # FIXME: Crappy hack : by default, the auto generated post is user_id less and it makes Publify crash
if User.count == 1
update_or_create_first_post_with_user @user
create_first_page @user
@@ -46,7 +46,7 @@ def update_or_create_first_post_with_user user
else
Article.create(title: 'Hello World!',
author: user.login,
- body: 'Welcome to Typo. This is your first article. Edit or delete it, then start blogging!',
+ body: 'Welcome to Publify. This is your first article. Edit or delete it, then start blogging!',
allow_comments: 1,
allow_pings: 1,
published: 1,
@@ -60,7 +60,7 @@ def create_first_page user
Page.create(name: "about",
title: "about",
user: user,
- body: "This is an example of a Typo page. You can edit this to write information about yourself or your site so readers know who you are. You can create as many pages as this one as you like and manage all of your content inside Typo.")
+ body: "This is an example of a Publify page. You can edit this to write information about yourself or your site so readers know who you are. You can create as many pages as this one as you like and manage all of your content inside Publify.")
end
@@ -66,7 +66,7 @@ def text_filter_options_with_id
end
def plugin_options(kind, blank = true)
- r = TypoPlugins::Keeper.available_plugins(kind).collect do |plugin|
+ r = PublifyPlugins::Keeper.available_plugins(kind).collect do |plugin|
[ plugin.name, plugin.to_s ]
end
blank ? r << [_("none"),''] : r
@@ -130,13 +130,13 @@ def published_or_not(item)
def macro_help_popup(macro, text)
unless current_user.editor == 'visual'
- "<a href=\"#{url_for :controller => 'textfilters', :action => 'macro_help', :id => macro.short_name}\" onclick=\"return popup(this, 'Typo Macro Help')\">#{text}</a>"
+ "<a href=\"#{url_for :controller => 'textfilters', :action => 'macro_help', :id => macro.short_name}\" onclick=\"return popup(this, 'Publify Macro Help')\">#{text}</a>"
end
end
def render_macros(macros)
content_tag(:div) do
- link_to_function(_("Show help on Typo macros") + " (+/-)", update_page { |page| page.visual_effect(:toggle_blind, "macros", :duration => 0.2) })
+ link_to_function(_("Show help on Publify macros") + " (+/-)", update_page { |page| page.visual_effect(:toggle_blind, "macros", :duration => 0.2) })
content_tag(:table, {:id => 'macros', :style => 'display: none'}) do
content_tag(:tr) do
content_tag(:th, _('Name'))
@@ -8,8 +8,8 @@ def dashboard_theme_link
def dashboard_sidebar_link
return unless current_user.profile.modules.include? :sidebar
- _("You can also %s to customize your Typo blog.",
- link_to(_('download some plugins'), 'http://plugins.typosphere.org'))
+ _("You can also %s to customize your Publify blog.",
+ link_to(_('download some plugins'), 'http://plugins.publify.co'))
end
def dashboard_action_links
@@ -37,6 +37,7 @@ def comments_link(article)
end
def avatar_tag(options = {})
+ puts this_blog.plugin_avatar.to_s
avatar_class = this_blog.plugin_avatar.constantize
return '' unless avatar_class.respond_to?(:get_avatar)
avatar_class.get_avatar(options)
@@ -53,15 +54,15 @@ def meta_tag(name, value)
def markup_help_popup(markup, text)
if markup and markup.commenthelp.size > 1
- "<a href=\"#{url_for :controller => 'articles', :action => 'markup_help', :id => markup.id}\" onclick=\"return popup(this, 'Typo Markup Help')\">#{text}</a>"
+ "<a href=\"#{url_for :controller => 'articles', :action => 'markup_help', :id => markup.id}\" onclick=\"return popup(this, 'Publify Markup Help')\">#{text}</a>"
else
''
end
end
def onhover_show_admin_tools(type, id = nil)
tag = []
- tag << %{ onmouseover="if (getCookie('typo_user_profile') == 'admin') { Element.show('admin_#{[type, id].compact.join('_')}'); }" }
+ tag << %{ onmouseover="if (getCookie('publify_user_profile') == 'admin') { Element.show('admin_#{[type, id].compact.join('_')}'); }" }
tag << %{ onmouseout="Element.hide('admin_#{[type, id].compact.join('_')}');" }
tag
end
@@ -156,12 +157,12 @@ def content_array
end
def new_js_distance_of_time_in_words_to_now(date)
- # Ruby Date class doesn't have #utc method, but _typo_dev.html.erb
+ # Ruby Date class doesn't have #utc method, but _publify_dev.html.erb
# passes Ruby Date.
date = date.to_time
time = _(date.utc.strftime(_("%%a, %%d %%b %%Y %%H:%%M:%%S GMT", date.utc)))
timestamp = date.utc.to_i
- content_tag(:span, time, {:class => "typo_date date gmttimestamp-#{timestamp}", :title => time})
+ content_tag(:span, time, {:class => "publify_date date gmttimestamp-#{timestamp}", :title => time})
end
def display_date(date)
@@ -19,7 +19,7 @@ def comment(comment, user)
def notif_user(user)
@user = user
@blog = Blog.default
- build_mail @blog, @user, "Welcome to Typo"
+ build_mail @blog, @user, "Welcome to Publify"
end
private
@@ -29,7 +29,7 @@ def make_subject blog, subject
end
def build_mail blog, user, subject
- headers['X-Mailer'] = "Typo #{TYPO_VERSION}"
+ headers['X-Mailer'] = "Publify #{TYPO_VERSION}"
mail(from: blog.email_from,
to: user.email,
subject: make_subject(blog, subject))
View
@@ -3,7 +3,7 @@
require 'net/http'
class Article < Content
- include TypoGuid
+ include PublifyGuid
include ConfigManager
serialize :settings, Hash
@@ -53,7 +53,7 @@ def spam
scope :drafts, lambda { where(state: 'draft').order('created_at DESC') }
scope :child_of, lambda { |article_id| where(parent_id: article_id) }
scope :published, lambda { where(published: true, published_at: Time.at(0)..Time.now).order('published_at DESC') }
- scope :published_at, lambda {|time_params| published.where(published_at: TypoTime.delta(*time_params)).order('published_at DESC')}
+ scope :published_at, lambda {|time_params| published.where(published_at: PublifyTime.delta(*time_params)).order('published_at DESC')}
scope :published_since, lambda {|time| published.where('published_at > ?', time).order('published_at DESC') }
scope :withdrawn, lambda { where(state: 'withdrawn').order('published_at DESC') }
scope :pending, lambda { where('state = ? and published_at > ?', 'publication_pending', Time.now).order('published_at DESC') }
@@ -206,7 +206,7 @@ def self.find_by_published_at
# Finds one article which was posted on a certain date and matches the supplied dashed-title
# params is a Hash
def self.find_by_permalink(params)
- date_range = TypoTime.delta(params[:year], params[:month], params[:day])
+ date_range = PublifyTime.delta(params[:year], params[:month], params[:day])
req_params = {}
req_params[:permalink] = params[:title] if params[:title]
View
@@ -2,8 +2,8 @@
# configuration settings and is linked to most of the assorted content
# classes via has_many.
#
-# Once upon a time, there were plans to make typo handle multiple blogs,
-# but it never happened and typo is now firmly single-blog.
+# Once upon a time, there were plans to make publify handle multiple blogs,
+# but it never happened and publify is now firmly single-blog.
#
class Blog < ActiveRecord::Base
include ConfigManager
@@ -52,7 +52,7 @@ class Blog < ActiveRecord::Base
setting :global_pings_disable, :boolean, false
setting :ping_urls, :string, "http://blogsearch.google.com/ping/RPC2\nhttp://rpc.technorati.com/rpc/ping\nhttp://ping.blo.gs/\nhttp://rpc.weblogs.com/RPC2"
setting :send_outbound_pings, :boolean, true
- setting :email_from, :string, 'typo@example.com'
+ setting :email_from, :string, 'publify@example.com'
setting :editor, :integer, 'visual'
setting :allow_signup, :integer, 0
setting :date_format, :string, '%d/%m/%Y'
View
@@ -5,7 +5,7 @@ class Feedback < ActiveRecord::Base
belongs_to :text_filter
belongs_to :article
- include TypoGuid
+ include PublifyGuid
include Stateful
include ContentBase
View
@@ -1,6 +1,6 @@
require 'digest/sha1'
-# Typo user.
+# Publify user.
class User < ActiveRecord::Base
include ConfigManager
@@ -40,7 +40,7 @@ class User < ActiveRecord::Base
setting :show_jabber, :boolean, false
setting :admin_theme, :string, 'blue'
- # echo "typo" | sha1sum -
+ # echo "publify" | sha1sum -
class_attribute :salt
def self.salt
@@ -6,7 +6,7 @@ def initialize(file = File.join(Rails.root, "config", "secret.token"))
end
def safe_token_in_use?
- TypoBlog::Application.config.secret_token != $default_token
+ Publify::Application.config.secret_token != $default_token
end
def needs_token_generation?
@@ -1,6 +1,6 @@
<% @page_heading = _('Cache') %>
-<p><%= _("To save resources Typo caches content in static files. Cache is cleared each time something gets published. You may however want to clear the cache yourself.") %></p>
+<p><%= _("To save resources Publify caches content in static files. Cache is cleared each time something gets published. You may however want to clear the cache yourself.") %></p>
<p><%= _("There are currently %d files in cache for a total amount of %d Kb", @cache_number.to_i, @cache_size.to_i / 1000) %>.</p>
@@ -1,12 +1,12 @@
<div class='alert alert-info'>
<p>
- <%= _("This place gives you a quick overview of what happens on your Typo blog and what you can do. Maybe will you want to %s", dashboard_action_links) %>
+ <%= _("This place gives you a quick overview of what happens on your Publify blog and what you can do. Maybe will you want to %s", dashboard_action_links) %>
</p>
<p>
<%= dashboard_theme_link %>
</p>
<p>
<%= _("If you need help, %s.",
- link_to(_('read our documentation'), 'http://typosphere.org')) %> <%= dashboard_sidebar_link %>
+ link_to(_('read our documentation'), 'http://publify.co')) %> <%= dashboard_sidebar_link %>
</p>
</div>
@@ -1,15 +1,15 @@
-<h3><%= _("Latest news from the Typo development blog") %></h3>
+<h3><%= _("Latest news from the Publify development blog") %></h3>
<div class='well'>
<ul class='unstyled'>
- <% if @typo_links.nil? %>
+ <% if @publify_links.nil? %>
<li class='alert alert-error'>
<%= _('You have no internet connection') %>
</li>
<% else %>
- <% if @typo_links.size == 0 %>
+ <% if @publify_links.size == 0 %>
<li><%= _("Oh no, nothing new") %></li>
<% else %>
- <% @typo_links.each do |link| -%>
+ <% @publify_links.each do |link| -%>
<li <%= alternate_class %>>
<h5><%= link_to("#{link.title}</strong>".html_safe, link.link) %> <%= display_date_and_time(link.date) %></h5>
<p><%= link.description.strip_html.slice(0, 300) %>...</p>
@@ -2,7 +2,7 @@
<div class='well'>
<p><%= _("%d articles and %d comments were posted since your last connexion", @newposts_count, @newcomments_count) %></p>
- <p><%= _("You're running Typo %s", TYPO_VERSION) %> <%= @version_message %></p>
+ <p><%= _("You're running Publify %s", TYPO_VERSION) %> <%= @version_message %></p>
<% if current_user.profile.modules.include? :articles%>
<p><strong><%= _("Content") %></strong></p>
Oops, something went wrong.

0 comments on commit 63b3ffb

Please sign in to comment.