Skip to content
Browse files

Migrated to rails 3.1 dummy application

  • Loading branch information...
1 parent 63323b3 commit 93bf0aeef2260aa56f403bb3f8a3bc1741809f4f @pyromaniac pyromaniac committed Jul 28, 2011
Showing with 589,379 additions and 186 deletions.
  1. +10 −6 Gemfile
  2. +131 −110 Gemfile.lock
  3. +20 −0 Guardfile
  4. +2 −2 app/controllers/pages_controller.rb
  5. +0 −1 app/controllers/puffer_pages/pages_controller.rb
  6. +0 −2 autotest/discover.rb
  7. +1 −2 lib/puffer/tree_base.rb
  8. +0 −5 lib/puffer_pages.rb
  9. +0 −4 lib/puffer_pages/engine.rb
  10. +4 −3 lib/puffer_pages/liquid/page_drop.rb
  11. +1 −1 spec/dummy/Rakefile
  12. BIN spec/dummy/app/assets/images/rails.png
  13. +9 −0 spec/dummy/app/assets/javascripts/application.js
  14. +7 −0 spec/dummy/app/assets/stylesheets/application.css
  15. +1 −1 spec/dummy/app/controllers/puffer/dashboard_controller.rb
  16. +1 −1 spec/dummy/app/controllers/puffer/sessions_controller.rb
  17. +3 −3 spec/dummy/app/views/layouts/application.html.erb
  18. +4 −8 spec/dummy/config/application.rb
  19. +43 −0 spec/dummy/config/application.rb.orig
  20. +5 −7 spec/dummy/config/boot.rb
  21. +6 −0 spec/dummy/config/boot.rb.orig
  22. +4 −3 spec/dummy/config/environments/development.rb
  23. +5 −1 spec/dummy/config/environments/pg_test.rb
  24. +14 −12 spec/dummy/config/environments/production.rb
  25. +5 −1 spec/dummy/config/environments/test.rb
  26. +1 −1 spec/dummy/config/initializers/secret_token.rb
  27. +1 −1 spec/dummy/config/initializers/session_store.rb
  28. +12 −0 spec/dummy/config/initializers/wrap_parameters.rb
  29. +1 −1 spec/dummy/config/locales/en.yml
  30. +1 −1 spec/dummy/config/routes.rb
  31. +58 −0 spec/dummy/config/routes.rb.orig
  32. +7 −0 spec/dummy/db/seeds.rb
  33. +5 −0 spec/dummy/public/robots.txt
  34. +7 −0 spec/dummy2/Rakefile
  35. +3 −0 spec/dummy2/app/controllers/admin/layouts_controller.rb
  36. +3 −0 spec/dummy2/app/controllers/admin/pages_controller.rb
  37. +3 −0 spec/dummy2/app/controllers/admin/snippets_controller.rb
  38. +3 −0 spec/dummy2/app/controllers/application_controller.rb
  39. +7 −0 spec/dummy2/app/controllers/puffer/dashboard_controller.rb
  40. +29 −0 spec/dummy2/app/controllers/puffer/sessions_controller.rb
  41. +2 −0 spec/dummy2/app/helpers/application_helper.rb
  42. +14 −0 spec/dummy2/app/views/layouts/application.html.erb
  43. +4 −0 spec/dummy2/config.ru
  44. +45 −0 spec/dummy2/config/application.rb
  45. +10 −0 spec/dummy2/config/boot.rb
  46. +29 −0 spec/dummy2/config/database.yml
  47. +5 −0 spec/dummy2/config/environment.rb
  48. +26 −0 spec/dummy2/config/environments/development.rb
  49. +35 −0 spec/dummy2/config/environments/pg_test.rb
  50. +49 −0 spec/dummy2/config/environments/production.rb
  51. +35 −0 spec/dummy2/config/environments/test.rb
  52. +7 −0 spec/dummy2/config/initializers/backtrace_silencers.rb
  53. +10 −0 spec/dummy2/config/initializers/inflections.rb
  54. +5 −0 spec/dummy2/config/initializers/mime_types.rb
  55. 0 spec/{dummy → dummy2}/config/initializers/puffer.rb
  56. 0 spec/{dummy → dummy2}/config/initializers/puffer_pages.rb
  57. +7 −0 spec/dummy2/config/initializers/secret_token.rb
  58. +8 −0 spec/dummy2/config/initializers/session_store.rb
  59. +5 −0 spec/dummy2/config/locales/en.yml
  60. +72 −0 spec/dummy2/config/routes.rb
  61. BIN spec/dummy2/db/development.sqlite3
  62. +28 −0 spec/dummy2/db/migrate/20090422092419_create_pages.rb
  63. +18 −0 spec/dummy2/db/migrate/20090504132337_create_page_parts.rb
  64. +16 −0 spec/dummy2/db/migrate/20090506102004_create_layouts.rb
  65. +16 −0 spec/dummy2/db/migrate/20090510121824_create_snippets.rb
  66. 0 spec/{dummy → dummy2}/db/schema.rb
  67. BIN spec/dummy2/db/test.sqlite3
  68. +42,098 −0 spec/dummy2/log/development.log
  69. +46,064 −0 spec/dummy2/log/pg_test.log
  70. +135 −0 spec/dummy2/log/production.log
  71. 0 spec/{dummy/public/stylesheets/.gitkeep → dummy2/log/server.log}
  72. +500,114 −0 spec/dummy2/log/test.log
  73. +26 −0 spec/dummy2/public/404.html
  74. +26 −0 spec/dummy2/public/422.html
  75. +26 −0 spec/dummy2/public/500.html
  76. 0 spec/dummy2/public/favicon.ico
  77. 0 spec/{dummy → dummy2}/public/javascripts/application.js
  78. 0 spec/{dummy → dummy2}/public/javascripts/controls.js
  79. 0 spec/{dummy → dummy2}/public/javascripts/dragdrop.js
  80. 0 spec/{dummy → dummy2}/public/javascripts/effects.js
  81. 0 spec/{dummy → dummy2}/public/javascripts/prototype.js
  82. 0 spec/{dummy → dummy2}/public/javascripts/rails.js
  83. 0 spec/{dummy → dummy2}/public/puffer/javascripts/codemirror-base.js
  84. 0 spec/{dummy → dummy2}/public/puffer/javascripts/codemirror-parser.js
  85. 0 spec/{dummy → dummy2}/public/puffer/javascripts/codemirror.js
  86. 0 spec/{dummy → dummy2}/public/puffer/javascripts/puffer.js
  87. 0 spec/{dummy → dummy2}/public/puffer/javascripts/puffer_pages.js
  88. 0 spec/{dummy → dummy2}/public/puffer/javascripts/rails.js
  89. 0 spec/{dummy → dummy2}/public/puffer/javascripts/right-autocompleter.js
  90. 0 spec/{dummy → dummy2}/public/puffer/javascripts/right-calendar.js
  91. 0 spec/{dummy → dummy2}/public/puffer/javascripts/right-dialog.js
  92. 0 spec/{dummy → dummy2}/public/puffer/javascripts/right-tabs.js
  93. 0 spec/{dummy → dummy2}/public/puffer/javascripts/right.js
  94. 0 spec/{dummy → dummy2}/public/puffer/stylesheets/codemirror.css
  95. 0 spec/{dummy → dummy2}/public/puffer/stylesheets/puffer.css
  96. 0 spec/{dummy → dummy2}/public/puffer/stylesheets/puffer_pages.css
  97. 0 spec/{dummy → dummy2}/public/puffer/stylesheets/puffer_tree.css
  98. 0 spec/{dummy → dummy2}/public/puffer/stylesheets/reset.css
  99. 0 spec/dummy2/public/stylesheets/.gitkeep
  100. +6 −0 spec/dummy2/script/rails
  101. +1 −0 spec/fabricators/pages_fabricator.rb
  102. +6 −8 spec/lib/drops_spec.rb
  103. +14 −1 spec/spec_helper.rb
View
16 Gemfile
@@ -1,21 +1,25 @@
source "http://rubygems.org"
-gem 'rails'
+gem 'rails', '>= 3.1.0.rc4'
gem 'liquid', :git => 'git://github.com/puffer/liquid.git'
gem 'nested_set', :git => 'git://github.com/skyeagle/nested_set.git'
-gem 'puffer', '>= 0.0.19'
+gem 'puffer', :git => 'git://github.com/puffer/puffer.git'
group :development, :test, :pg_test do
- gem "capybara", ">= 0.4.0"
gem "sqlite3-ruby", :require => "sqlite3"
gem "pg"
gem "mysql"
gem "rspec-rails"
- gem "autotest"
+ gem "capybara", ">= 0.4.0"
+ gem 'database_cleaner'
+
+ gem 'guard'
+ gem 'libnotify'
+ gem 'guard-rspec'
+
gem 'forgery'
- gem 'fabrication', '0.9.2'
+ gem 'fabrication'
gem "jeweler"
- gem "mongrel"
end
View
241 Gemfile.lock
@@ -1,168 +1,189 @@
GIT
remote: git://github.com/puffer/liquid.git
- revision: 18ddffc9c4be25dadf9ec55dc5664a454ae3d072
+ revision: 3885290fefa0e6f92cfd812455a7cbd8eee9871b
specs:
liquid (2.2.2)
GIT
+ remote: git://github.com/puffer/puffer.git
+ revision: a7407fcc2cb225bf5467e3c56a795a0bc64929f2
+ specs:
+ puffer (0.0.20)
+ apotomo
+ kaminari
+ rails (>= 3.1.0.rc4)
+
+GIT
remote: git://github.com/skyeagle/nested_set.git
- revision: d12b3333902b964a6b09f382a10e903cc4eeb579
+ revision: 71f5f86bd00b393c41b787d59c84e1d485e7e225
specs:
- nested_set (1.6.4)
+ nested_set (1.6.7)
activerecord (>= 3.0.0)
railties (>= 3.0.0)
GEM
remote: http://rubygems.org/
specs:
- ZenTest (4.5.0)
- abstract (1.0.0)
- actionmailer (3.0.5)
- actionpack (= 3.0.5)
- mail (~> 2.2.15)
- actionpack (3.0.5)
- activemodel (= 3.0.5)
- activesupport (= 3.0.5)
- builder (~> 2.1.2)
- erubis (~> 2.6.6)
- i18n (~> 0.4)
- rack (~> 1.2.1)
- rack-mount (~> 0.6.13)
- rack-test (~> 0.5.7)
- tzinfo (~> 0.3.23)
- activemodel (3.0.5)
- activesupport (= 3.0.5)
- builder (~> 2.1.2)
- i18n (~> 0.4)
- activerecord (3.0.5)
- activemodel (= 3.0.5)
- activesupport (= 3.0.5)
- arel (~> 2.0.2)
- tzinfo (~> 0.3.23)
- activeresource (3.0.5)
- activemodel (= 3.0.5)
- activesupport (= 3.0.5)
- activesupport (3.0.5)
- arel (2.0.9)
- autotest (4.4.6)
- ZenTest (>= 4.4.1)
- builder (2.1.2)
- capybara (0.4.1.2)
- celerity (>= 0.7.9)
- culerity (>= 0.2.4)
+ actionmailer (3.1.0.rc5)
+ actionpack (= 3.1.0.rc5)
+ mail (~> 2.3.0)
+ actionpack (3.1.0.rc5)
+ activemodel (= 3.1.0.rc5)
+ activesupport (= 3.1.0.rc5)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ i18n (~> 0.6)
+ rack (~> 1.3.1)
+ rack-cache (~> 1.0.2)
+ rack-mount (~> 0.8.1)
+ rack-test (~> 0.6.0)
+ sprockets (~> 2.0.0.beta.12)
+ activemodel (3.1.0.rc5)
+ activesupport (= 3.1.0.rc5)
+ bcrypt-ruby (~> 2.1.4)
+ builder (~> 3.0.0)
+ i18n (~> 0.6)
+ activerecord (3.1.0.rc5)
+ activemodel (= 3.1.0.rc5)
+ activesupport (= 3.1.0.rc5)
+ arel (~> 2.1.4)
+ tzinfo (~> 0.3.29)
+ activeresource (3.1.0.rc5)
+ activemodel (= 3.1.0.rc5)
+ activesupport (= 3.1.0.rc5)
+ activesupport (3.1.0.rc5)
+ multi_json (~> 1.0)
+ apotomo (1.1.2)
+ cells (>= 3.5.6)
+ hooks (~> 0.1.3)
+ onfire (~> 0.2.0)
+ arel (2.1.4)
+ bcrypt-ruby (2.1.4)
+ builder (3.0.0)
+ capybara (1.0.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
- selenium-webdriver (>= 0.0.27)
- xpath (~> 0.1.3)
- celerity (0.8.8)
- cells (3.4.4)
- cgi_multipart_eof_fix (2.5.0)
- childprocess (0.1.7)
- ffi (~> 0.6.3)
- culerity (0.2.15)
- daemons (1.1.0)
+ selenium-webdriver (~> 0.2.0)
+ xpath (~> 0.1.4)
+ cells (3.6.4)
+ actionpack (~> 3.0)
+ railties (~> 3.0)
+ childprocess (0.2.0)
+ ffi (~> 1.0.6)
+ database_cleaner (0.6.7)
diff-lcs (1.1.2)
- erubis (2.6.6)
- abstract (>= 1.0.0)
- fabrication (0.9.2)
- fastthread (1.0.7)
- ffi (0.6.3)
- rake (>= 0.8.7)
- forgery (0.3.7)
+ erubis (2.7.0)
+ fabrication (1.0.1)
+ ffi (1.0.9)
+ forgery (0.3.12)
nokogiri (~> 1.4)
- gem_plugin (0.2.3)
git (1.2.5)
- i18n (0.5.0)
- jeweler (1.5.2)
- bundler (~> 1.0.0)
+ guard (0.5.1)
+ thor (~> 0.14.6)
+ guard-rspec (0.4.0)
+ guard (>= 0.4.0)
+ hike (1.2.0)
+ hooks (0.1.4)
+ i18n (0.6.0)
+ jeweler (1.6.4)
+ bundler (~> 1.0)
git (>= 1.2.5)
rake
- json_pure (1.5.1)
- mail (2.2.15)
- activesupport (>= 2.3.6)
+ json_pure (1.5.3)
+ kaminari (0.12.4)
+ rails (>= 3.0.0)
+ libnotify (0.5.7)
+ mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
- mongrel (1.1.5)
- cgi_multipart_eof_fix (>= 2.4)
- daemons (>= 1.0.3)
- fastthread (>= 1.0.1)
- gem_plugin (>= 0.2.3)
+ multi_json (1.0.3)
mysql (2.8.1)
- nokogiri (1.4.4)
- pg (0.10.1)
- polyglot (0.3.1)
- puffer (0.0.19)
- cells (~> 3.4.4)
- rails (~> 3.0.4)
- will_paginate (~> 3.0.pre2)
- rack (1.2.1)
- rack-mount (0.6.13)
+ nokogiri (1.5.0)
+ onfire (0.2.0)
+ pg (0.11.0)
+ polyglot (0.3.2)
+ rack (1.3.2)
+ rack-cache (1.0.2)
+ rack (>= 0.4)
+ rack-mount (0.8.1)
rack (>= 1.0.0)
- rack-test (0.5.7)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.0)
rack (>= 1.0)
- rails (3.0.5)
- actionmailer (= 3.0.5)
- actionpack (= 3.0.5)
- activerecord (= 3.0.5)
- activeresource (= 3.0.5)
- activesupport (= 3.0.5)
+ rails (3.1.0.rc5)
+ actionmailer (= 3.1.0.rc5)
+ actionpack (= 3.1.0.rc5)
+ activerecord (= 3.1.0.rc5)
+ activeresource (= 3.1.0.rc5)
+ activesupport (= 3.1.0.rc5)
bundler (~> 1.0)
- railties (= 3.0.5)
- railties (3.0.5)
- actionpack (= 3.0.5)
- activesupport (= 3.0.5)
+ railties (= 3.1.0.rc5)
+ railties (3.1.0.rc5)
+ actionpack (= 3.1.0.rc5)
+ activesupport (= 3.1.0.rc5)
+ rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
- thor (~> 0.14.4)
- rake (0.8.7)
- rspec (2.5.0)
- rspec-core (~> 2.5.0)
- rspec-expectations (~> 2.5.0)
- rspec-mocks (~> 2.5.0)
- rspec-core (2.5.1)
- rspec-expectations (2.5.0)
+ rdoc (~> 3.4)
+ thor (~> 0.14.6)
+ rake (0.9.2)
+ rdoc (3.8)
+ rspec (2.6.0)
+ rspec-core (~> 2.6.0)
+ rspec-expectations (~> 2.6.0)
+ rspec-mocks (~> 2.6.0)
+ rspec-core (2.6.4)
+ rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
- rspec-mocks (2.5.0)
- rspec-rails (2.5.0)
+ rspec-mocks (2.6.0)
+ rspec-rails (2.6.1)
actionpack (~> 3.0)
activesupport (~> 3.0)
railties (~> 3.0)
- rspec (~> 2.5.0)
+ rspec (~> 2.6.0)
rubyzip (0.9.4)
- selenium-webdriver (0.1.3)
- childprocess (~> 0.1.5)
- ffi (~> 0.6.3)
+ selenium-webdriver (0.2.2)
+ childprocess (>= 0.1.9)
+ ffi (>= 1.0.7)
json_pure
rubyzip
- sqlite3 (1.3.3)
+ sprockets (2.0.0.beta.12)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ sqlite3 (1.3.4)
sqlite3-ruby (1.3.3)
sqlite3 (>= 1.3.3)
thor (0.14.6)
- treetop (1.4.9)
+ tilt (1.3.2)
+ treetop (1.4.10)
+ polyglot
polyglot (>= 0.3.1)
- tzinfo (0.3.24)
- will_paginate (3.0.pre2)
- xpath (0.1.3)
+ tzinfo (0.3.29)
+ xpath (0.1.4)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
- autotest
capybara (>= 0.4.0)
- fabrication (= 0.9.2)
+ database_cleaner
+ fabrication
forgery
+ guard
+ guard-rspec
jeweler
+ libnotify
liquid!
- mongrel
mysql
nested_set!
pg
- puffer (>= 0.0.19)
- rails
+ puffer!
+ rails (>= 3.1.0.rc4)
rspec-rails
sqlite3-ruby
View
20 Guardfile
@@ -0,0 +1,20 @@
+# A sample Guardfile
+# More info at https://github.com/guard/guard#readme
+
+guard 'rspec', :version => 2 do
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch('spec/spec_helper.rb') { "spec" }
+
+ # Rails example
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
+ watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
+ watch('spec/spec_helper.rb') { "spec" }
+ watch('config/routes.rb') { "spec/routing" }
+ watch('app/controllers/application_controller.rb') { "spec/controllers" }
+ # Capybara request specs
+ watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
+end
View
4 app/controllers/pages_controller.rb
@@ -9,8 +9,8 @@ def index
def drops
{
- :self => PufferPages::Liquid::PageDrop.new(@page, @page, request),
- :root => PufferPages::Liquid::PageDrop.new(@page.root, @page, request)
+ :self => PufferPages::Liquid::PageDrop.new(@page, @page, self),
+ :root => PufferPages::Liquid::PageDrop.new(@page.root, @page, self)
}.stringify_keys
end
View
1 app/controllers/puffer_pages/pages_controller.rb
@@ -1,7 +1,6 @@
class PufferPages::PagesController < Puffer::TreeBase
unloadable
- view_paths_fallbacks_prepend :puffer_pages
helper :puffer_pages
setup do
View
2 autotest/discover.rb
@@ -1,2 +0,0 @@
-Autotest.add_discovery { "rails" }
-Autotest.add_discovery { "rspec2" }
View
3 lib/puffer/tree_base.rb
@@ -2,12 +2,11 @@ module Puffer
class TreeBase < Puffer::Base
unloadable
- view_paths_fallbacks_prepend :puffer_tree
helper :puffer_tree
define_fields :tree
- def self.tree_fields
+ def self.tree_fi elds
_tree_fields.presence || index_fields
end
View
5 lib/puffer_pages.rb
@@ -22,8 +22,3 @@ def self.setup
#require 'puffer_pages/liquid/tags/yield'
require 'puffer_pages/liquid/tags/stylesheets'
require 'puffer_pages/liquid/tags/javascripts'
-
-Puffer.setup do |config|
- config.javascripts += %w(right-dialog right-tabs codemirror puffer_pages)
- config.stylesheets += %w(puffer_pages puffer_tree)
-end
View
4 lib/puffer_pages/engine.rb
@@ -2,10 +2,6 @@ module PufferPages
class Engine < Rails::Engine
config.autoload_paths << File.join(root, 'lib')
- initializer 'puffer_pages.add_cells_paths', :after => :add_view_paths do
- ::Cell::Base.prepend_view_path(Cells::DEFAULT_VIEW_PATHS.map { |path| File.join(root, path) })
- end
-
initializer 'puffer_pages.add_puffer_pages_route', :after => :add_builtin_route do |app|
app.routes_reloader.paths << File.join(root, 'config/puffer_routes.rb')
end
View
7 lib/puffer_pages/liquid/page_drop.rb
@@ -8,8 +8,8 @@ class PageDrop < ::Liquid::Drop
delegate *(Page.statuses.map {|s| "#{s}?"} << {:to => :page})
delegate :name, :title, :description, :keywords, :created_at, :updated_at, :to => :page
- def initialize page, current_page = nil, request = nil
- @page, @current_page, @request = page, current_page, request
+ def initialize page, current_page = nil, controller = nil
+ @page, @current_page, @controller = page, current_page, controller
end
%w(parent root).each do |attribute|
@@ -50,7 +50,8 @@ def before_method method
private
- attr_reader :page, :request, :current_page
+ attr_reader :page, :current_page, :controller
+ delegate :env, :request, :to => :controller, :allow_nil => true
end
end
View
2 spec/dummy/Rakefile
@@ -1,7 +1,7 @@
+#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
-require 'rake'
Dummy::Application.load_tasks
View
BIN spec/dummy/app/assets/images/rails.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
9 spec/dummy/app/assets/javascripts/application.js
@@ -0,0 +1,9 @@
+// This is a manifest file that'll be compiled into including all the files listed below.
+// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
+// be included in the compiled file accessible from http://example.com/assets/application.js
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+//= require jquery
+//= require jquery_ujs
+//= require_tree .
View
7 spec/dummy/app/assets/stylesheets/application.css
@@ -0,0 +1,7 @@
+/*
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
+ *= require_self
+ *= require_tree .
+*/
View
2 spec/dummy/app/controllers/puffer/dashboard_controller.rb
@@ -1,4 +1,4 @@
-class Puffer::DashboardController < Puffer::DashboardBase
+class Puffer::DashboardController < Puffer::Dashboard
def index
p Rails.application.routes.puffer
View
2 spec/dummy/app/controllers/puffer/sessions_controller.rb
@@ -1,4 +1,4 @@
-class Puffer::SessionsController < Puffer::SessionsBase
+class Puffer::SessionsController < Puffer::Sessions
# This is example session controller for puffer authentication.
# You can define your own actions.
# Also, you can redefine <tt>new<tt> action view as you wish,
View
6 spec/dummy/app/views/layouts/application.html.erb
@@ -2,9 +2,9 @@
<html>
<head>
<title>Dummy</title>
- <%= stylesheet_link_tag :all %>
- <%= javascript_include_tag :defaults %>
- <%= csrf_meta_tag %>
+ <%= stylesheet_link_tag "application" %>
+ <%= javascript_include_tag "application" %>
+ <%= csrf_meta_tags %>
</head>
<body>
View
12 spec/dummy/config/application.rb
@@ -1,10 +1,6 @@
require File.expand_path('../boot', __FILE__)
-require "active_model/railtie"
-require "active_record/railtie"
-require "action_controller/railtie"
-require "action_view/railtie"
-require "action_mailer/railtie"
+require 'rails/all'
Bundler.require
require "puffer_pages"
@@ -33,13 +29,13 @@ class Application < Rails::Application
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
- # JavaScript files you want as :defaults (application.js is always included).
- # config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
-
# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"
# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]
+
+ # Enable the asset pipeline
+ config.assets.enabled = true
end
end
View
43 spec/dummy/config/application.rb.orig
@@ -0,0 +1,43 @@
+require File.expand_path('../boot', __FILE__)
+
+require 'rails/all'
+
+# If you have a Gemfile, require the default gems, the ones in the
+# current environment and also include :assets gems if in development
+# or test environments.
+Bundler.require *Rails.groups(:assets) if defined?(Bundler)
+
+module Dummy
+ class Application < Rails::Application
+ # Settings in config/environments/* take precedence over those specified here.
+ # Application configuration should go into files in config/initializers
+ # -- all .rb files in that directory are automatically loaded.
+
+ # Custom directories with classes and modules you want to be autoloadable.
+ # config.autoload_paths += %W(#{config.root}/extras)
+
+ # Only load the plugins named here, in the order given (default is alphabetical).
+ # :all can be used as a placeholder for all plugins not explicitly named.
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
+
+ # Activate observers that should always be running.
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
+
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
+ # config.time_zone = 'Central Time (US & Canada)'
+
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
+ # config.i18n.default_locale = :de
+
+ # Configure the default encoding used in templates for Ruby 1.9.
+ config.encoding = "utf-8"
+
+ # Configure sensitive parameters which will be filtered from the log file.
+ config.filter_parameters += [:password]
+
+ # Enable the asset pipeline
+ config.assets.enabled = true
+ end
+end
View
12 spec/dummy/config/boot.rb
@@ -1,10 +1,8 @@
require 'rubygems'
-gemfile = File.expand_path('../../../../Gemfile', __FILE__)
-if File.exist?(gemfile)
- ENV['BUNDLE_GEMFILE'] = gemfile
- require 'bundler'
- Bundler.setup
-end
+# Set up gems listed in the Gemfile.
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
-$:.unshift File.expand_path('../../../../lib', __FILE__)
+require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
+
+$:.unshift File.expand_path('../../../../lib', __FILE__)
View
6 spec/dummy/config/boot.rb.orig
@@ -0,0 +1,6 @@
+require 'rubygems'
+
+# Set up gems listed in the Gemfile.
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
+
+require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
View
7 spec/dummy/config/environments/development.rb
@@ -3,15 +3,14 @@
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
- # since you don't have to restart the webserver when you make code changes.
+ # since you don't have to restart the web server when you make code changes.
config.cache_classes = false
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
# Show full error reports and disable caching
config.consider_all_requests_local = true
- config.action_view.debug_rjs = true
config.action_controller.perform_caching = false
# Don't care if the mailer can't send
@@ -22,5 +21,7 @@
# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin
-end
+ # Do not compress assets
+ config.assets.compress = false
+end
View
6 spec/dummy/config/environments/pg_test.rb
@@ -7,7 +7,11 @@
# and recreated between test runs. Don't rely on the data there!
config.cache_classes = true
- # Log error messages when you accidentally call methods on nil.
+ # Configure static asset server for tests with Cache-Control for performance
+ config.serve_static_assets = true
+ config.static_cache_control = "public, max-age=3600"
+
+ # Log error messages when you accidentally call methods on nil
config.whiny_nils = true
# Show full error reports and disable caching
View
26 spec/dummy/config/environments/production.rb
@@ -1,22 +1,25 @@
Dummy::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
- # The production environment is meant for finished, "live" apps.
# Code is not reloaded between requests
config.cache_classes = true
# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
- # Specifies the header that your server uses for sending files
- config.action_dispatch.x_sendfile_header = "X-Sendfile"
+ # Disable Rails's static asset server (Apache or nginx will already do this)
+ config.serve_static_assets = false
- # For nginx:
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
+ # Compress JavaScripts and CSS
+ config.assets.compress = true
+
+ # Specifies the header that your server uses for sending files
+ # (comment out if your front-end server doesn't support this)
+ config.action_dispatch.x_sendfile_header = "X-Sendfile" # Use 'X-Accel-Redirect' for nginx
- # If you have no front-end server that supports something like X-Sendfile,
- # just comment this out and Rails will serve the files
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
+ # config.force_ssl = true
# See everything in the log (default is :info)
# config.log_level = :debug
@@ -27,13 +30,12 @@
# Use a different cache store in production
# config.cache_store = :mem_cache_store
- # Disable Rails's static asset server
- # In production, Apache or nginx will already do this
- config.serve_static_assets = false
-
- # Enable serving of images, stylesheets, and javascripts from an asset server
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
+ # config.assets.precompile += %w( search.js )
+
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
View
6 spec/dummy/config/environments/test.rb
@@ -7,7 +7,11 @@
# and recreated between test runs. Don't rely on the data there!
config.cache_classes = true
- # Log error messages when you accidentally call methods on nil.
+ # Configure static asset server for tests with Cache-Control for performance
+ config.serve_static_assets = true
+ config.static_cache_control = "public, max-age=3600"
+
+ # Log error messages when you accidentally call methods on nil
config.whiny_nils = true
# Show full error reports and disable caching
View
2 spec/dummy/config/initializers/secret_token.rb
@@ -4,4 +4,4 @@
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
-Dummy::Application.config.secret_token = '37eb6cd82442a27f551ca58761187a19cda1f2a0d467036e9eef5ec970675d0d66750344db7367031d3500a5bdf997f6562812ea52aac96f76951f47eaf0e9da'
+Dummy::Application.config.secret_token = '41d9a6d7e86b4e67cecf3f216e3e7acd3ca080b1cebf7fa467f351241dfe51686208dff2079101d3b4f83d1a954c17e874da814be144d0ff7539621b74c2cdb1'
View
2 spec/dummy/config/initializers/session_store.rb
@@ -1,6 +1,6 @@
# Be sure to restart your server when you modify this file.
-Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session'
+Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
View
12 spec/dummy/config/initializers/wrap_parameters.rb
@@ -0,0 +1,12 @@
+# Be sure to restart your server when you modify this file.
+#
+# This file contains settings for ActionController::ParamsWrapper which
+# is enabled by default.
+
+# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
+ActionController::Base.wrap_parameters format: [:json]
+
+# Disable root element in JSON by default.
+if defined?(ActiveRecord)
+ ActiveRecord::Base.include_root_in_json = false
+end
View
2 spec/dummy/config/locales/en.yml
@@ -1,5 +1,5 @@
# Sample localization file for English. Add more files in this directory for other locales.
-# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
en:
hello: "Hello world"
View
2 spec/dummy/config/routes.rb
@@ -62,7 +62,7 @@
# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
- # root :to => "welcome#index"
+ # root :to => 'welcome#index'
# See how all your routes lay out with "rake routes"
View
58 spec/dummy/config/routes.rb.orig
@@ -0,0 +1,58 @@
+Dummy::Application.routes.draw do
+ # The priority is based upon order of creation:
+ # first created -> highest priority.
+
+ # Sample of regular route:
+ # match 'products/:id' => 'catalog#view'
+ # Keep in mind you can assign values other than :controller and :action
+
+ # Sample of named route:
+ # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
+ # This route can be invoked with purchase_url(:id => product.id)
+
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
+ # resources :products
+
+ # Sample resource route with options:
+ # resources :products do
+ # member do
+ # get 'short'
+ # post 'toggle'
+ # end
+ #
+ # collection do
+ # get 'sold'
+ # end
+ # end
+
+ # Sample resource route with sub-resources:
+ # resources :products do
+ # resources :comments, :sales
+ # resource :seller
+ # end
+
+ # Sample resource route with more complex sub-resources
+ # resources :products do
+ # resources :comments
+ # resources :sales do
+ # get 'recent', :on => :collection
+ # end
+ # end
+
+ # Sample resource route within a namespace:
+ # namespace :admin do
+ # # Directs /admin/products/* to Admin::ProductsController
+ # # (app/controllers/admin/products_controller.rb)
+ # resources :products
+ # end
+
+ # You can have the root of your site routed with "root"
+ # just remember to delete public/index.html.
+ # root :to => 'welcome#index'
+
+ # See how all your routes lay out with "rake routes"
+
+ # This is a legacy wild controller route that's not recommended for RESTful applications.
+ # Note: This route will make all actions in every controller accessible via GET requests.
+ # match ':controller(/:action(/:id(.:format)))'
+end
View
7 spec/dummy/db/seeds.rb
@@ -0,0 +1,7 @@
+# This file should contain all the record creation needed to seed the database with its default values.
+# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
+#
+# Examples:
+#
+# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
+# Mayor.create(name: 'Emanuel', city: cities.first)
View
5 spec/dummy/public/robots.txt
@@ -0,0 +1,5 @@
+# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
+#
+# To ban all spiders from the entire site uncomment the next two lines:
+# User-Agent: *
+# Disallow: /
View
7 spec/dummy2/Rakefile
@@ -0,0 +1,7 @@
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+require 'rake'
+
+Dummy::Application.load_tasks
View
3 spec/dummy2/app/controllers/admin/layouts_controller.rb
@@ -0,0 +1,3 @@
+class Admin::LayoutsController < PufferPages::LayoutsController
+
+end
View
3 spec/dummy2/app/controllers/admin/pages_controller.rb
@@ -0,0 +1,3 @@
+class Admin::PagesController < PufferPages::PagesController
+
+end
View
3 spec/dummy2/app/controllers/admin/snippets_controller.rb
@@ -0,0 +1,3 @@
+class Admin::SnippetsController < PufferPages::SnippetsController
+
+end
View
3 spec/dummy2/app/controllers/application_controller.rb
@@ -0,0 +1,3 @@
+class ApplicationController < ActionController::Base
+ protect_from_forgery
+end
View
7 spec/dummy2/app/controllers/puffer/dashboard_controller.rb
@@ -0,0 +1,7 @@
+class Puffer::DashboardController < Puffer::DashboardBase
+
+ def index
+ p Rails.application.routes.puffer
+ end
+
+end
View
29 spec/dummy2/app/controllers/puffer/sessions_controller.rb
@@ -0,0 +1,29 @@
+class Puffer::SessionsController < Puffer::SessionsBase
+ # This is example session controller for puffer authentication.
+ # You can define your own actions.
+ # Also, you can redefine <tt>new<tt> action view as you wish,
+ # but more effectively will be definig fields with standart
+ # puffer DSL:
+ # create do
+ # field :login
+ # field :password
+ # field :remember_me
+ # end
+ #
+ # By default defined <tt>email<tt> and <tt>password<tt> fields.
+
+ def new
+ # @record = UserSession.new
+ end
+
+ def create
+ # @record = UserSession.new params[:user_session]
+ # respond_with record, :location => puffer_root_url
+ end
+
+ def destroy
+ # @record = UserSession.find
+ # @record.destroy
+ end
+
+end
View
2 spec/dummy2/app/helpers/application_helper.rb
@@ -0,0 +1,2 @@
+module ApplicationHelper
+end
View
14 spec/dummy2/app/views/layouts/application.html.erb
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Dummy</title>
+ <%= stylesheet_link_tag :all %>
+ <%= javascript_include_tag :defaults %>
+ <%= csrf_meta_tag %>
+</head>
+<body>
+
+<%= yield %>
+
+</body>
+</html>
View
4 spec/dummy2/config.ru
@@ -0,0 +1,4 @@
+# This file is used by Rack-based servers to start the application.
+
+require ::File.expand_path('../config/environment', __FILE__)
+run Dummy::Application
View
45 spec/dummy2/config/application.rb
@@ -0,0 +1,45 @@
+require File.expand_path('../boot', __FILE__)
+
+require "active_model/railtie"
+require "active_record/railtie"
+require "action_controller/railtie"
+require "action_view/railtie"
+require "action_mailer/railtie"
+
+Bundler.require
+require "puffer_pages"
+
+module Dummy
+ class Application < Rails::Application
+ # Settings in config/environments/* take precedence over those specified here.
+ # Application configuration should go into files in config/initializers
+ # -- all .rb files in that directory are automatically loaded.
+
+ # Custom directories with classes and modules you want to be autoloadable.
+ # config.autoload_paths += %W(#{config.root}/extras)
+
+ # Only load the plugins named here, in the order given (default is alphabetical).
+ # :all can be used as a placeholder for all plugins not explicitly named.
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
+
+ # Activate observers that should always be running.
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
+
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
+ # config.time_zone = 'Central Time (US & Canada)'
+
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
+ # config.i18n.default_locale = :de
+
+ # JavaScript files you want as :defaults (application.js is always included).
+ # config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
+
+ # Configure the default encoding used in templates for Ruby 1.9.
+ config.encoding = "utf-8"
+
+ # Configure sensitive parameters which will be filtered from the log file.
+ config.filter_parameters += [:password]
+ end
+end
View
10 spec/dummy2/config/boot.rb
@@ -0,0 +1,10 @@
+require 'rubygems'
+gemfile = File.expand_path('../../../../Gemfile', __FILE__)
+
+if File.exist?(gemfile)
+ ENV['BUNDLE_GEMFILE'] = gemfile
+ require 'bundler'
+ Bundler.setup
+end
+
+$:.unshift File.expand_path('../../../../lib', __FILE__)
View
29 spec/dummy2/config/database.yml
@@ -0,0 +1,29 @@
+# SQLite version 3.x
+# gem install sqlite3-ruby (not necessary on OS X Leopard)
+development:
+ adapter: sqlite3
+ database: db/development.sqlite3
+ pool: 5
+ timeout: 5000
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test:
+ adapter: sqlite3
+ database: db/test.sqlite3
+ pool: 5
+ timeout: 5000
+
+pg_test:
+ adapter: postgresql
+ hostname: localhost
+ database: puffer_pages
+ schema_search_path: public
+ encoding: utf8
+
+production:
+ adapter: sqlite3
+ database: db/development.sqlite3
+ pool: 5
+ timeout: 5000
View
5 spec/dummy2/config/environment.rb
@@ -0,0 +1,5 @@
+# Load the rails application
+require File.expand_path('../application', __FILE__)
+
+# Initialize the rails application
+Dummy::Application.initialize!
View
26 spec/dummy2/config/environments/development.rb
@@ -0,0 +1,26 @@
+Dummy::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb
+
+ # In the development environment your application's code is reloaded on
+ # every request. This slows down response time but is perfect for development
+ # since you don't have to restart the webserver when you make code changes.
+ config.cache_classes = false
+
+ # Log error messages when you accidentally call methods on nil.
+ config.whiny_nils = true
+
+ # Show full error reports and disable caching
+ config.consider_all_requests_local = true
+ config.action_view.debug_rjs = true
+ config.action_controller.perform_caching = false
+
+ # Don't care if the mailer can't send
+ config.action_mailer.raise_delivery_errors = false
+
+ # Print deprecation notices to the Rails logger
+ config.active_support.deprecation = :log
+
+ # Only use best-standards-support built into browsers
+ config.action_dispatch.best_standards_support = :builtin
+end
+
View
35 spec/dummy2/config/environments/pg_test.rb
@@ -0,0 +1,35 @@
+Dummy::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb
+
+ # The test environment is used exclusively to run your application's
+ # test suite. You never need to work with it otherwise. Remember that
+ # your test database is "scratch space" for the test suite and is wiped
+ # and recreated between test runs. Don't rely on the data there!
+ config.cache_classes = true
+
+ # Log error messages when you accidentally call methods on nil.
+ config.whiny_nils = true
+
+ # Show full error reports and disable caching
+ config.consider_all_requests_local = true
+ config.action_controller.perform_caching = false
+
+ # Raise exceptions instead of rendering exception templates
+ config.action_dispatch.show_exceptions = false
+
+ # Disable request forgery protection in test environment
+ config.action_controller.allow_forgery_protection = false
+
+ # Tell Action Mailer not to deliver emails to the real world.
+ # The :test delivery method accumulates sent emails in the
+ # ActionMailer::Base.deliveries array.
+ config.action_mailer.delivery_method = :test
+
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
+ # like if you have constraints or database-specific column types
+ # config.active_record.schema_format = :sql
+
+ # Print deprecation notices to the stderr
+ config.active_support.deprecation = :stderr
+end
View
49 spec/dummy2/config/environments/production.rb
@@ -0,0 +1,49 @@
+Dummy::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb
+
+ # The production environment is meant for finished, "live" apps.
+ # Code is not reloaded between requests
+ config.cache_classes = true
+
+ # Full error reports are disabled and caching is turned on
+ config.consider_all_requests_local = false
+ config.action_controller.perform_caching = true
+
+ # Specifies the header that your server uses for sending files
+ config.action_dispatch.x_sendfile_header = "X-Sendfile"
+
+ # For nginx:
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
+
+ # If you have no front-end server that supports something like X-Sendfile,
+ # just comment this out and Rails will serve the files
+
+ # See everything in the log (default is :info)
+ # config.log_level = :debug
+
+ # Use a different logger for distributed setups
+ # config.logger = SyslogLogger.new
+
+ # Use a different cache store in production
+ # config.cache_store = :mem_cache_store
+
+ # Disable Rails's static asset server
+ # In production, Apache or nginx will already do this
+ config.serve_static_assets = false
+
+ # Enable serving of images, stylesheets, and javascripts from an asset server
+ # config.action_controller.asset_host = "http://assets.example.com"
+
+ # Disable delivery errors, bad email addresses will be ignored
+ # config.action_mailer.raise_delivery_errors = false
+
+ # Enable threaded mode
+ # config.threadsafe!
+
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
+ # the I18n.default_locale when a translation can not be found)
+ config.i18n.fallbacks = true
+
+ # Send deprecation notices to registered listeners
+ config.active_support.deprecation = :notify
+end
View
35 spec/dummy2/config/environments/test.rb
@@ -0,0 +1,35 @@
+Dummy::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb
+
+ # The test environment is used exclusively to run your application's
+ # test suite. You never need to work with it otherwise. Remember that
+ # your test database is "scratch space" for the test suite and is wiped
+ # and recreated between test runs. Don't rely on the data there!
+ config.cache_classes = true
+
+ # Log error messages when you accidentally call methods on nil.
+ config.whiny_nils = true
+
+ # Show full error reports and disable caching
+ config.consider_all_requests_local = true
+ config.action_controller.perform_caching = false
+
+ # Raise exceptions instead of rendering exception templates
+ config.action_dispatch.show_exceptions = false
+
+ # Disable request forgery protection in test environment
+ config.action_controller.allow_forgery_protection = false
+
+ # Tell Action Mailer not to deliver emails to the real world.
+ # The :test delivery method accumulates sent emails in the
+ # ActionMailer::Base.deliveries array.
+ config.action_mailer.delivery_method = :test
+
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
+ # like if you have constraints or database-specific column types
+ # config.active_record.schema_format = :sql
+
+ # Print deprecation notices to the stderr
+ config.active_support.deprecation = :stderr
+end
View
7 spec/dummy2/config/initializers/backtrace_silencers.rb
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
+# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
+
+# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
+# Rails.backtrace_cleaner.remove_silencers!
View
10 spec/dummy2/config/initializers/inflections.rb
@@ -0,0 +1,10 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new inflection rules using the following format
+# (all these examples are active by default):
+# ActiveSupport::Inflector.inflections do |inflect|
+# inflect.plural /^(ox)$/i, '\1en'
+# inflect.singular /^(ox)en/i, '\1'
+# inflect.irregular 'person', 'people'
+# inflect.uncountable %w( fish sheep )
+# end
View
5 spec/dummy2/config/initializers/mime_types.rb
@@ -0,0 +1,5 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new mime types for use in respond_to blocks:
+# Mime::Type.register "text/richtext", :rtf
+# Mime::Type.register_alias "text/html", :iphone
View
0 spec/dummy/config/initializers/puffer.rb → spec/dummy2/config/initializers/puffer.rb
File renamed without changes.
View
0 ...dummy/config/initializers/puffer_pages.rb → ...ummy2/config/initializers/puffer_pages.rb
File renamed without changes.
View
7 spec/dummy2/config/initializers/secret_token.rb
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# Your secret key for verifying the integrity of signed cookies.
+# If you change this key, all old signed cookies will become invalid!
+# Make sure the secret is at least 30 characters and all random,
+# no regular words or you'll be exposed to dictionary attacks.
+Dummy::Application.config.secret_token = '37eb6cd82442a27f551ca58761187a19cda1f2a0d467036e9eef5ec970675d0d66750344db7367031d3500a5bdf997f6562812ea52aac96f76951f47eaf0e9da'
View
8 spec/dummy2/config/initializers/session_store.rb
@@ -0,0 +1,8 @@
+# Be sure to restart your server when you modify this file.
+
+Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session'
+
+# Use the database for sessions instead of the cookie-based default,
+# which shouldn't be used to store highly confidential information
+# (create the session table with "rails generate session_migration")
+# Dummy::Application.config.session_store :active_record_store
View
5 spec/dummy2/config/locales/en.yml
@@ -0,0 +1,5 @@
+# Sample localization file for English. Add more files in this directory for other locales.
+# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+en:
+ hello: "Hello world"
View
72 spec/dummy2/config/routes.rb
@@ -0,0 +1,72 @@
+Dummy::Application.routes.draw do
+
+ namespace :puffer do
+ root :to => 'dashboard#index'
+ resource :session
+ end
+
+ namespace :admin do
+ resources :pages
+ resources :layouts
+ resources :snippets
+ end
+
+ match '/admin' => 'puffer/dashboard#index', :as => :admin
+
+ # The priority is based upon order of creation:
+ # first created -> highest priority.
+
+ # Sample of regular route:
+ # match 'products/:id' => 'catalog#view'
+ # Keep in mind you can assign values other than :controller and :action
+
+ # Sample of named route:
+ # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
+ # This route can be invoked with purchase_url(:id => product.id)
+
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
+ # resources :products
+
+ # Sample resource route with options:
+ # resources :products do
+ # member do
+ # get 'short'
+ # post 'toggle'
+ # end
+ #
+ # collection do
+ # get 'sold'
+ # end
+ # end
+
+ # Sample resource route with sub-resources:
+ # resources :products do
+ # resources :comments, :sales
+ # resource :seller
+ # end
+
+ # Sample resource route with more complex sub-resources
+ # resources :products do
+ # resources :comments
+ # resources :sales do
+ # get 'recent', :on => :collection
+ # end
+ # end
+
+ # Sample resource route within a namespace:
+ # namespace :admin do
+ # # Directs /admin/products/* to Admin::ProductsController
+ # # (app/controllers/admin/products_controller.rb)
+ # resources :products
+ # end
+
+ # You can have the root of your site routed with "root"
+ # just remember to delete public/index.html.
+ # root :to => "welcome#index"
+
+ # See how all your routes lay out with "rake routes"
+
+ # This is a legacy wild controller route that's not recommended for RESTful applications.
+ # Note: This route will make all actions in every controller accessible via GET requests.
+ # match ':controller(/:action(/:id(.:format)))'
+end
View
BIN spec/dummy2/db/development.sqlite3
Binary file not shown.
View
28 spec/dummy2/db/migrate/20090422092419_create_pages.rb
@@ -0,0 +1,28 @@
+class CreatePages < ActiveRecord::Migration
+ def self.up
+ create_table :pages do |t|
+ t.string :name
+ t.string :slug
+ t.string :location
+ t.text :title
+ t.text :description
+ t.text :keywords
+ t.string :layout_name
+ t.string :status
+
+ t.integer :parent_id
+ t.integer :lft
+ t.integer :rgt
+ t.integer :depth, :default => 0
+
+ t.timestamps
+ end
+
+ add_index :pages, :slug
+ add_index :pages, :location
+ end
+
+ def self.down
+ drop_table :pages
+ end
+end
View
18 spec/dummy2/db/migrate/20090504132337_create_page_parts.rb
@@ -0,0 +1,18 @@
+class CreatePageParts < ActiveRecord::Migration
+ def self.up
+ create_table :page_parts do |t|
+ t.string :name
+ t.text :body
+ t.integer :page_id
+
+ t.timestamps
+ end
+
+ add_index :page_parts, :name
+ add_index :page_parts, :page_id
+ end
+
+ def self.down
+ drop_table :page_parts
+ end
+end
View
16 spec/dummy2/db/migrate/20090506102004_create_layouts.rb
@@ -0,0 +1,16 @@
+class CreateLayouts < ActiveRecord::Migration
+ def self.up
+ create_table :layouts do |t|
+ t.string :name
+ t.text :body
+
+ t.timestamps
+ end
+
+ add_index :layouts, :name
+ end
+
+ def self.down
+ drop_table :layouts
+ end
+end
View
16 spec/dummy2/db/migrate/20090510121824_create_snippets.rb
@@ -0,0 +1,16 @@
+class CreateSnippets < ActiveRecord::Migration
+ def self.up
+ create_table :snippets do |t|
+ t.string :name
+ t.text :body
+
+ t.timestamps
+ end
+
+ add_index :snippets, :name
+ end
+
+ def self.down
+ drop_table :snippets
+ end
+end
View
0 spec/dummy/db/schema.rb → spec/dummy2/db/schema.rb
File renamed without changes.
View
BIN spec/dummy2/db/test.sqlite3
Binary file not shown.
View
42,098 spec/dummy2/log/development.log
42,098 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
46,064 spec/dummy2/log/pg_test.log
46,064 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
135 spec/dummy2/log/production.log
@@ -0,0 +1,135 @@
+
+
+Started GET "/admin/pages" for 127.0.0.1 at Thu Feb 03 12:38:55 +0300 2011
+ Processing by Admin::PagesController#index as HTML
+ Parameters: {"ancestors"=>[], "plural"=>true, "children"=>[]}
+Completed in 2ms
+
+ActiveRecord::StatementInvalid (SQLite3::SQLException: no such table: pages: SELECT "pages".* FROM "pages" WHERE ("pages"."parent_id" IS NULL) ORDER BY "lft" LIMIT 1):
+
+
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.8ms)
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (3.5ms)
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (7.0ms)
+
+
+Started GET "/admin/pages" for 127.0.0.1 at Thu Feb 03 12:38:55 +0300 2011
+ Processing by Admin::PagesController#index as HTML
+ Parameters: {"ancestors"=>[], "plural"=>true, "children"=>[]}
+Completed in 1ms
+
+ActiveRecord::StatementInvalid (SQLite3::SQLException: no such table: pages: SELECT "pages".* FROM "pages" WHERE ("pages"."parent_id" IS NULL) ORDER BY "lft" LIMIT 1):
+
+
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.8ms)
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (3.5ms)
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (7.0ms)
+
+
+Started GET "/admin/pages" for 127.0.0.1 at Thu Feb 03 12:38:56 +0300 2011
+ Processing by Admin::PagesController#index as HTML
+ Parameters: {"ancestors"=>[], "plural"=>true, "children"=>[]}
+Completed in 3ms
+
+ActiveRecord::StatementInvalid (SQLite3::SQLException: no such table: pages: SELECT "pages".* FROM "pages" WHERE ("pages"."parent_id" IS NULL) ORDER BY "lft" LIMIT 1):
+
+
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.9ms)
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (3.4ms)
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (7.5ms)
+
+
+Started GET "/admin/pages" for 127.0.0.1 at Thu Feb 03 12:38:56 +0300 2011
+ Processing by Admin::PagesController#index as HTML
+ Parameters: {"ancestors"=>[], "plural"=>true, "children"=>[]}
+Completed in 1ms
+
+ActiveRecord::StatementInvalid (SQLite3::SQLException: no such table: pages: SELECT "pages".* FROM "pages" WHERE ("pages"."parent_id" IS NULL) ORDER BY "lft" LIMIT 1):
+
+
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.9ms)
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (3.4ms)
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (7.3ms)
+
+
+Started GET "/admin/pages" for 127.0.0.1 at Thu Feb 03 12:39:21 +0300 2011
+ Processing by Admin::PagesController#index as HTML
+ Parameters: {"ancestors"=>[], "plural"=>true, "children"=>[]}
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/puffer-0.0.9/app/views/puffer/index.html.erb within layouts/puffer (8.3ms)
+Completed in 18ms
+
+ActionView::Template::Error (The @pages variable appears to be empty. Did you forget to pass the collection object for will_paginate?):
+ 1: <% @title = resource.human %>
+ 2: <h1><%= @title %></h1>
+ 3: <%= will_paginate records, :url => resource.collection_path(:page => '') %>
+ 4: <% if records.present? %>
+ 5: <table class="list_table">
+ 6: <thead>
+
+
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.4ms)
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (11.7ms)
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (17.5ms)
+
+
+Started GET "/admin/pages" for 127.0.0.1 at Thu Feb 03 12:39:22 +0300 2011
+ Processing by Admin::PagesController#index as HTML
+ Parameters: {"ancestors"=>[], "plural"=>true, "children"=>[]}
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/puffer-0.0.9/app/views/puffer/index.html.erb within layouts/puffer (1.6ms)
+Completed in 4ms
+
+ActionView::Template::Error (The @pages variable appears to be empty. Did you forget to pass the collection object for will_paginate?):
+ 1: <% @title = resource.human %>
+ 2: <h1><%= @title %></h1>
+ 3: <%= will_paginate records, :url => resource.collection_path(:page => '') %>
+ 4: <% if records.present? %>
+ 5: <table class="list_table">
+ 6: <thead>
+
+
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.9ms)
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (5.6ms)
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (9.3ms)
+
+
+Started GET "/admin/pages" for 127.0.0.1 at Thu Feb 03 12:39:48 +0300 2011
+ Processing by Admin::PagesController#index as HTML
+ Parameters: {"ancestors"=>[], "plural"=>true, "children"=>[]}
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/puffer-0.0.9/app/views/puffer/index.html.erb within layouts/puffer (2.7ms)
+Completed in 7ms
+
+ActionView::Template::Error (The @pages variable appears to be empty. Did you forget to pass the collection object for will_paginate?):
+ 1: <% @title = resource.human %>
+ 2: <h1><%= @title %></h1>
+ 3: <%= will_paginate records, :url => resource.collection_path(:page => '') %>
+ 4: <% if records.present? %>
+ 5: <table class="list_table">
+ 6: <thead>
+
+
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.9ms)
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (5.3ms)
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (9.0ms)
+
+
+Started GET "/admin/pages" for 127.0.0.1 at Thu Feb 03 12:39:48 +0300 2011
+ Processing by Admin::PagesController#index as HTML
+ Parameters: {"ancestors"=>[], "plural"=>true, "children"=>[]}
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/puffer-0.0.9/app/views/puffer/index.html.erb within layouts/puffer (1.1ms)
+Completed in 3ms
+
+ActionView::Template::Error (The @pages variable appears to be empty. Did you forget to pass the collection object for will_paginate?):
+ 1: <% @title = resource.human %>
+ 2: <h1><%= @title %></h1>
+ 3: <%= will_paginate records, :url => resource.collection_path(:page => '') %>
+ 4: <% if records.present? %>
+ 5: <table class="list_table">
+ 6: <thead>
+
+
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.9ms)
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (5.5ms)
+Rendered /home/pyromaniac/.rvm/gems/ree-1.8.7-2010.02@puffer_pages/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (9.4ms)
+
+
+Started GET "/admin/pages" for 127.0.0.1 at Thu Feb 03 12:40:02 +0300 2011
View
0 spec/dummy/public/stylesheets/.gitkeep → spec/dummy2/log/server.log
File renamed without changes.
View
500,114 spec/dummy2/log/test.log
500,114 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
26 spec/dummy2/public/404.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>The page you were looking for doesn't exist (404)</title>
+ <style type="text/css">
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+ div.dialog {
+ width: 25em;
+ padding: 0 4em;
+ margin: 4em auto 0 auto;
+ border: 1px solid #ccc;
+ border-right-color: #999;
+ border-bottom-color: #999;
+ }
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+ </style>
+</head>
+
+<body>
+ <!-- This file lives in public/404.html -->
+ <div class="dialog">
+ <h1>The page you were looking for doesn't exist.</h1>
+ <p>You may have mistyped the address or the page may have moved.</p>
+ </div>
+</body>
+</html>
View
26 spec/dummy2/public/422.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>The change you wanted was rejected (422)</title>
+ <style type="text/css">
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+ div.dialog {
+ width: 25em;
+ padding: 0 4em;
+ margin: 4em auto 0 auto;
+ border: 1px solid #ccc;
+ border-right-color: #999;
+ border-bottom-color: #999;
+ }
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+ </style>
+</head>
+
+<body>
+ <!-- This file lives in public/422.html -->
+ <div class="dialog">
+ <h1>The change you wanted was rejected.</h1>
+ <p>Maybe you tried to change something you didn't have access to.</p>
+ </div>
+</body>
+</html>
View
26 spec/dummy2/public/500.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>We're sorry, but something went wrong (500)</title>
+ <style type="text/css">
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+ div.dialog {
+ width: 25em;
+ padding: 0 4em;
+ margin: 4em auto 0 auto;
+ border: 1px solid #ccc;
+ border-right-color: #999;
+ border-bottom-color: #999;
+ }
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+ </style>
+</head>
+
+<body>
+ <!-- This file lives in public/500.html -->
+ <div class="dialog">
+ <h1>We're sorry, but something went wrong.</h1>
+ <p>We've been notified about this issue and we'll take a look at it shortly.</p>
+ </div>
+</body>
+</html>
View
0 spec/dummy2/public/favicon.ico
No changes.
View
0 spec/dummy/public/javascripts/application.js → .../dummy2/public/javascripts/application.js
File renamed without changes.
View
0 spec/dummy/public/javascripts/controls.js → spec/dummy2/public/javascripts/controls.js
File renamed without changes.
View
0 spec/dummy/public/javascripts/dragdrop.js → spec/dummy2/public/javascripts/dragdrop.js
File renamed without changes.
View
0 spec/dummy/public/javascripts/effects.js → spec/dummy2/public/javascripts/effects.js
File renamed without changes.
View
0 spec/dummy/public/javascripts/prototype.js → spec/dummy2/public/javascripts/prototype.js
File renamed without changes.
View
0 spec/dummy/public/javascripts/rails.js → spec/dummy2/public/javascripts/rails.js
File renamed without changes.
View
0 ...lic/puffer/javascripts/codemirror-base.js → ...lic/puffer/javascripts/codemirror-base.js
File renamed without changes.
View
0 ...c/puffer/javascripts/codemirror-parser.js → ...c/puffer/javascripts/codemirror-parser.js
File renamed without changes.
View
0 ...y/public/puffer/javascripts/codemirror.js → ...2/public/puffer/javascripts/codemirror.js
File renamed without changes.
View
0 ...dummy/public/puffer/javascripts/puffer.js → ...ummy2/public/puffer/javascripts/puffer.js
File renamed without changes.
View
0 ...public/puffer/javascripts/puffer_pages.js → ...public/puffer/javascripts/puffer_pages.js
File renamed without changes.
View
0 .../dummy/public/puffer/javascripts/rails.js → ...dummy2/public/puffer/javascripts/rails.js
File renamed without changes.
View
0 ...puffer/javascripts/right-autocompleter.js → ...puffer/javascripts/right-autocompleter.js
File renamed without changes.
View
0 ...blic/puffer/javascripts/right-calendar.js → ...blic/puffer/javascripts/right-calendar.js
File renamed without changes.
View
0 ...public/puffer/javascripts/right-dialog.js → ...public/puffer/javascripts/right-dialog.js
File renamed without changes.
View
0 ...y/public/puffer/javascripts/right-tabs.js → ...2/public/puffer/javascripts/right-tabs.js
File renamed without changes.
View
0 .../dummy/public/puffer/javascripts/right.js → ...dummy2/public/puffer/javascripts/right.js
File renamed without changes.
View
0 .../public/puffer/stylesheets/codemirror.css → .../public/puffer/stylesheets/codemirror.css
File renamed without changes.
View
0 ...ummy/public/puffer/stylesheets/puffer.css → ...mmy2/public/puffer/stylesheets/puffer.css
File renamed without changes.
View
0 ...ublic/puffer/stylesheets/puffer_pages.css → ...ublic/puffer/stylesheets/puffer_pages.css
File renamed without changes.
View
0 ...public/puffer/stylesheets/puffer_tree.css → ...public/puffer/stylesheets/puffer_tree.css
File renamed without changes.
View
0 ...dummy/public/puffer/stylesheets/reset.css → ...ummy2/public/puffer/stylesheets/reset.css
File renamed without changes.
View
0 spec/dummy2/public/stylesheets/.gitkeep
No changes.
View
6 spec/dummy2/script/rails
@@ -0,0 +1,6 @@
+#!/usr/bin/env ruby
+# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
+
+APP_PATH = File.expand_path('../../config/application', __FILE__)
+require File.expand_path('../../config/boot', __FILE__)
+require 'rails/commands'
View
1 spec/fabricators/pages_fabricator.rb
@@ -4,4 +4,5 @@
title { Forgery::LoremIpsum.sentence }
description { Forgery::LoremIpsum.sentence }
keywords { Forgery::LoremIpsum.sentence }
+ status {'published'}
end
View
14 spec/lib/drops_spec.rb
@@ -2,14 +2,12 @@
describe 'Drops' do
+ include RSpec::Rails::RequestExampleGroup
+
def render_page(current_page, page = nil)
- request = ActionController::TestRequest.new
- request.env["rack.url_scheme"] = "http"
- request.host = 'test.com'
- request.port = 80
- request.path = "/#{current_page.location}"
- current_page.render 'self' => PufferPages::Liquid::PageDrop.new(current_page, current_page, request),
- 'page' => (PufferPages::Liquid::PageDrop.new(page, current_page, request) if page)
+ get "/#{current_page.location}"
+ current_page.render 'self' => PufferPages::Liquid::PageDrop.new(current_page, current_page, controller),
+ 'page' => (PufferPages::Liquid::PageDrop.new(page, current_page, controller) if page)
end
describe 'page drop' do
@@ -26,7 +24,7 @@ def render_page(current_page, page = nil)
it 'should render proper url and path' do
@layout = Fabricate :layout, :name => 'foo_layout', :body => "{{ self.path }} {{ self.url }}"
- render_page(@bar).should == '/hello/world http://test.com/hello/world'
+ render_page(@bar).should == '/hello/world http://www.example.com/hello/world'
end
it 'should render page_part' do
View
15 spec/spec_helper.rb
@@ -34,5 +34,18 @@
# == Mock Framework
config.mock_with :rspec
- config.use_transactional_fixtures = true
+ config.use_transactional_fixtures = false
+
+ config.before(:suite) do
+ DatabaseCleaner.strategy = :transaction
+ DatabaseCleaner.clean_with(:truncation)
+ end
+
+ config.before(:each) do
+ DatabaseCleaner.start
+ end
+
+ config.after(:each) do
+ DatabaseCleaner.clean
+ end
end

0 comments on commit 93bf0ae

Please sign in to comment.
Something went wrong with that request. Please try again.