Permalink
Browse files

Markdown to replace Textile;

Remove Captcha;
Remove unused files.
  • Loading branch information...
1 parent 755d073 commit cff1352dd548963c0af84ba3c56ae36c234c682b @huacnlee committed Oct 25, 2011
Showing with 69 additions and 1,099 deletions.
  1. +8 −21 Gemfile
  2. +54 −106 Gemfile.lock
  3. +0 −1 app/controllers/posts_controller.rb
  4. +5 −0 app/helpers/application_helper.rb
  5. +0 −3 app/helpers/comments_helper.rb
  6. +0 −3 app/helpers/home_helper.rb
  7. +0 −3 app/helpers/menus_helper.rb
  8. +0 −7 app/helpers/pages_helper.rb
  9. +1 −1 app/views/cpanel/pages/edit.html.erb
  10. +1 −1 app/views/pages/show.html.erb
  11. +0 −5 config/application.rb
  12. +0 −2 config/initializers/omniauth.rb
  13. +0 −17 config/initializers/setup_mailer.rb
  14. +0 −491 lib/fanfou_moulde.rb
  15. +0 −13 lib/importer/blog_bus.rb
  16. +0 −115 public/doc/textile.html
  17. BIN public/images/feed/Thumbs.db
  18. BIN public/images/feed/icon_subshot01_google.gif
  19. BIN public/images/feed/icon_subshot01_qq.gif
  20. BIN public/images/feed/icon_subshot01_xianguo.gif
  21. BIN public/images/feed/icon_subshot01_youdao.gif
  22. BIN public/images/feed/icon_subshot01_zhuaxia.gif
  23. BIN public/images/webicons/Thumbs.db
  24. BIN public/images/webicons/delicious.jpg
  25. BIN public/images/webicons/douban.jpg
  26. BIN public/images/webicons/fanfou.jpg
  27. BIN public/images/webicons/flickr.jpg
  28. BIN public/images/webicons/friendfeed.jpg
  29. BIN public/images/webicons/google.jpg
  30. BIN public/images/webicons/lastfm.jpg
  31. BIN public/images/webicons/picasaweb.jpg
  32. BIN public/images/webicons/stumbleupon.jpg
  33. BIN public/images/webicons/twitter.jpg
  34. BIN public/images/webicons/wakoopa.jpg
  35. BIN public/images/webicons/xiami.jpg
  36. BIN public/images/webicons/youtube.jpg
  37. BIN public/images/webicons/yupoo.jpg
  38. +0 −114 vendor/plugins/captcha/README
  39. +0 −9 vendor/plugins/captcha/init.rb
  40. +0 −4 vendor/plugins/captcha/install.rb
  41. +0 −31 vendor/plugins/captcha/lib/captcha_helper.rb
  42. +0 −74 vendor/plugins/captcha/lib/captcha_image_generator.rb
  43. +0 −27 vendor/plugins/captcha/lib/captcha_util.rb
  44. +0 −24 vendor/plugins/captcha/lib/validates_captcha.rb
  45. +0 −27 vendor/plugins/captcha/tasks/generate.rake
View
29 Gemfile
@@ -1,26 +1,13 @@
source 'http://rubygems.org'
-gem 'rails', '3.0.0'
+gem 'rails', '3.0.9'
gem 'mysql2', "0.2.7"
-gem 'RedCloth'
-gem 'simple-rss'
+gem 'simple-rss', '1.2.3'
gem 'will_paginate', '3.0.pre'
-gem 'acts-as-taggable-on'
-gem 'twitter'
-gem 'dalli'
-gem 'tagged-cache'
-gem 'omniauth', '0.2.0.beta3'
-gem "oa-openid", '0.2.0.beta3'
+gem 'acts-as-taggable-on','2.0.6'
+gem 'twitter', '1.2.0'
+gem 'dalli', '1.0.4'
+gem 'tagged-cache', '1.1.1'
gem "heroku"
-gem "taps"
-gem "disqus"
-
-gem 'rmagick'
-# gem 'aws-s3', :require => 'aws/s3'
-
-# Bundle gems for the local environment. Make sure to
-# put test-only gems in this group so their generators
-# and rake tasks are available in development mode:
-# group :development, :test do
-# gem 'webrat'
-# end
+gem "taps", '0.3.23'
+gem "bluecloth","2.1.0"
View
@@ -1,42 +1,39 @@
GEM
remote: http://rubygems.org/
specs:
- RedCloth (4.2.7)
abstract (1.0.0)
- actionmailer (3.0.0)
- actionpack (= 3.0.0)
- mail (~> 2.2.5)
- actionpack (3.0.0)
- activemodel (= 3.0.0)
- activesupport (= 3.0.0)
+ actionmailer (3.0.9)
+ actionpack (= 3.0.9)
+ mail (~> 2.2.19)
+ actionpack (3.0.9)
+ activemodel (= 3.0.9)
+ activesupport (= 3.0.9)
builder (~> 2.1.2)
erubis (~> 2.6.6)
- i18n (~> 0.4.1)
+ i18n (~> 0.5.0)
rack (~> 1.2.1)
- rack-mount (~> 0.6.12)
- rack-test (~> 0.5.4)
+ rack-mount (~> 0.6.14)
+ rack-test (~> 0.5.7)
tzinfo (~> 0.3.23)
- activemodel (3.0.0)
- activesupport (= 3.0.0)
+ activemodel (3.0.9)
+ activesupport (= 3.0.9)
builder (~> 2.1.2)
- i18n (~> 0.4.1)
- activerecord (3.0.0)
- activemodel (= 3.0.0)
- activesupport (= 3.0.0)
- arel (~> 1.0.0)
+ i18n (~> 0.5.0)
+ activerecord (3.0.9)
+ activemodel (= 3.0.9)
+ activesupport (= 3.0.9)
+ arel (~> 2.0.10)
tzinfo (~> 0.3.23)
- activeresource (3.0.0)
- activemodel (= 3.0.0)
- activesupport (= 3.0.0)
- activesupport (3.0.0)
+ activeresource (3.0.9)
+ activemodel (= 3.0.9)
+ activesupport (= 3.0.9)
+ activesupport (3.0.9)
acts-as-taggable-on (2.0.6)
addressable (2.2.6)
- arel (1.0.1)
- activesupport (~> 3.0.0)
+ arel (2.0.10)
+ bluecloth (2.1.0)
builder (2.1.2)
dalli (1.0.4)
- disqus (1.0.4)
- json
erubis (2.6.6)
abstract (>= 1.0.0)
faraday (0.5.7)
@@ -51,7 +48,7 @@ GEM
rest-client (~> 1.6.1)
rubyzip
term-ansicolor (~> 1.0.5)
- i18n (0.4.2)
+ i18n (0.5.0)
json (1.6.1)
launchy (2.0.5)
addressable (~> 2.2.6)
@@ -60,82 +57,36 @@ GEM
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
- mime-types (1.16)
+ mime-types (1.17.1)
multi_json (0.0.5)
multi_xml (0.2.2)
multipart-post (1.1.2)
mysql2 (0.2.7)
- net-ldap (0.1.1)
- nokogiri (1.4.4)
- oa-basic (0.2.0.beta3)
- multi_json (~> 0.0.2)
- nokogiri (~> 1.4.2)
- oa-core (= 0.2.0.beta3)
- rest-client (~> 1.6.0)
- oa-core (0.2.0.beta3)
- rack (~> 1.1)
- oa-enterprise (0.2.0.beta3)
- net-ldap (~> 0.1.1)
- nokogiri (~> 1.4.2)
- oa-core (= 0.2.0.beta3)
- pyu-ruby-sasl (~> 0.0.3.1)
- rubyntlm (~> 0.1.1)
- oa-more (0.2.0.beta3)
- multi_json (~> 0.0.2)
- oa-core (= 0.2.0.beta3)
- rest-client (~> 1.6.0)
- oa-oauth (0.2.0.beta3)
- multi_json (~> 0.0.2)
- nokogiri (~> 1.4.2)
- oa-core (= 0.2.0.beta3)
- oauth (~> 0.4.0)
- oauth2 (~> 0.1.1)
- oa-openid (0.2.0.beta3)
- oa-core (= 0.2.0.beta3)
- rack-openid (~> 1.2.0)
- ruby-openid-apps-discovery
- oauth (0.4.4)
- oauth2 (0.1.1)
- faraday (~> 0.5.0)
- multi_json (~> 0.0.4)
- omniauth (0.2.0.beta3)
- oa-basic (= 0.2.0.beta3)
- oa-core (= 0.2.0.beta3)
- oa-enterprise (= 0.2.0.beta3)
- oa-more (= 0.2.0.beta3)
- oa-oauth (= 0.2.0.beta3)
- oa-openid (= 0.2.0.beta3)
- polyglot (0.3.1)
- pyu-ruby-sasl (0.0.3.3)
- rack (1.2.3)
+ polyglot (0.3.2)
+ rack (1.2.4)
rack-mount (0.6.14)
rack (>= 1.0.0)
- rack-openid (1.2.0)
- rack (>= 1.1.0)
- ruby-openid (>= 2.1.8)
rack-test (0.5.7)
rack (>= 1.0)
- rails (3.0.0)
- actionmailer (= 3.0.0)
- actionpack (= 3.0.0)
- activerecord (= 3.0.0)
- activeresource (= 3.0.0)
- activesupport (= 3.0.0)
- bundler (~> 1.0.0)
- railties (= 3.0.0)
- railties (3.0.0)
- actionpack (= 3.0.0)
- activesupport (= 3.0.0)
- rake (>= 0.8.4)
- thor (~> 0.14.0)
- rake (0.9.2)
+ rails (3.0.9)
+ actionmailer (= 3.0.9)
+ actionpack (= 3.0.9)
+ activerecord (= 3.0.9)
+ activeresource (= 3.0.9)
+ activesupport (= 3.0.9)
+ bundler (~> 1.0)
+ railties (= 3.0.9)
+ railties (3.0.9)
+ actionpack (= 3.0.9)
+ activesupport (= 3.0.9)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.4)
+ rake (0.9.2.2)
+ rdoc (3.11)
+ json (~> 1.4)
rest-client (1.6.1)
mime-types (>= 1.16)
- rmagick (2.13.1)
- ruby-openid (2.1.8)
- ruby-openid-apps-discovery (1.2.0)
- ruby-openid (>= 2.1.7)
- rubyntlm (0.1.1)
rubyzip (0.9.4)
sequel (3.20.0)
simple-rss (1.2.3)
@@ -155,7 +106,8 @@ GEM
sqlite3-ruby (~> 1.2)
term-ansicolor (1.0.6)
thor (0.14.6)
- treetop (1.4.9)
+ treetop (1.4.10)
+ polyglot
polyglot (>= 0.3.1)
twitter (1.2.0)
faraday (~> 0.5.4)
@@ -164,25 +116,21 @@ GEM
multi_json (~> 0.0.5)
multi_xml (~> 0.2.0)
simple_oauth (~> 0.1.4)
- tzinfo (0.3.27)
+ tzinfo (0.3.30)
will_paginate (3.0.pre)
PLATFORMS
ruby
DEPENDENCIES
- RedCloth
- acts-as-taggable-on
- dalli
- disqus
+ acts-as-taggable-on (= 2.0.6)
+ bluecloth (= 2.1.0)
+ dalli (= 1.0.4)
heroku
mysql2 (= 0.2.7)
- oa-openid (= 0.2.0.beta3)
- omniauth (= 0.2.0.beta3)
- rails (= 3.0.0)
- rmagick
- simple-rss
- tagged-cache
- taps
- twitter
+ rails (= 3.0.9)
+ simple-rss (= 1.2.3)
+ tagged-cache (= 1.1.1)
+ taps (= 0.3.23)
+ twitter (= 1.2.0)
will_paginate (= 3.0.pre)
@@ -4,7 +4,6 @@ class PostsController < ApplicationController
caches_action :index,
:cache_path => Proc.new { |c| "blog/index/#{c.request.params[:page]}:#{c.request.params[:category]}:#{c.request.params[:tag]}" },
:depends => ["posts_list"]
- validates_captcha
before_filter :init_posts
private
@@ -1,6 +1,7 @@
# coding: utf-8
require "digest/md5"
require "encoder"
+require "bluecloth"
# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
@@ -71,5 +72,9 @@ def unfollow_link(email,unfollowerable)
unfollow_url(:type => unfollowerable.class.name.downcase,
:id => unfollowerable.id,:key => Encoder.encode(email))
end
+
+ def markdown(str)
+ raw "<div class=\"markdown_content\">#{BlueCloth.new(str).to_html}</div>"
+ end
end
@@ -1,3 +0,0 @@
-# coding: utf-8
-module CommentsHelper
-end
@@ -1,3 +0,0 @@
-# coding: utf-8
-module HomeHelper
-end
@@ -1,3 +0,0 @@
-# coding: utf-8
-module MenusHelper
-end
@@ -1,7 +0,0 @@
-# coding: utf-8
-require "RedCloth"
-module PagesHelper
- def textile(body)
- RedCloth.new(body).to_html
- end
-end
@@ -16,7 +16,7 @@
<td>
<%= f.text_area :body, :class => 'text long' %><br />
<p class="tip_p">
- 这里使用 Textile 格式, 请阅读 <%= link_to "这篇文档", "/doc/textile.html" %></a>.
+ 这里使用 Markdown 格式, 请阅读 <%= link_to "这篇文档", "http://daringfireball.net/projects/markdown/" %></a>.
</p>
</td>
</tr>
@@ -1,3 +1,3 @@
<div id="content">
-<%= raw textile(@page.body) %>
+<%= markdown(@page.body) %>
</div>
View
@@ -54,9 +54,6 @@ class Application < Rails::Application
# you app domain
APP_DOMAIN = 'youdomain.com'
-# captcha secret key
-CAPTCHA_SALT = "(&*1987@#"
-
# custom feed url, set false to use system feed url
# FEED_URL = "http://feeds.feedburner.com/huacnlee"
FEED_URL = false
@@ -67,8 +64,6 @@ class Application < Rails::Application
# Custom html code in footer.
FOOTER_HTML = ""
-FOOTER_HTML = ""
-
require 'yaml'
YAML::ENGINE.yamler= 'syck'
@@ -1,2 +0,0 @@
-require 'openid/store/filesystem'
-Rails.application.config.middleware.use OmniAuth::Strategies::OpenID, OpenID::Store::Filesystem.new("#{Rails.root}/tmp"), :name => 'google', :identifier => 'https://www.google.com/accounts/o8/id'
@@ -1,17 +0,0 @@
-ActionMailer::Base.smtp_settings = {
- :address => "smtp.gmail.com",
- :enable_starttls_auto => true,
- :port => 587,
- :domain => "huacnlee.com",
- :authentication => :plain,
- :user_name => "support@huacnlee.com",
- :password => "SU_123123"
-}
-# action mailer config
-ActionMailer::Base.default_content_type = "text/html"
-ActionMailer::Base.delivery_method = :smtp
-ActionMailer::Base.default_charset = "utf-8"
-ActionMailer::Base.default_url_options[:host] = APP_DOMAIN
-ActionMailer::Base.raise_delivery_errors = true
-
-# Mail.register_interceptor(DevelopmentMailInterceptor) if Rails.env.development?
Oops, something went wrong.

0 comments on commit cff1352

Please sign in to comment.