Permalink
Browse files

Merge pull request #3 from jeady/master

Update Typo with various bug fixes
  • Loading branch information...
2 parents 396d8ee + acd9cad commit c533e7383f6121ea38383706928fcc457c822e9e Richard Xia committed Oct 9, 2012
View
@@ -25,6 +25,7 @@ end
source :rubygems
+gem 'thin'
gem 'rails', '~> 3.0.10'
gem 'require_relative'
gem 'htmlentities'
@@ -51,7 +52,7 @@ group :development, :test do
gem 'simplecov', :require => false
gem 'sqlite3'
gem 'cucumber'
- gem 'cucumber-rails'
+ gem 'cucumber-rails', :require => false
gem 'cucumber-rails-training-wheels'
gem 'database_cleaner'
gem 'capybara'
View
@@ -3,35 +3,35 @@ GEM
specs:
RedCloth (4.2.9)
abstract (1.0.0)
- actionmailer (3.0.10)
- actionpack (= 3.0.10)
+ actionmailer (3.0.17)
+ actionpack (= 3.0.17)
mail (~> 2.2.19)
- actionpack (3.0.10)
- activemodel (= 3.0.10)
- activesupport (= 3.0.10)
+ actionpack (3.0.17)
+ activemodel (= 3.0.17)
+ activesupport (= 3.0.17)
builder (~> 2.1.2)
erubis (~> 2.6.6)
i18n (~> 0.5.0)
- rack (~> 1.2.1)
+ rack (~> 1.2.5)
rack-mount (~> 0.6.14)
rack-test (~> 0.5.7)
tzinfo (~> 0.3.23)
- activemodel (3.0.10)
- activesupport (= 3.0.10)
+ activemodel (3.0.17)
+ activesupport (= 3.0.17)
builder (~> 2.1.2)
i18n (~> 0.5.0)
- activerecord (3.0.10)
- activemodel (= 3.0.10)
- activesupport (= 3.0.10)
+ activerecord (3.0.17)
+ activemodel (= 3.0.17)
+ activesupport (= 3.0.17)
arel (~> 2.0.10)
tzinfo (~> 0.3.23)
- activeresource (3.0.10)
- activemodel (= 3.0.10)
- activesupport (= 3.0.10)
- activesupport (3.0.10)
- acts_as_list (0.1.5)
+ activeresource (3.0.17)
+ activemodel (= 3.0.17)
+ activesupport (= 3.0.17)
+ activesupport (3.0.17)
+ acts_as_list (0.1.8)
acts_as_tree_rails3 (0.1.0)
- addressable (2.1.2)
+ addressable (2.3.2)
archive-tar-minitar (0.5.2)
arel (2.0.10)
bluecloth (2.2.0)
@@ -43,42 +43,42 @@ GEM
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 0.1.4)
- childprocess (0.3.2)
- ffi (~> 1.0.6)
+ childprocess (0.3.5)
+ ffi (~> 1.0, >= 1.0.6)
coderay (0.9.8)
columnize (0.3.6)
- cucumber (1.1.9)
+ cucumber (1.2.1)
builder (>= 2.1.2)
- diff-lcs (>= 1.1.2)
- gherkin (~> 2.9.0)
+ diff-lcs (>= 1.1.3)
+ gherkin (~> 2.11.0)
json (>= 1.4.6)
- term-ansicolor (>= 1.0.6)
cucumber-rails (1.3.0)
capybara (>= 1.1.2)
cucumber (>= 1.1.8)
nokogiri (>= 1.5.0)
cucumber-rails-training-wheels (1.0.0)
cucumber-rails (>= 1.1.1)
- database_cleaner (0.7.2)
+ daemons (1.1.9)
+ database_cleaner (0.8.0)
diff-lcs (1.1.3)
erubis (2.6.6)
abstract (>= 1.0.0)
- factory_girl (2.2.0)
- activesupport
- ffi (1.0.11)
- flickraw (0.9.5)
- flickraw-cached (20110920)
+ eventmachine (1.0.0)
+ factory_girl (2.6.4)
+ activesupport (>= 2.3.9)
+ ffi (1.1.5)
+ flickraw (0.9.6)
+ flickraw-cached (20120701)
flickraw (>= 0.9)
- gherkin (2.9.3)
+ gherkin (2.11.2)
json (>= 1.4.6)
htmlentities (4.3.1)
i18n (0.5.0)
- json (1.6.5)
- kaminari (0.13.0)
+ json (1.7.5)
+ kaminari (0.14.1)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
- railties (>= 3.0.0)
- libwebsocket (0.1.3)
+ libwebsocket (0.1.5)
addressable
linecache19 (0.5.12)
ruby_core_source (>= 0.1.4)
@@ -87,29 +87,29 @@ GEM
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
- mime-types (1.17.2)
+ mime-types (1.19)
mini_magick (1.3.3)
subexec (~> 0.0.4)
- multi_json (1.1.0)
- nokogiri (1.5.0)
- pg (0.13.2)
+ multi_json (1.3.6)
+ nokogiri (1.5.5)
+ pg (0.14.1)
polyglot (0.3.3)
rack (1.2.5)
rack-mount (0.6.14)
rack (>= 1.0.0)
rack-test (0.5.7)
rack (>= 1.0)
- rails (3.0.10)
- actionmailer (= 3.0.10)
- actionpack (= 3.0.10)
- activerecord (= 3.0.10)
- activeresource (= 3.0.10)
- activesupport (= 3.0.10)
+ rails (3.0.17)
+ actionmailer (= 3.0.17)
+ actionpack (= 3.0.17)
+ activerecord (= 3.0.17)
+ activeresource (= 3.0.17)
+ activesupport (= 3.0.17)
bundler (~> 1.0)
- railties (= 3.0.10)
- railties (3.0.10)
- actionpack (= 3.0.10)
- activesupport (= 3.0.10)
+ railties (= 3.0.17)
+ railties (3.0.17)
+ actionpack (= 3.0.17)
+ activesupport (= 3.0.17)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.4)
@@ -118,19 +118,19 @@ GEM
json (~> 1.4)
recaptcha (0.3.4)
require_relative (1.0.3)
- rspec (2.8.0)
- rspec-core (~> 2.8.0)
- rspec-expectations (~> 2.8.0)
- rspec-mocks (~> 2.8.0)
- rspec-core (2.8.0)
- rspec-expectations (2.8.0)
- diff-lcs (~> 1.1.2)
- rspec-mocks (2.8.0)
- rspec-rails (2.8.1)
+ rspec (2.11.0)
+ rspec-core (~> 2.11.0)
+ rspec-expectations (~> 2.11.0)
+ rspec-mocks (~> 2.11.0)
+ rspec-core (2.11.1)
+ rspec-expectations (2.11.3)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.11.3)
+ rspec-rails (2.11.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
- rspec (~> 2.8.0)
+ rspec (~> 2.11.0)
ruby-debug-base19 (0.11.25)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
@@ -142,26 +142,28 @@ GEM
ruby_core_source (0.1.5)
archive-tar-minitar (>= 0.5.2)
rubypants (0.2.0)
- rubyzip (0.9.7)
- selenium-webdriver (2.21.2)
+ rubyzip (0.9.9)
+ selenium-webdriver (2.25.0)
childprocess (>= 0.2.5)
- ffi (~> 1.0)
libwebsocket (~> 0.1.3)
multi_json (~> 1.0)
rubyzip
- simplecov (0.6.1)
+ simplecov (0.6.4)
multi_json (~> 1.0)
simplecov-html (~> 0.5.3)
simplecov-html (0.5.3)
- sqlite3 (1.3.5)
+ sqlite3 (1.3.6)
subexec (0.0.4)
- term-ansicolor (1.0.7)
+ thin (1.5.0)
+ daemons (>= 1.0.9)
+ eventmachine (>= 0.12.6)
+ rack (>= 1.0.0)
thor (0.14.6)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
- tzinfo (0.3.31)
- uuidtools (2.1.2)
+ tzinfo (0.3.33)
+ uuidtools (2.1.3)
webrat (0.7.3)
nokogiri (>= 1.2.0)
rack (>= 1.0)
@@ -200,5 +202,6 @@ DEPENDENCIES
rubypants (~> 0.2.0)
simplecov
sqlite3
+ thin
uuidtools (~> 2.1.1)
webrat
@@ -9,7 +9,6 @@
do %>
<table class="zebra-striped clearfix">
- <thead>
<tr class='noborder'>
<td colspan=5>
<input id="search" type="text" name="search[searchstring]" class='large' />
@@ -42,9 +41,6 @@
<th><%= _("Date") %></th>
<th class='last'><%= _("Feedback")%></th>
</tr>
- </thead>
- <tbody id="articleList">
<%= render 'article_list', { :articles => @articles } -%>
- </tbody>
</table>
<%end%>
@@ -7,7 +7,7 @@
# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
- config.action_controller.perform_caching = true
+ config.action_controller.perform_caching = false
# See everything in the log (default is :info)
# config.log_level = :debug
@@ -0,0 +1,14 @@
+class ERB
+ module Util
+ def html_escape(s)
+ silence_warnings {
+ s = s.to_s
+ if s.html_safe?
+ s
+ else
+ s.gsub(/[&"'><]/n) { |special| HTML_ESCAPE[special] }.html_safe
+ end
+ }
+ end
+ end
+end
@@ -0,0 +1,12 @@
+# TODO: Can be removed after updating to rack 1.3.0
+module Rack
+ module Utils
+ def escape(s)
+ CGI.escape(s.to_s)
+ end
+ def unescape(s)
+ CGI.unescape(s)
+ end
+ end
+end
+
View
@@ -5,10 +5,8 @@
#
# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
# Mayor.create(:name => 'Daley', :city => cities.first)
-Blog.create(:id => 1, :settings => {"canonical_server_url"=>""})
+Blog.create(:id => 1, :settings => {"canonical_server_url"=>""}, :base_url => "http://example.com/")
Category.create(:id => 1, :name => "General", :permalink => "general", :position => 1)
-Content.create(:allow_comments => true, :allow_pings => true, :author => "Mr Typo", :body => "Welcome to Typo. This is your first article. Edit or delete it, then start blogging!", :guid => "1bf3e2ca-ed7b-4562-8a4a-8ce8438822c8", :id => 1, :permalink => "hello-world", :post_type => "read", :published => true, :published_at => "2012-06-09 21:51:55 UTC", :settings => {"password"=>nil}, :state => "published", :text_filter_id => 5, :title => "Hello World!", :type => "Article", :user_id => 1)
-Content.create(: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.", :id => 2, :name => "about", :post_type => "read", :published => true, :published_at => "2012-06-09 21:51:55 UTC", :settings => {"password"=>nil}, :state => "published", :text_filter_id => 5, :title => "about", :type => "Page", :user_id => 1)
Profile.create(:id => 1, :label => "admin", :modules => [:dashboard, :articles, :pages, :media, :feedback, :themes, :sidebar, :users, :settings, :profile, :seo], :nicename => "Typo administrator")
Profile.create(:id => 2, :label => "publisher", :modules => [:dashboard, :articles, :media, :pages, :feedback, :profile], :nicename => "Blog publisher")
Profile.create(:id => 3, :label => "contributor", :modules => [:dashboard, :profile], :nicename => "Contributor")
@@ -42,3 +40,5 @@
TextFilter.create(:description => "SmartyPants", :filters => [:smartypants], :id => 3, :markup => "none", :name => "smartypants", :params => {})
TextFilter.create(:description => "Markdown with SmartyPants", :filters => [:smartypants], :id => 4, :markup => "markdown", :name => "markdown smartypants", :params => {})
TextFilter.create(:description => "Textile", :filters => [], :id => 5, :markup => "textile", :name => "textile", :params => {})
+Article.create(:allow_comments => true, :allow_pings => true, :author => "Mr Typo", :body => "Welcome to Typo. This is your first article. Edit or delete it, then start blogging!", :guid => "1bf3e2ca-ed7b-4562-8a4a-8ce8438822c8", :id => 1, :permalink => "hello-world", :post_type => "read", :published => true, :published_at => "2012-06-09 21:51:55 UTC", :settings => {"password"=>nil}, :state => "published", :text_filter_id => 5, :title => "Hello World!", :type => "Article", :user_id => 1)
+Page.create(: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.", :id => 2, :name => "about", :post_type => "read", :published => true, :published_at => "2012-06-09 21:51:55 UTC", :settings => {"password"=>nil}, :state => "published", :text_filter_id => 5, :title => "about", :type => "Page", :user_id => 1)
@@ -15,8 +15,8 @@
it 'should render the notice and error flash' do
flash[:notice] = 'good update'
- flash[:error] = "it's not good"
- render_flash.split("<br />\n").sort.should == ['<span class="error">it\'s not good</span>','<span class="notice">good update</span>']
+ flash[:error] = "its not good"
+ render_flash.split("<br />\n").sort.should == ['<span class="error">its not good</span>','<span class="notice">good update</span>']
end
end

0 comments on commit c533e73

Please sign in to comment.