diff --git a/.gitignore b/.gitignore index 740a300..de5d954 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,7 @@ log/*.log pkg/ test/dummy/db/*.sqlite3 +test/dummy/db/*.sqlite3-journal test/dummy/log/*.log test/dummy/tmp/ test/dummy/.sass-cache -test/dummy/config/s3.yml -.DS_Store \ No newline at end of file diff --git a/Gemfile b/Gemfile index f2f2894..01adf49 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,14 @@ -source "http://rubygems.org" +source "https://rubygems.org" -gem "sqlite3" +# Declare your gem's dependencies in bcms_s3.gemspec. +# Bundler will treat runtime dependencies like base dependencies, and +# development dependencies will be added by default to the :development group. gemspec +# Declare any dependencies that are still in development here instead of in +# your gemspec. These might include edge Rails or gems from your path or +# Git. Remember to move these dependencies to your gemspec before releasing +# your gem to rubygems.org. - +# To use debugger +# gem 'debugger' diff --git a/Gemfile.lock b/Gemfile.lock index 73db0e0..6a887ee 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,134 +1,179 @@ PATH remote: . specs: - bcms_aws_s3 (1.0.2) + bcms_s3 (0.0.1) aws-sdk (~> 1.5.0) - browsercms (>= 3.5.0.rc1, < 3.6.0) + +PATH + remote: ../browsercms + specs: + browsercms (4.0.0.alpha) + actionpack-page_caching (~> 1.0) + ancestry (~> 2.0.0) + bootstrap-sass + ckeditor_rails (~> 4.3.0) + compass-rails (~> 1.1.3) + devise (~> 3.0) + jquery-rails (~> 3.1) + jquery-ui-rails (~> 4.1) + panoramic + paperclip (~> 3.5.1) + rails (~> 4.0.0) + sass-rails + simple_form (>= 3.0.0.rc, < 3.1) + term-ansicolor + underscore-rails (~> 1.4) + will_paginate (~> 3.0.0) GEM - remote: http://rubygems.org/ + remote: https://rubygems.org/ specs: - actionmailer (3.2.3) - actionpack (= 3.2.3) - mail (~> 2.4.4) - actionpack (3.2.3) - activemodel (= 3.2.3) - activesupport (= 3.2.3) - builder (~> 3.0.0) + actionmailer (4.0.2) + actionpack (= 4.0.2) + mail (~> 2.5.4) + actionpack (4.0.2) + activesupport (= 4.0.2) + builder (~> 3.1.0) erubis (~> 2.7.0) - journey (~> 1.0.1) - rack (~> 1.4.0) - rack-cache (~> 1.2) - rack-test (~> 0.6.1) - sprockets (~> 2.1.2) - activemodel (3.2.3) - activesupport (= 3.2.3) - builder (~> 3.0.0) - activerecord (3.2.3) - activemodel (= 3.2.3) - activesupport (= 3.2.3) - arel (~> 3.0.2) - tzinfo (~> 0.3.29) - activeresource (3.2.3) - activemodel (= 3.2.3) - activesupport (= 3.2.3) - activesupport (3.2.3) - i18n (~> 0.6) - multi_json (~> 1.0) - ancestry (1.2.5) - activerecord (>= 2.2.2) - arel (3.0.2) - aws-sdk (1.5.2) + rack (~> 1.5.2) + rack-test (~> 0.6.2) + actionpack-page_caching (1.0.2) + actionpack (>= 4.0.0, < 5) + activemodel (4.0.2) + activesupport (= 4.0.2) + builder (~> 3.1.0) + activerecord (4.0.2) + activemodel (= 4.0.2) + activerecord-deprecated_finders (~> 1.0.2) + activesupport (= 4.0.2) + arel (~> 4.0.0) + activerecord-deprecated_finders (1.0.3) + activesupport (4.0.2) + i18n (~> 0.6, >= 0.6.4) + minitest (~> 4.2) + multi_json (~> 1.3) + thread_safe (~> 0.1) + tzinfo (~> 0.3.37) + ancestry (2.0.0) + activerecord (>= 3.0.0) + arel (4.0.1) + atomic (1.1.14) + aws-sdk (1.5.8) httparty (~> 0.7) json (~> 1.4) nokogiri (>= 1.4.4) uuidtools (~> 2.1) - browsercms (3.5.0.rc1) - ancestry (~> 1.2.4) - ckeditor_rails (~> 3.6.2.2) - jquery-rails (~> 2.0) - paperclip (~> 3.0.3) - rails (~> 3.2.0) - sass-rails - term-ansicolor - builder (3.0.0) - ckeditor_rails (3.6.2.2) - railties (~> 3.0) - thor (~> 0.14) - cocaine (0.2.1) + bcrypt-ruby (3.1.2) + bootstrap-sass (3.1.0.1) + sass (~> 3.2) + builder (3.1.4) + chunky_png (1.2.9) + ckeditor_rails (4.3.1) + railties (>= 3.0) + climate_control (0.0.3) + activesupport (>= 3.0) + cocaine (0.5.3) + climate_control (>= 0.0.3, < 1.0) + compass (0.12.2) + chunky_png (~> 1.2) + fssm (>= 0.2.7) + sass (~> 3.1) + compass-rails (1.1.3) + compass (>= 0.12.2) + devise (3.2.2) + bcrypt-ruby (~> 3.0) + orm_adapter (~> 0.1) + railties (>= 3.2.6, < 5) + thread_safe (~> 0.1) + warden (~> 1.2.3) erubis (2.7.0) - hike (1.2.1) - httparty (0.8.3) - multi_json (~> 1.0) - multi_xml - i18n (0.6.0) - journey (1.0.3) - jquery-rails (2.0.2) - railties (>= 3.2.0, < 5.0) - thor (~> 0.14) - json (1.7.3) - mail (2.4.4) - i18n (>= 0.4.0) + fssm (0.2.10) + hike (1.2.3) + httparty (0.12.0) + json (~> 1.8) + multi_xml (>= 0.5.2) + i18n (0.6.9) + jquery-rails (3.1.0) + railties (>= 3.0, < 5.0) + thor (>= 0.14, < 2.0) + jquery-ui-rails (4.1.1) + railties (>= 3.1.0) + json (1.8.1) + mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) - mime-types (1.18) - multi_json (1.3.5) - multi_xml (0.5.1) - nokogiri (1.5.2) - paperclip (3.0.3) + mime-types (1.25.1) + mini_portile (0.5.2) + minitest (4.7.5) + multi_json (1.8.4) + multi_xml (0.5.5) + nokogiri (1.6.1) + mini_portile (~> 0.5.0) + orm_adapter (0.5.0) + panoramic (0.0.4) + rails (>= 3.0.7) + paperclip (3.5.3) activemodel (>= 3.0.0) - activerecord (>= 3.0.0) activesupport (>= 3.0.0) - cocaine (>= 0.0.2) + cocaine (~> 0.5.3) mime-types polyglot (0.3.3) - rack (1.4.1) - rack-cache (1.2) - rack (>= 0.4) - rack-ssl (1.3.2) - rack - rack-test (0.6.1) + rack (1.5.2) + rack-test (0.6.2) rack (>= 1.0) - rails (3.2.3) - actionmailer (= 3.2.3) - actionpack (= 3.2.3) - activerecord (= 3.2.3) - activeresource (= 3.2.3) - activesupport (= 3.2.3) - bundler (~> 1.0) - railties (= 3.2.3) - railties (3.2.3) - actionpack (= 3.2.3) - activesupport (= 3.2.3) - rack-ssl (~> 1.3.2) + rails (4.0.2) + actionmailer (= 4.0.2) + actionpack (= 4.0.2) + activerecord (= 4.0.2) + activesupport (= 4.0.2) + bundler (>= 1.3.0, < 2.0) + railties (= 4.0.2) + sprockets-rails (~> 2.0.0) + railties (4.0.2) + actionpack (= 4.0.2) + activesupport (= 4.0.2) rake (>= 0.8.7) - rdoc (~> 3.4) - thor (~> 0.14.6) - rake (0.9.2.2) - rdoc (3.12) - json (~> 1.4) - sass (3.1.18) - sass-rails (3.2.5) - railties (~> 3.2.0) + thor (>= 0.18.1, < 2.0) + rake (10.1.1) + sass (3.2.14) + sass-rails (4.0.1) + railties (>= 4.0.0, < 5.0) sass (>= 3.1.10) - tilt (~> 1.3) - sprockets (2.1.3) + sprockets-rails (~> 2.0.0) + simple_form (3.0.1) + actionpack (>= 4.0.0, < 4.1) + activemodel (>= 4.0.0, < 4.1) + sprockets (2.10.1) hike (~> 1.2) + multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - sqlite3 (1.3.6) - term-ansicolor (1.0.7) - thor (0.14.6) - tilt (1.3.3) - treetop (1.4.10) + sprockets-rails (2.0.1) + actionpack (>= 3.0) + activesupport (>= 3.0) + sprockets (~> 2.8) + sqlite3 (1.3.8) + term-ansicolor (1.2.2) + tins (~> 0.8) + thor (0.18.1) + thread_safe (0.1.3) + atomic + tilt (1.4.1) + tins (0.13.2) + treetop (1.4.15) polyglot polyglot (>= 0.3.1) - tzinfo (0.3.33) - uuidtools (2.1.2) + tzinfo (0.3.38) + underscore-rails (1.5.2) + uuidtools (2.1.4) + warden (1.2.3) + rack (>= 1.0) + will_paginate (3.0.5) PLATFORMS ruby DEPENDENCIES - bcms_aws_s3! + bcms_s3! + browsercms! sqlite3 diff --git a/Rakefile b/Rakefile index ff7f843..79d0bcc 100644 --- a/Rakefile +++ b/Rakefile @@ -1,16 +1,10 @@ -#!/usr/bin/env rake begin require 'bundler/setup' rescue LoadError puts 'You must `gem install bundler` and `bundle install` to run rake tasks' end -begin - require 'rdoc/task' -rescue LoadError - require 'rdoc/rdoc' - require 'rake/rdoctask' - RDoc::Task = Rake::RDocTask -end + +require 'rdoc/task' RDoc::Task.new(:rdoc) do |rdoc| rdoc.rdoc_dir = 'rdoc' @@ -37,4 +31,6 @@ Rake::TestTask.new(:test) do |t| end -task :default => :test +task default: :test + +load 'lib/tasks/module_tasks.rake' \ No newline at end of file diff --git a/app/assets/images/bcms_s3/.gitkeep b/app/assets/images/bcms_s3/.keep similarity index 100% rename from app/assets/images/bcms_s3/.gitkeep rename to app/assets/images/bcms_s3/.keep diff --git a/app/assets/javascripts/bcms_s3/application.js b/app/assets/javascripts/bcms_s3/application.js index 9097d83..5bc2e1c 100644 --- a/app/assets/javascripts/bcms_s3/application.js +++ b/app/assets/javascripts/bcms_s3/application.js @@ -5,11 +5,9 @@ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. // // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// the compiled file. +// compiled file. // -// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD -// GO AFTER THE REQUIRES BELOW. +// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details +// about supported directives. // -//= require jquery -//= require jquery_ujs //= require_tree . diff --git a/app/assets/stylesheets/bcms_s3/application.css b/app/assets/stylesheets/bcms_s3/application.css index 3b5cc66..3192ec8 100644 --- a/app/assets/stylesheets/bcms_s3/application.css +++ b/app/assets/stylesheets/bcms_s3/application.css @@ -10,4 +10,4 @@ * *= require_self *= require_tree . -*/ + */ diff --git a/app/views/layouts/bcms_s3/application.html.erb b/app/views/layouts/bcms_s3/application.html.erb new file mode 100644 index 0000000..c0fd2bc --- /dev/null +++ b/app/views/layouts/bcms_s3/application.html.erb @@ -0,0 +1,14 @@ + + + + BcmsS3 + <%= stylesheet_link_tag "bcms_s3/application", media: "all" %> + <%= javascript_include_tag "bcms_s3/application" %> + <%= csrf_meta_tags %> + + + +<%= yield %> + + + diff --git a/bcms_aws_s3.gemspec b/bcms_aws_s3.gemspec index 6f41f2e..ccbbdfc 100644 --- a/bcms_aws_s3.gemspec +++ b/bcms_aws_s3.gemspec @@ -1,34 +1,25 @@ -# -*- encoding: utf-8 -*- $:.push File.expand_path("../lib", __FILE__) + +# Maintain your gem's version: require "bcms_s3/version" +# Describe your gem and declare its dependencies: Gem::Specification.new do |s| s.name = "bcms_aws_s3" s.version = BcmsS3::VERSION - - s.files = Dir["{app,config,db,lib}/**/*"] - s.authors = ["BrowserMedia", "Anthony Underwood", "Neil Middleton"] - s.summary = %q{An S3 module for BrowserCMS} + s.authors = ["BrowserMedia", "Anthony Underwood", "Neil Middleton"] + s.email = %q{github@browsermedia.com} + s.homepage = %q{https://github.com/browsermedia/bcms_s3} + s.summary = %q{An S3 module for BrowserCMS} s.description = %q{A BrowserCMS module that stores attachments on Amazon S3 rather than on the filesystem.} - s.email = %q{github@browsermedia.com} - s.extra_rdoc_files = [ - "README.markdown" - ] - s.files += Dir["app/**/*"] - s.files += Dir["config/**/*"] - s.files += Dir["db/**/*"] - s.files += Dir["lib/**/*"] - s.files += Dir["Gemfile", "LICENSE.txt", "COPYRIGHT.txt", "GPL.txt" ] - - s.test_files += Dir["test/**/*"] - s.test_files -= Dir['test/dummy/**/*'] - - s.homepage = %q{https://github.com/browsermedia/bcms_s3} - s.require_paths = ["lib"] s.rubyforge_project = s.name - s.add_dependency("aws-sdk", "~> 1.5.0") - s.add_dependency("browsercms", "< 3.6.0", ">= 3.5.0.rc1") -end + s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"] + s.files -= Dir['lib/tasks/module_tasks.rake'] + s.test_files = Dir["test/**/*"] + s.add_dependency("aws-sdk", "~> 1.5.0") + s.add_dependency "browsercms", "~> 4.0.0.alpha" + s.add_development_dependency "sqlite3" +end diff --git a/script/rails b/bin/rails similarity index 80% rename from script/rails rename to bin/rails index be3c8a3..5ffbde1 100755 --- a/script/rails +++ b/bin/rails @@ -1,5 +1,5 @@ #!/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. +# This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application. ENGINE_ROOT = File.expand_path('../..', __FILE__) ENGINE_PATH = File.expand_path('../../lib/bcms_s3/engine', __FILE__) diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb new file mode 100644 index 0000000..9353186 --- /dev/null +++ b/config/initializers/devise.rb @@ -0,0 +1,7 @@ +# Configuration for Devise specific to your project. +# BrowserCMS has configured defaults for most other values. +Devise.setup do |config| + + config.secret_key = '842b2df17a4f04896223640ab5563c99caf5e6bcb8d8ff935a4417f9f9d4950257fdee0948a98d1dfb34eef5c312a2b205ab01e2199b965ab84eb888faa6678b' + +end \ No newline at end of file diff --git a/lib/bcms_aws_s3.rb b/lib/bcms_aws_s3.rb index 50daabc..cbd0433 100644 --- a/lib/bcms_aws_s3.rb +++ b/lib/bcms_aws_s3.rb @@ -1,6 +1,4 @@ require "bcms_s3/engine" -require "bcms_s3/routes" -# This file name is different than bcms_s3 since we don't own the gem and need to publish it. module BcmsS3 end diff --git a/lib/bcms_s3/engine.rb b/lib/bcms_s3/engine.rb index ea238c5..e87abaa 100644 --- a/lib/bcms_s3/engine.rb +++ b/lib/bcms_s3/engine.rb @@ -6,14 +6,16 @@ module BcmsS3 class Engine < ::Rails::Engine isolate_namespace BcmsS3 include Cms::Module - + config.before_configuration do + puts '==============================================================' + puts '==============================================================' + config.cms.attachments.s3_credentials = "#{Rails.root}/config/s3.yml" config.cms.attachments.storage = :s3 end - config.to_prepare do - Cms::ContentController.send(:include, Cms::S3::ContentController) + config.to_prepare do Cms::ApplicationController.send(:include, Cms::S3::ApplicationController) # ensure heroku caching disabled by default @@ -22,6 +24,8 @@ class Engine < ::Rails::Engine # function to set domain prefix without url to 'www' is disabled by default Cms::S3.www_domain_prefix = false if Cms::S3.www_domain_prefix.nil? - end + end + + end end diff --git a/lib/bcms_s3/routes.rb b/lib/bcms_s3/routes.rb deleted file mode 100644 index a7b0007..0000000 --- a/lib/bcms_s3/routes.rb +++ /dev/null @@ -1,5 +0,0 @@ -module Cms::Routes - def routes_for_bcms_s3 - - end -end diff --git a/lib/bcms_s3/s3_module.rb b/lib/bcms_s3/s3_module.rb index 58663c8..ca7688e 100644 --- a/lib/bcms_s3/s3_module.rb +++ b/lib/bcms_s3/s3_module.rb @@ -6,17 +6,6 @@ class << self attr_accessor :options end - module ContentController - def self.included(controller_class) - controller_class.alias_method_chain :render_page_with_caching, :s3 - end - def render_page_with_caching_with_s3 - render_page - response.headers['Cache-Control'] = 'public, max-age=300' if Cms::S3.heroku_caching - end - - end - module ApplicationController def self.included(controller_class) controller_class.alias_method_chain :url_without_cms_domain_prefix, :www diff --git a/lib/bcms_s3/version.rb b/lib/bcms_s3/version.rb index 9c4126e..6067be3 100644 --- a/lib/bcms_s3/version.rb +++ b/lib/bcms_s3/version.rb @@ -1,3 +1,3 @@ module BcmsS3 - VERSION = "1.0.2" + VERSION = "0.0.1" end diff --git a/lib/generators/bcms_s3/install/USAGE b/lib/generators/bcms_s3/install/USAGE new file mode 100644 index 0000000..34196f2 --- /dev/null +++ b/lib/generators/bcms_s3/install/USAGE @@ -0,0 +1,3 @@ +Installs bcms_s3 into a project. Typically invoked indirectly via: + + rails generate cms:install bcms_s3 \ No newline at end of file diff --git a/lib/generators/bcms_s3/install/install_generator.rb b/lib/generators/bcms_s3/install/install_generator.rb new file mode 100644 index 0000000..bbd981c --- /dev/null +++ b/lib/generators/bcms_s3/install/install_generator.rb @@ -0,0 +1,21 @@ +require 'cms/module_installation' + +class BcmsS3::InstallGenerator < Cms::ModuleInstallation + add_migrations_directory_to_source_root __FILE__ + + + def copy_migrations + rake 'bcms_s3:install:migrations' + end + + # Uncomment to add module specific seed data to a project. + #def add_seed_data_to_project + # copy_file "../bcms_s3.seeds.rb", "db/bcms_s3.seeds.rb" + # append_to_file "db/seeds.rb", "load File.expand_path('../bcms_s3.seeds.rb', __FILE__)\n" + #end + + def add_routes + mount_engine(BcmsS3) + end + +end \ No newline at end of file diff --git a/lib/tasks/module_tasks.rake b/lib/tasks/module_tasks.rake new file mode 100644 index 0000000..dec0098 --- /dev/null +++ b/lib/tasks/module_tasks.rake @@ -0,0 +1,10 @@ +# Provides tasks to make developing BrowserCMS modules easier. +# Should not be packaged with the gem. +namespace :db do + + # This copy of the core CMS task is necessary because Engines push all existing Rails tasks under app:db:install + desc 'Creates and populates the initial BrowserCMS database for a new project.' + task :install => %w{ db:create db:migrate db:seed } + + +end \ No newline at end of file diff --git a/test/unit/bcms_s3_test.rb b/test/bcms_s3_test.rb similarity index 100% rename from test/unit/bcms_s3_test.rb rename to test/bcms_s3_test.rb diff --git a/test/dummy/README.rdoc b/test/dummy/README.rdoc new file mode 100644 index 0000000..dd4e97e --- /dev/null +++ b/test/dummy/README.rdoc @@ -0,0 +1,28 @@ +== README + +This README would normally document whatever steps are necessary to get the +application up and running. + +Things you may want to cover: + +* Ruby version + +* System dependencies + +* Configuration + +* Database creation + +* Database initialization + +* How to run the test suite + +* Services (job queues, cache servers, search engines, etc.) + +* Deployment instructions + +* ... + + +Please feel free to use a different markup language if you do not plan to run +rake doc:app. diff --git a/test/dummy/Rakefile b/test/dummy/Rakefile index 3645852..4135d7a 100644 --- a/test/dummy/Rakefile +++ b/test/dummy/Rakefile @@ -1,4 +1,3 @@ -#!/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. diff --git a/test/dummy/app/mailers/.gitkeep b/test/dummy/app/assets/images/.keep similarity index 100% rename from test/dummy/app/mailers/.gitkeep rename to test/dummy/app/assets/images/.keep diff --git a/test/dummy/app/assets/javascripts/application.js b/test/dummy/app/assets/javascripts/application.js index 9097d83..5bc2e1c 100644 --- a/test/dummy/app/assets/javascripts/application.js +++ b/test/dummy/app/assets/javascripts/application.js @@ -5,11 +5,9 @@ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. // // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// the compiled file. +// compiled file. // -// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD -// GO AFTER THE REQUIRES BELOW. +// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details +// about supported directives. // -//= require jquery -//= require jquery_ujs //= require_tree . diff --git a/test/dummy/app/assets/stylesheets/application.css b/test/dummy/app/assets/stylesheets/application.css index 3b5cc66..3192ec8 100644 --- a/test/dummy/app/assets/stylesheets/application.css +++ b/test/dummy/app/assets/stylesheets/application.css @@ -10,4 +10,4 @@ * *= require_self *= require_tree . -*/ + */ diff --git a/test/dummy/app/controllers/application_controller.rb b/test/dummy/app/controllers/application_controller.rb index e8065d9..d83690e 100644 --- a/test/dummy/app/controllers/application_controller.rb +++ b/test/dummy/app/controllers/application_controller.rb @@ -1,3 +1,5 @@ class ApplicationController < ActionController::Base - protect_from_forgery + # Prevent CSRF attacks by raising an exception. + # For APIs, you may want to use :null_session instead. + protect_from_forgery with: :exception end diff --git a/test/dummy/app/models/.gitkeep b/test/dummy/app/controllers/concerns/.keep similarity index 100% rename from test/dummy/app/models/.gitkeep rename to test/dummy/app/controllers/concerns/.keep diff --git a/test/dummy/lib/assets/.gitkeep b/test/dummy/app/mailers/.keep similarity index 100% rename from test/dummy/lib/assets/.gitkeep rename to test/dummy/app/mailers/.keep diff --git a/test/dummy/log/.gitkeep b/test/dummy/app/models/.keep similarity index 100% rename from test/dummy/log/.gitkeep rename to test/dummy/app/models/.keep diff --git a/test/dummy/app/models/concerns/.keep b/test/dummy/app/models/concerns/.keep new file mode 100644 index 0000000..e69de29 diff --git a/test/dummy/app/views/layouts/application.html.erb b/test/dummy/app/views/layouts/application.html.erb index 4cab268..670d187 100644 --- a/test/dummy/app/views/layouts/application.html.erb +++ b/test/dummy/app/views/layouts/application.html.erb @@ -2,8 +2,8 @@ Dummy - <%= stylesheet_link_tag "application", :media => "all" %> - <%= javascript_include_tag "application" %> + <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> + <%= javascript_include_tag "application", "data-turbolinks-track" => true %> <%= csrf_meta_tags %> diff --git a/test/dummy/app/views/layouts/templates/default.html.erb b/test/dummy/app/views/layouts/templates/default.html.erb index 405758c..999a66f 100644 --- a/test/dummy/app/views/layouts/templates/default.html.erb +++ b/test/dummy/app/views/layouts/templates/default.html.erb @@ -6,11 +6,10 @@ <%= yield :html_head %> - <%= cms_toolbar %>
Breadcrumbs: <%= render_breadcrumbs %> Main Menu: <%= render_menu %> -

<%= page_title %>

+

<%= page_header %>

<%= container :main %>
diff --git a/test/dummy/bin/bundle b/test/dummy/bin/bundle new file mode 100755 index 0000000..66e9889 --- /dev/null +++ b/test/dummy/bin/bundle @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +load Gem.bin_path('bundler', 'bundle') diff --git a/test/dummy/bin/rails b/test/dummy/bin/rails new file mode 100755 index 0000000..728cd85 --- /dev/null +++ b/test/dummy/bin/rails @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +APP_PATH = File.expand_path('../../config/application', __FILE__) +require_relative '../config/boot' +require 'rails/commands' diff --git a/test/dummy/bin/rake b/test/dummy/bin/rake new file mode 100755 index 0000000..1724048 --- /dev/null +++ b/test/dummy/bin/rake @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +require_relative '../config/boot' +require 'rake' +Rake.application.run diff --git a/test/dummy/config.ru b/test/dummy/config.ru index 1989ed8..5bc2a61 100644 --- a/test/dummy/config.ru +++ b/test/dummy/config.ru @@ -1,4 +1,4 @@ # This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) -run Dummy::Application +run Rails.application diff --git a/test/dummy/config/application.rb b/test/dummy/config/application.rb index 54326f4..7958413 100644 --- a/test/dummy/config/application.rb +++ b/test/dummy/config/application.rb @@ -2,26 +2,15 @@ require 'rails/all' -Bundler.require -require "bcms_aws_s3" +Bundler.require(*Rails.groups) +require "bcms_s3" 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)' @@ -29,29 +18,6 @@ class Application < Rails::Application # 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] - - # Use SQL instead of Active Record's schema dumper when creating the 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 - - # Enforce whitelist mode for mass assignment. - # This will create an empty whitelist of attributes available for mass-assignment for all models - # in your app. As such, your models will need to explicitly whitelist or blacklist accessible - # parameters by using an attr_accessible or attr_protected declaration. - config.active_record.whitelist_attributes = true - - # Enable the asset pipeline - config.assets.enabled = true - - # Version of your assets, change this if you want to expire all your assets - config.assets.version = '1.0' end end diff --git a/test/dummy/config/boot.rb b/test/dummy/config/boot.rb index eba0681..ef36047 100644 --- a/test/dummy/config/boot.rb +++ b/test/dummy/config/boot.rb @@ -1,10 +1,5 @@ -require 'rubygems' -gemfile = File.expand_path('../../../../Gemfile', __FILE__) +# Set up gems listed in the Gemfile. +ENV['BUNDLE_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__) \ No newline at end of file +require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) +$LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__) diff --git a/test/dummy/config/database.yml b/test/dummy/config/database.yml index b139484..51a4dd4 100644 --- a/test/dummy/config/database.yml +++ b/test/dummy/config/database.yml @@ -1,11 +1,25 @@ +# SQLite version 3.x +# gem install sqlite3 +# +# Ensure the SQLite 3 gem is defined in your Gemfile +# gem 'sqlite3' 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 \ No newline at end of file + timeout: 5000 + +production: + adapter: sqlite3 + database: db/production.sqlite3 + pool: 5 + timeout: 5000 diff --git a/test/dummy/config/environment.rb b/test/dummy/config/environment.rb index 3da5eb9..10e0cad 100644 --- a/test/dummy/config/environment.rb +++ b/test/dummy/config/environment.rb @@ -1,5 +1,5 @@ -# Load the rails application +# Load the Rails application. require File.expand_path('../application', __FILE__) -# Initialize the rails application +# Initialize the Rails application. Dummy::Application.initialize! diff --git a/test/dummy/config/environments/development.rb b/test/dummy/config/environments/development.rb index 82c74d1..9d26e12 100644 --- a/test/dummy/config/environments/development.rb +++ b/test/dummy/config/environments/development.rb @@ -1,37 +1,29 @@ Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb + # 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 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 + # Do not eager load code on boot. + config.eager_load = false - # Show full error reports and disable caching + # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false - # Don't care if the mailer can't send + # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false - # Print deprecation notices to the Rails logger + # 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 + # Raise an error on page load if there are pending migrations + config.active_record.migration_error = :page_load - # Raise exception on mass assignment protection for Active Record models - config.active_record.mass_assignment_sanitizer = :strict - - # Log the query plan for queries taking more than this (works - # with SQLite, MySQL, and PostgreSQL) - config.active_record.auto_explain_threshold_in_seconds = 0.5 - - # Do not compress assets - config.assets.compress = false - - # Expands the lines which load the assets + # Debug mode disables concatenation and preprocessing of assets. + # This option may cause significant delays in view rendering with a large + # number of complex assets. config.assets.debug = true end diff --git a/test/dummy/config/environments/production.rb b/test/dummy/config/environments/production.rb index 56e3066..d1b1500 100644 --- a/test/dummy/config/environments/production.rb +++ b/test/dummy/config/environments/production.rb @@ -1,67 +1,86 @@ Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb + # Uncomment and set this to match your production URL. Used for emailing links to the CMS. (default: localhost:3000) + # config.cms.site_domain = "www.example.com" - # Code is not reloaded between requests + # Configure your mail server's address below + config.action_mailer.smtp_settings = {:address => 'mail.yourmailserver.com', :domain => config.cms.site_domain} + + # Settings specified here will take precedence over those in config/application.rb. + + # Code is not reloaded between requests. config.cache_classes = true - # Full error reports are disabled and caching is turned on + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both thread web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = true + + # Full error reports are disabled and caching is turned on. config.consider_all_requests_local = false config.action_controller.perform_caching = true - # Disable Rails's static asset server (Apache or nginx will already do this) + # Enable Rack::Cache to put a simple HTTP cache in front of your application + # Add `rack-cache` to your Gemfile before enabling this. + # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. + # config.action_dispatch.rack_cache = true + + # Disable Rails's static asset server (Apache or nginx will already do this). config.serve_static_assets = false - # Compress JavaScripts and CSS - config.assets.compress = true + # Compress JavaScripts and CSS. + config.assets.js_compressor = :uglifier + # config.assets.css_compressor = :sass - # Don't fallback to assets pipeline if a precompiled asset is missed - config.assets.compile = false + # Do not fallback to assets pipeline if a precompiled asset is missed. + config.assets.compile = true - # Generate digests for assets URLs + # Generate digests for assets URLs. config.assets.digest = true - # Defaults to Rails.root.join("public/assets") - # config.assets.manifest = YOUR_PATH + # Version of your assets, change this if you want to expire all your assets. + config.assets.version = '1.0' - # Specifies the header that your server uses for sending files + # Specifies the header that your server uses for sending files. # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx # 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 + # Set to :debug to see everything in the log. + config.log_level = :info - # Prepend all log lines with the following tags + # Prepend all log lines with the following tags. # config.log_tags = [ :subdomain, :uuid ] - # Use a different logger for distributed setups + # Use a different logger for distributed setups. # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) - # Use a different cache store in production + # Use a different cache store in production. # config.cache_store = :mem_cache_store - # 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) + # Precompile additional assets. + # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. # config.assets.precompile += %w( search.js ) - # Disable delivery errors, bad email addresses will be ignored + # Ignore bad email addresses and do not raise email delivery errors. + # Set this to true and configure the email server for immediate delivery to raise delivery errors. # 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) + # the I18n.default_locale when a translation can not be found). config.i18n.fallbacks = true - # Send deprecation notices to registered listeners + # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify - # Log the query plan for queries taking more than this (works - # with SQLite, MySQL, and PostgreSQL) - # config.active_record.auto_explain_threshold_in_seconds = 0.5 + # Disable automatic flushing of the log to improve performance. + # config.autoflush_log = false + + # Use default logging formatter so that PID and timestamp are not suppressed. + config.log_formatter = ::Logger::Formatter.new end diff --git a/test/dummy/config/environments/test.rb b/test/dummy/config/environments/test.rb index f1a4814..afbc0ae 100644 --- a/test/dummy/config/environments/test.rb +++ b/test/dummy/config/environments/test.rb @@ -1,5 +1,5 @@ Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb + # 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 @@ -7,31 +7,30 @@ # and recreated between test runs. Don't rely on the data there! config.cache_classes = true - # Configure static asset server for tests with Cache-Control for performance - config.serve_static_assets = true - config.static_cache_control = "public, max-age=3600" + # Do not eager load code on boot. This avoids loading your whole application + # just for the purpose of running a single test. If you are using a tool that + # preloads Rails for running tests, you may have to set it to true. + config.eager_load = false - # Log error messages when you accidentally call methods on nil - config.whiny_nils = true + # Configure static asset server for tests with Cache-Control for performance. + config.serve_static_assets = true + config.static_cache_control = "public, max-age=3600" - # Show full error reports and disable caching + # 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 + # 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 + # 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 - # Raise exception on mass assignment protection for Active Record models - config.active_record.mass_assignment_sanitizer = :strict - - # Print deprecation notices to the stderr + # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr end diff --git a/test/dummy/config/initializers/browsercms.rb b/test/dummy/config/initializers/browsercms.rb index 1aad993..8d0dfad 100644 --- a/test/dummy/config/initializers/browsercms.rb +++ b/test/dummy/config/initializers/browsercms.rb @@ -1 +1 @@ -# No configuration required here \ No newline at end of file +Cms.attachment_file_permission = 0640 diff --git a/test/dummy/config/initializers/filter_parameter_logging.rb b/test/dummy/config/initializers/filter_parameter_logging.rb new file mode 100644 index 0000000..4a994e1 --- /dev/null +++ b/test/dummy/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,4 @@ +# Be sure to restart your server when you modify this file. + +# Configure sensitive parameters which will be filtered from the log file. +Rails.application.config.filter_parameters += [:password] diff --git a/test/dummy/config/initializers/inflections.rb b/test/dummy/config/initializers/inflections.rb index 5d8d9be..ac033bf 100644 --- a/test/dummy/config/initializers/inflections.rb +++ b/test/dummy/config/initializers/inflections.rb @@ -1,15 +1,16 @@ # 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| +# Add new inflection rules using the following format. Inflections +# are locale specific, and you may define rules for as many different +# locales as you wish. All of these examples are active by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person', 'people' # inflect.uncountable %w( fish sheep ) # end -# + # These inflection rules are supported but not enabled by default: -# ActiveSupport::Inflector.inflections do |inflect| +# ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.acronym 'RESTful' # end diff --git a/test/dummy/config/initializers/secret_token.rb b/test/dummy/config/initializers/secret_token.rb index 3ea3980..3d4b6df 100644 --- a/test/dummy/config/initializers/secret_token.rb +++ b/test/dummy/config/initializers/secret_token.rb @@ -1,7 +1,12 @@ # Be sure to restart your server when you modify this file. -# Your secret key for verifying the integrity of signed cookies. +# Your secret key is used 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 = 'f2ff09fccc55d5bed3b711665a2abaf4b2d903f209ede9c99e20ca160c1f1a1d8b3e1cc572c87d52c7b5afcd3e28393b37c902cd175878bdcb5fa3e78d80a764' +# You can use `rake secret` to generate a secure secret key. + +# Make sure your secret_key_base is kept private +# if you're sharing your code publicly. +Dummy::Application.config.secret_key_base = '4cd65b5ac4544434543e041ceb856f8563c7d2ca865b519328924f3810891eb7f7e43caae2eef502d2c79da13a2ba423241098938ffbc9c34864f09216a4ebdb' diff --git a/test/dummy/config/initializers/session_store.rb b/test/dummy/config/initializers/session_store.rb index 952473f..155f7b0 100644 --- a/test/dummy/config/initializers/session_store.rb +++ b/test/dummy/config/initializers/session_store.rb @@ -1,8 +1,3 @@ # 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 diff --git a/test/dummy/config/initializers/wrap_parameters.rb b/test/dummy/config/initializers/wrap_parameters.rb index 999df20..33725e9 100644 --- a/test/dummy/config/initializers/wrap_parameters.rb +++ b/test/dummy/config/initializers/wrap_parameters.rb @@ -1,14 +1,14 @@ # 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. ActiveSupport.on_load(:action_controller) do - wrap_parameters format: [:json] + wrap_parameters format: [:json] if respond_to?(:wrap_parameters) end -# Disable root element in JSON by default. -ActiveSupport.on_load(:active_record) do - self.include_root_in_json = false -end +# To enable root element in JSON for ActiveRecord objects. +# ActiveSupport.on_load(:active_record) do +# self.include_root_in_json = true +# end diff --git a/test/dummy/config/locales/en.yml b/test/dummy/config/locales/en.yml index 179c14c..0653957 100644 --- a/test/dummy/config/locales/en.yml +++ b/test/dummy/config/locales/en.yml @@ -1,5 +1,23 @@ -# Sample localization file for English. Add more files in this directory for other locales. -# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. +# Files in the config/locales directory are used for internationalization +# and are automatically loaded by Rails. If you want to use locales other +# than English, add the necessary files in this directory. +# +# To use the locales, use `I18n.t`: +# +# I18n.t 'hello' +# +# In views, this is aliased to just `t`: +# +# <%= t('hello') %> +# +# To use a different locale, set it with `I18n.locale`: +# +# I18n.locale = :es +# +# This would use the information in config/locales/es.yml. +# +# To learn more, please read the Rails Internationalization guide +# available at http://guides.rubyonrails.org/i18n.html. en: hello: "Hello world" diff --git a/test/dummy/config/routes.rb b/test/dummy/config/routes.rb index b681a04..cb0e18a 100644 --- a/test/dummy/config/routes.rb +++ b/test/dummy/config/routes.rb @@ -1,5 +1,6 @@ Rails.application.routes.draw do mount BcmsS3::Engine => "/bcms_s3" - mount_browsercms + + mount_browsercms end diff --git a/test/dummy/config/s3.yml b/test/dummy/config/s3.yml new file mode 100644 index 0000000..37f17f3 --- /dev/null +++ b/test/dummy/config/s3.yml @@ -0,0 +1,2 @@ +access_key_id: AKIAJXWF53HAMDLRGSXA +secret_access_key: xHyFpU54/aLM67bmBqAtDduL61NOaQhnpciJmKOz \ No newline at end of file diff --git a/test/dummy/db/browsercms.seeds.rb b/test/dummy/db/browsercms.seeds.rb index fedd59e..ccfbab8 100644 --- a/test/dummy/db/browsercms.seeds.rb +++ b/test/dummy/db/browsercms.seeds.rb @@ -1,18 +1,12 @@ require 'cms/data_loader' -extend Cms::DataLoader if %w[development test dev local].include?(Rails.env) pwd = "cmsadmin" else - pwd = (0..8).inject("") { |s, i| s << (('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a).rand } + pwd = (0..8).inject("") { |s, i| s << (('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a).sample } end Cms::User.current = create_user(:cmsadmin, :login => "cmsadmin", :first_name => "CMS", :last_name => "Administrator", :email => "cmsadmin@example.com", :password => pwd, :password_confirmation => pwd) -[["Cms::CategoryType", "Categorization"], ["Cms::Category","Categorization"], ["Cms::Tag", "Categorization"], - ["Cms::HtmlBlock", "Core"], ["Cms::Portlet", "Core"], ["Cms::FileBlock", "Core"], ["Cms::ImageBlock", "Core"] -].each do |type| - create_content_type(type[0].to_sym, :name=>type[0], :group_name=>type[1]) -end create_permission(:administrate, :name => "administrate", :full_name => "Administer CMS", :description => "Allows users to administer the CMS, including adding users and groups.") create_permission(:edit_content, :name => "edit_content", :full_name => "Edit Content", :description => "Allows users to Add, Edit and Delete both Pages and Blocks. Can Save (but not Publish) and Assign them as well.") create_permission(:publish_content, :name => "publish_content", :full_name => "Publish Content", :description => "Allows users to Save and Publish, Hide and Archive both Pages and Blocks.") @@ -20,6 +14,7 @@ create_group_type(:guest_group_type, :name => "Guest", :guest => true) create_group_type(:registered_public_user, :name => "Registered Public User") create_group_type(:cms_user, :name => "CMS User", :cms_access => true) + group_types(:cms_user).permissions< root_section) if root_section - - all_nodes_but_root = Cms::SectionNode.find(:all, :conditions=>["section_id IS NOT NULL"]) - all_nodes_but_root.each do |sn| - parent_node = Cms::SectionNode.find(:first, :conditions => ["node_id = ? and node_type = 'Section'", sn.section_id]) - sn.temp_parent_id = parent_node.id - sn.save! - end - rename_column prefix(:section_nodes), :temp_parent_id, :parent_id # Ancestry works off the 'parent_id' column. - - Cms::SectionNode.build_ancestry_from_parent_ids! - remove_column prefix(:section_nodes), :section_id - remove_column prefix(:section_nodes), :parent_id - Cms::SectionNode.reset_column_information - end - - # Adds a 'latest_version' pointer to pages and links. Greatly reduces the number of queries the sitemap requires to determine if pages are in draft/published mode - def self.update_latest_version_cache - add_column prefix(:pages), :latest_version, :integer - add_column prefix(:links), :latest_version, :integer - Cms::Page.all.each do |p| - p.update_latest_version - end - Cms::Link.all.each do |link| - link.update_latest_version - end - end -end diff --git a/test/dummy/db/migrate/20120511153931_browsercms330.cms.rb b/test/dummy/db/migrate/20120511153931_browsercms330.cms.rb deleted file mode 100644 index 68b2f59..0000000 --- a/test/dummy/db/migrate/20120511153931_browsercms330.cms.rb +++ /dev/null @@ -1,57 +0,0 @@ -# This migration comes from cms (originally 20100705083859) -class Browsercms330 < ActiveRecord::Migration - def self.up - - # patch required for LH345 - cant_fix = [] - to_fix = [] - # find all pages whose path ends in slash and is not root - Cms::Page.find(:all, :conditions => "path LIKE '/%/'").each do |pt_page| - # make sure no extant page has this path - if Page.count(:conditions => ["path = ?", pt_page.path.sub(/(.+)\/+$/, '\1')]) > 0 - cant_fix << pt_page - else - to_fix << pt_page - end - end - version_cant_fix = [] - version_to_fix = [] - # find all page versions whose path ends in slash and is not root - Cms::Page::Version.find(:all, :conditions => "path LIKE '/%/'").each do |pt_page| - # make sure no extant page has this path - if Cms::Page.count(:conditions => ["path = ?", pt_page.path.sub(/(.+)\/+$/, '\1')]) > 0 - version_cant_fix << pt_page - else - version_to_fix << pt_page - end - end - - # raise an error if there are pages (*not* page versions) that will duplicate an extant path if the ending slash is dropped - if cant_fix.length > 0 - raise "Cannot remove trailing slashes from pages with ID(s) (#{cant_fix.map(&:id).join(', ')}). Other pages already exist with their correct path. The offending path may be in an unpublished page version, newer than the current public version. These needed to be corrected manually in your DBMS before running this migration" - end - - to_fix.each do |fix_page| - # change the path of all pages with a trailing slash to not have one - # using sql updates to prevent unwanted callbacks - new_path = fix_page.path.to_s.sub(/(.+)\/+$/, '\1') - execute "UPDATE #{prefix('pages')} SET path = '#{new_path}' WHERE id = #{fix_page.id};" - end - version_to_fix.each do |fix_page| - # change the path of all fixable page versions with a trailing slash to not have one - # using sql updates to prevent unwanted callbacks - new_path = fix_page.path.to_s.sub(/(.+)\/+$/, '\1') - execute "UPDATE #{prefix('page_versions')} SET path = '#{new_path}' WHERE id = #{fix_page.id};" - end - # end patch for LH345 - end - - def self.down - - # Cannot restore paths with trailing slash - raise error or show message - # - # raise IrreversibleMigration, "Cannot reverse migration which removes trailing slash from page paths" - puts "Page paths which had trailing slashes removed cannot be restored to their original state." - - end -end diff --git a/test/dummy/db/migrate/20120511153932_browsercms340.cms.rb b/test/dummy/db/migrate/20120511153932_browsercms340.cms.rb deleted file mode 100644 index 961423d..0000000 --- a/test/dummy/db/migrate/20120511153932_browsercms340.cms.rb +++ /dev/null @@ -1,63 +0,0 @@ -# This migration comes from cms (originally 20111130221145) -# Upgrade to Browsercms v3.4.0 -require 'cms/upgrades/v3_4_0' -class Browsercms340 < ActiveRecord::Migration - include Cms::Upgrades::V3_4_0::SchemaStatements - - def change - # Namespace class_names where they are not namespaced. - %w[HtmlBlock Category CategoryType Portlet FileBlock ImageBlock Tag].each do |content_type| - update_content_types(content_type) - update_connectors_table(content_type) - end - - update_sitemap - update_files - standardize_foreign_keys_from_versions_tables_to_original_table - end - - private - - def namespace_model(name) - "Cms::#{name}" - end - - def update_files - %w[FileBlock ImageBlock].each do |content_type| - Cms::AbstractFileBlock.update_all("type = '#{namespace_model(content_type)}'", "type = '#{content_type}'") - end - end - - def update_sitemap - %w[Section Page Link Attachment].each do |addressable| - Cms::SectionNode.where(:node_type=>addressable).each do |node| - node.node_type = namespace_model(addressable) - node.save! - end - end - end - - def update_content_types(name) - found = Cms::ContentType.named(name).first - if found - found.name = namespace_model(name) - found.save! - end - end - - def update_connectors_table(name) - namespaced_class = namespace_model(name) - puts "Update connectors for #{name} to #{namespaced_class}" - Cms::Connector.where(:connectable_type => name).each do |connector| - connector.connectable_type = namespaced_class - connector.save! - end - end - - def standardize_foreign_keys_from_versions_tables_to_original_table - models = %w[attachment dynamic_view file_block html_block link page ] - models.each do |model| - standardize_version_id_column(model) - end - end -end diff --git a/test/dummy/db/migrate/20120511153933_browsercms350.cms.rb b/test/dummy/db/migrate/20120511153933_browsercms350.cms.rb deleted file mode 100644 index dfec057..0000000 --- a/test/dummy/db/migrate/20120511153933_browsercms350.cms.rb +++ /dev/null @@ -1,33 +0,0 @@ -# This migration comes from cms (originally 20120329144406) -require 'cms/upgrades/v3_5_0' - -class Browsercms350 < ActiveRecord::Migration - def change - migrate_attachments_table - migrate_attachment_for(Cms::ImageBlock) - migrate_attachment_for(Cms::FileBlock) - migrate_attachment_files_to_new_location - - end - - - private - - def migrate_attachments_table - rename_table :attachments, :cms_attachments if table_exists?(:attachments) - rename_table :attachment_versions, :cms_attachment_versions if table_exists?(:attachment_versions) - - rename_content_column :cms_attachments, :file_path, :data_file_path - rename_content_column :cms_attachments, :file_size, :data_file_size - rename_content_column :cms_attachments, :file_type, :data_content_type - rename_content_column :cms_attachments, :name, :data_file_name - remove_content_column :cms_attachments, :file_extension - - add_content_column :cms_attachments, :data_fingerprint, :string - add_content_column :cms_attachments, :attachable_type, :string - add_content_column :cms_attachments, :attachment_name, :string - add_content_column :cms_attachments, :attachable_id, :integer - add_content_column :cms_attachments, :attachable_version, :integer - add_content_column :cms_attachments, :cardinality, :string - end -end diff --git a/test/dummy/db/migrate/20120511153928_browsercms300.cms.rb b/test/dummy/db/migrate/20140204192558_browsercms300.cms.rb similarity index 53% rename from test/dummy/db/migrate/20120511153928_browsercms300.cms.rb rename to test/dummy/db/migrate/20140204192558_browsercms300.cms.rb index 50e4064..f9be39e 100644 --- a/test/dummy/db/migrate/20120511153928_browsercms300.cms.rb +++ b/test/dummy/db/migrate/20140204192558_browsercms300.cms.rb @@ -1,7 +1,7 @@ # This migration comes from cms (originally 20080815014337) class Browsercms300 < ActiveRecord::Migration - def self.up - create_table prefix(:users), :force => true do |t| + def change + create_table :cms_users, :force => true do |t| t.column :login, :string, :limit => 40 t.column :first_name, :string, :limit => 40 t.column :last_name, :string, :limit => 40 @@ -13,10 +13,11 @@ def self.up t.column :expires_at, :datetime t.column :remember_token, :string, :limit => 40 t.column :remember_token_expires_at, :datetime + t.column :reset_token, :string end - add_index prefix(:users), :login, :unique => true + add_index :cms_users, :login, :unique => true - create_content_table :dynamic_views do |t| + create_content_table :cms_dynamic_views do |t| t.string :type t.string :name t.string :format @@ -25,7 +26,7 @@ def self.up t.timestamps end - create_content_table :pages do |t| + create_content_table :cms_pages do |t| t.string :name t.string :title t.string :path @@ -36,32 +37,33 @@ def self.up t.boolean :cacheable, :default => false t.boolean :hidden, :default => false end + add_column :cms_pages, :latest_version, :integer - create_table prefix(:content_type_groups) do |t| + create_table :cms_content_type_groups do |t| t.string :name t.timestamps end - create_table prefix(:content_types) do |t| + create_table :cms_content_types do |t| t.string :name t.belongs_to :content_type_group t.integer :priority, :default => 2 t.timestamps end - create_table prefix(:category_types) do |t| + create_table :cms_category_types do |t| t.string :name t.timestamps end - create_table prefix(:categories) do |t| + create_table :cms_categories do |t| t.belongs_to :category_type t.belongs_to :parent t.string :name t.timestamps end - create_table prefix(:connectors) do |t| + create_table :cms_connectors do |t| t.integer :page_id t.integer :page_version t.integer :connectable_id @@ -72,12 +74,11 @@ def self.up t.timestamps end - create_versioned_table :html_blocks do |t| - t.string :name - t.string :content, :limit => 64.kilobytes + 1 + create_content_table :cms_html_blocks do |t| + t.text :content, :limit => 64.kilobytes + 1 end - create_table prefix(:sections) do |t| + create_table :cms_sections do |t| t.string :name t.string :path t.boolean :root, :default => false @@ -85,7 +86,7 @@ def self.up t.timestamps end - create_table prefix(:portlets) do |t| + create_table :cms_portlets do |t| t.string :type t.string :name t.boolean :archived, :default => false @@ -93,99 +94,106 @@ def self.up t.integer :created_by_id, :updated_by_id t.timestamps end - create_table prefix(:portlet_attributes) do |t| + create_table :cms_portlet_attributes do |t| t.integer :portlet_id t.string :name t.text :value end - create_table prefix(:redirects) do |t| + create_table :cms_redirects do |t| t.string :from_path t.string :to_path t.timestamps end - create_content_table :attachments do |t| - t.string :file_path + create_content_table :cms_attachments, name: false do |t| + t.string :data_file_name + t.string :data_file_path t.string :file_location - t.string :file_extension - t.string :file_type - t.integer :file_size - t.timestamps + t.string :data_content_type + t.integer :data_file_size + t.string :data_fingerprint + t.string :attachable_type + t.string :attachment_name + t.integer :attachable_id + t.integer :attachable_version + t.string :cardinality end - create_content_table :file_blocks do |t| + create_content_table :cms_file_blocks do |t| t.string :type t.string :name t.integer :attachment_id t.integer :attachment_version end - create_table prefix(:group_types) do |t| + create_table :cms_group_types do |t| t.string :name t.boolean :guest, :default => false t.boolean :cms_access, :default => false t.timestamps end - create_table prefix(:groups) do |t| + create_table :cms_groups do |t| t.string :name t.string :code t.integer :group_type_id t.timestamps end - create_table prefix(:user_group_memberships) do |t| + create_table :cms_user_group_memberships do |t| t.integer :user_id t.integer :group_id end - create_table prefix(:permissions) do |t| + create_table :cms_permissions do |t| t.string :name t.string :full_name t.string :description t.string :for_module t.timestamps end - create_table prefix(:group_permissions) do |t| + create_table :cms_group_permissions do |t| t.integer :group_id t.integer :permission_id end - create_table prefix(:group_type_permissions) do |t| + create_table :cms_group_type_permissions do |t| t.integer :group_type_id t.integer :permission_id end - create_table prefix(:group_sections) do |t| + create_table :cms_group_sections do |t| t.integer :group_id t.integer :section_id end - create_table prefix(:sites) do |t| + create_table :cms_sites do |t| t.string :name t.string :domain t.boolean :the_default t.timestamps end - create_table prefix(:section_nodes) do |t| - t.integer :section_id + create_table :cms_section_nodes do |t| t.string :node_type t.integer :node_id t.integer :position + t.string :ancestry t.timestamps end - create_content_table :links do |t| + create_content_table :cms_links do |t| t.string :name t.string :url t.boolean :new_window, :default => false t.timestamps end + add_column :cms_links, :latest_version, :integer + - create_table prefix(:tags) do |t| + create_table :cms_tags do |t| t.string :name t.timestamps end - create_table prefix(:taggings) do |t| + create_table :cms_taggings do |t| t.integer :tag_id t.integer :taggable_id t.string :taggable_type @@ -193,7 +201,7 @@ def self.up t.timestamps end - create_table prefix(:email_messages) do |t| + create_table :cms_email_messages do |t| t.string :sender t.text :recipients t.text :subject @@ -205,7 +213,7 @@ def self.up t.timestamps end - create_table prefix(:tasks) do |t| + create_table :cms_tasks do |t| t.integer :assigned_by_id t.integer :assigned_to_id t.integer :page_id @@ -215,53 +223,66 @@ def self.up t.timestamps end - create_table prefix(:page_routes) do |t| + create_table :cms_page_routes do |t| t.string :name t.string :pattern t.belongs_to :page t.text :code t.timestamps end - create_table prefix(:page_route_options) do |t| + create_table :cms_page_route_options do |t| t.belongs_to :page_route t.string :type t.string :name t.string :value t.timestamps end - end - def self.down - drop_table prefix(:page_route_options) - drop_table prefix(:page_routes) - drop_table prefix(:tasks) - drop_table prefix(:email_messages) - drop_table prefix(:taggings) - drop_table prefix(:tags) - drop_versioned_table :links - drop_table prefix(:section_nodes) - drop_table prefix(:sites) - drop_table prefix(:group_sections) - drop_table prefix(:group_type_permissions) - drop_table prefix(:group_permissions) - drop_table prefix(:permissions) - drop_table prefix(:user_group_memberships) - drop_table prefix(:groups) - drop_table prefix(:group_types) - drop_versioned_table :file_blocks - drop_versioned_table :attachments - drop_table prefix(:redirects) - drop_table prefix(:portlet_attributes) - drop_table prefix(:portlets) - drop_table prefix(:sections) - drop_versioned_table :html_blocks - drop_table prefix(:connectors) - drop_table prefix(:categories) - drop_table prefix(:category_types) - drop_table prefix(:content_types) - drop_table prefix(:content_type_groups) - drop_versioned_table :pages - drop_versioned_table :dynamic_views - drop_table prefix(:users) + INDEXES.each do |index| + table_name, column = *index + add_index cms_(table_name), column + end end + + # Add some very commonly used indexes to improve the site performance as the # of pages/content grows (i.e. several thousand pages) + INDEXES = [ + [:pages, :deleted], + [:pages, :path], + [:pages, :version], + [:page_versions, :original_record_id], + [:groups, :code], + [:groups, :group_type_id], + [:group_types, :cms_access], + [:group_sections, :section_id], + [:group_sections, :group_id], + [:users, :expires_at], + [:user_group_memberships, :group_id], + [:user_group_memberships, :user_id], + [:group_permissions, :group_id], + [:group_permissions, :permission_id], + [:group_permissions, [:group_id, :permission_id]], + [:section_nodes, :node_type], + [:section_nodes, :ancestry], + [:connectors, :page_id], + [:connectors, :page_version], + [:html_blocks, :deleted], + [:html_block_versions, :original_record_id], + [:html_block_versions, :version], + [:portlet_attributes, :portlet_id], + [:portlets, :name], + [:sections, :path], + [:redirects, :from_path], + [:connectors, :connectable_version], + [:connectors, :connectable_type], + [:content_types, :content_type_group_id], + [:content_types, :name], + [:file_block_versions, :original_record_id], + [:file_block_versions, :version], + [:file_blocks, :deleted], + [:file_blocks, :type], + [:attachment_versions, :original_record_id], + [:tasks, :page_id], + [:tasks, :completed_at], + [:tasks, :assigned_to_id], + ] end diff --git a/test/dummy/db/migrate/20140204192559_browsercms400.cms.rb b/test/dummy/db/migrate/20140204192559_browsercms400.cms.rb new file mode 100644 index 0000000..3c1289b --- /dev/null +++ b/test/dummy/db/migrate/20140204192559_browsercms400.cms.rb @@ -0,0 +1,91 @@ +# This migration comes from cms (originally 20130327184912) +class Browsercms400 < ActiveRecord::Migration + + def up + apply_cms_namespace_to_all_core_tables + + add_column :cms_section_nodes, :slug, :string + add_content_column :cms_dynamic_views, :path, :string + add_content_column :cms_dynamic_views, :locale, :string, default: 'en' + add_content_column :cms_dynamic_views, :partial, :boolean, default: false + + Cms::PageTemplate.all.find_each do |pt| + pt.path = "layout/templates/#{pt.name}" + pt.locale = "en" + pt.save! + end + + Cms::PagePartial.all.find_each do |pp| + pp.path = "partials/#{pp.name}" + pp.locale = "en" + pp.partial = true + pp.save! + end + + drop_table :cms_content_type_groups + drop_table :cms_content_types + + create_content_table :cms_forms do |t| + t.string :name + t.text :description + t.string :confirmation_behavior + t.text :confirmation_text + t.string :confirmation_redirect + t.string :notification_email + end + + create_table :cms_form_fields do |t| + t.integer :form_id + t.string :label + t.string :name + t.string :field_type + t.boolean :required + t.integer :position + t.text :instructions + t.text :default_value + t.text :choices + t.timestamps + end + + # Field names should be unique per form + add_index :cms_form_fields, [:form_id, :name], :unique => true + + create_table :cms_form_entries do |t| + t.text :data_columns + t.integer :form_id + t.timestamps + end + + end + + private + + # In 4.x, all core tables MUST start with cms_. See https://github.com/browsermedia/browsercms/issues/639 + def apply_cms_namespace_to_all_core_tables + unversioned_tables.each do |table_name| + if (needs_namespacing(table_name)) + rename_table table_name, cms_(table_name) + end + end + + versioned_tables.each do |table_name| + if (needs_namespacing(table_name)) + rename_table table_name, cms_(table_name) + rename_table versioned_(table_name), cms_(versioned_(table_name)) + end + end + end + + # All tables that aren't versioned. (I.e. two tables) + def unversioned_tables + [:categories, :category_types, :connectors, :content_types, :content_type_groups, :email_messages, :group_permissions, :group_sections, :group_type_permissions, :group_types, :groups, :page_route_options, :page_routes, :permissions, :portlet_attributes, :portlets, :redirects, :section_nodes, :sections, :sites, :taggings, :tags, :tasks, :user_group_memberships, :users] + end + + def versioned_tables + [:attachments, :dynamic_views, :file_blocks, :html_blocks, :links, :pages] + end + + def needs_namespacing(table_name) + table_exists?(table_name) && !table_exists?(cms_(table_name)) + end +end diff --git a/test/dummy/db/migrate/20140204192560_devise_create_users.cms.rb b/test/dummy/db/migrate/20140204192560_devise_create_users.cms.rb new file mode 100644 index 0000000..93e6119 --- /dev/null +++ b/test/dummy/db/migrate/20140204192560_devise_create_users.cms.rb @@ -0,0 +1,48 @@ +# This migration comes from cms (originally 20131206214021) +class DeviseCreateUsers < ActiveRecord::Migration + def change + change_table(:cms_users) do |t| + ## Database authenticatable + #t.string :email, :null => false, :default => "" + t.string :encrypted_password, :null => false, :default => "" + + ## Recoverable + t.rename :reset_token, :reset_password_token + t.datetime :reset_password_sent_at + + ## Rememberable + t.rename :remember_token_expires_at, :remember_created_at + t.remove :remember_token # Not needed by devise. + + # Remove old SHA based encrypted passwords. + # Comment out the following line if you have a strong need to preserve old hashed passwords + t.remove :crypted_password + + ## Trackable + #t.integer :sign_in_count, :default => 0, :null => false + #t.datetime :current_sign_in_at + #t.datetime :last_sign_in_at + #t.string :current_sign_in_ip + #t.string :last_sign_in_ip + + ## Confirmable + # t.string :confirmation_token + # t.datetime :confirmed_at + # t.datetime :confirmation_sent_at + # t.string :unconfirmed_email # Only if using reconfirmable + + ## Lockable + # t.integer :failed_attempts, :default => 0, :null => false # Only if lock strategy is :failed_attempts + # t.string :unlock_token # Only if unlock strategy is :email or :both + # t.datetime :locked_at + + + #t.timestamps + end + + add_index :cms_users, :email, :unique => true + add_index :cms_users, :reset_password_token, :unique => true + # add_index :users, :confirmation_token, :unique => true + # add_index :users, :unlock_token, :unique => true + end +end diff --git a/test/dummy/db/migrate/20140204192561_kill_reset_password.cms.rb b/test/dummy/db/migrate/20140204192561_kill_reset_password.cms.rb new file mode 100644 index 0000000..474c1c6 --- /dev/null +++ b/test/dummy/db/migrate/20140204192561_kill_reset_password.cms.rb @@ -0,0 +1,6 @@ +# This migration comes from cms (originally 20131211223908) +class KillResetPassword < ActiveRecord::Migration + def up + Cms::Portlet.connection.execute("UPDATE cms_portlets SET type = 'DeprecatedPlaceholder' WHERE type = 'ResetPasswordPortlet'") + end +end diff --git a/test/dummy/db/migrate/20140204192562_create_cms_external_users.cms.rb b/test/dummy/db/migrate/20140204192562_create_cms_external_users.cms.rb new file mode 100644 index 0000000..e1cec0c --- /dev/null +++ b/test/dummy/db/migrate/20140204192562_create_cms_external_users.cms.rb @@ -0,0 +1,11 @@ +# This migration comes from cms (originally 20131218222005) +class CreateCmsExternalUsers < ActiveRecord::Migration + def change + change_table :cms_users do |t| + t.column :type, :string, default: 'Cms::User' + t.column :source, :string + t.text :external_data + end + + end +end diff --git a/test/dummy/db/schema.rb b/test/dummy/db/schema.rb index 919bfb7..48c4d57 100644 --- a/test/dummy/db/schema.rb +++ b/test/dummy/db/schema.rb @@ -9,74 +9,74 @@ # from scratch. The latter is a flawed and unsustainable approach (the more migrations # you'll amass, the slower it'll run and the greater likelihood for issues). # -# It's strongly recommended to check this file into your version control system. +# It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(:version => 20120511153933) do +ActiveRecord::Schema.define(version: 20140204192562) do - create_table "categories", :force => true do |t| - t.integer "category_type_id" - t.integer "parent_id" - t.string "name" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "category_types", :force => true do |t| - t.string "name" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "cms_attachment_versions", :force => true do |t| - t.integer "original_record_id" - t.integer "version" + create_table "cms_attachment_versions", force: true do |t| + t.string "data_file_name" t.string "data_file_path" t.string "file_location" t.string "data_content_type" t.integer "data_file_size" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "data_file_name" - t.boolean "published", :default => false - t.boolean "deleted", :default => false - t.boolean "archived", :default => false - t.string "version_comment" - t.integer "created_by_id" - t.integer "updated_by_id" t.string "data_fingerprint" t.string "attachable_type" t.string "attachment_name" t.integer "attachable_id" t.integer "attachable_version" t.string "cardinality" + t.integer "original_record_id" + t.integer "version" + t.boolean "published", default: false + t.boolean "deleted", default: false + t.boolean "archived", default: false + t.string "version_comment" + t.integer "created_by_id" + t.integer "updated_by_id" + t.datetime "created_at" + t.datetime "updated_at" end - add_index "cms_attachment_versions", ["original_record_id"], :name => "index_attachment_versions_on_original_record_id" + add_index "cms_attachment_versions", ["original_record_id"], name: "index_cms_attachment_versions_on_original_record_id" - create_table "cms_attachments", :force => true do |t| - t.integer "version" - t.integer "lock_version", :default => 0 + create_table "cms_attachments", force: true do |t| + t.string "data_file_name" t.string "data_file_path" t.string "file_location" t.string "data_content_type" t.integer "data_file_size" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "data_file_name" - t.boolean "published", :default => false - t.boolean "deleted", :default => false - t.boolean "archived", :default => false - t.integer "created_by_id" - t.integer "updated_by_id" t.string "data_fingerprint" t.string "attachable_type" t.string "attachment_name" t.integer "attachable_id" t.integer "attachable_version" t.string "cardinality" + t.integer "version" + t.integer "lock_version", default: 0 + t.boolean "published", default: false + t.boolean "deleted", default: false + t.boolean "archived", default: false + t.integer "created_by_id" + t.integer "updated_by_id" + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "cms_categories", force: true do |t| + t.integer "category_type_id" + t.integer "parent_id" + t.string "name" + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "cms_category_types", force: true do |t| + t.string "name" + t.datetime "created_at" + t.datetime "updated_at" end - create_table "connectors", :force => true do |t| + create_table "cms_connectors", force: true do |t| t.integer "page_id" t.integer "page_version" t.integer "connectable_id" @@ -84,68 +84,57 @@ t.integer "connectable_version" t.string "container" t.integer "position" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "connectors", ["connectable_type"], :name => "index_connectors_on_connectable_type" - add_index "connectors", ["connectable_version"], :name => "index_connectors_on_connectable_version" - add_index "connectors", ["page_id"], :name => "index_connectors_on_page_id" - add_index "connectors", ["page_version"], :name => "index_connectors_on_page_version" - - create_table "content_type_groups", :force => true do |t| - t.string "name" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - create_table "content_types", :force => true do |t| - t.string "name" - t.integer "content_type_group_id" - t.integer "priority", :default => 2 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - add_index "content_types", ["content_type_group_id"], :name => "index_content_types_on_content_type_group_id" - add_index "content_types", ["name"], :name => "index_content_types_on_name" + add_index "cms_connectors", ["connectable_type"], name: "index_cms_connectors_on_connectable_type" + add_index "cms_connectors", ["connectable_version"], name: "index_cms_connectors_on_connectable_version" + add_index "cms_connectors", ["page_id"], name: "index_cms_connectors_on_page_id" + add_index "cms_connectors", ["page_version"], name: "index_cms_connectors_on_page_version" - create_table "dynamic_view_versions", :force => true do |t| - t.integer "original_record_id" - t.integer "version" + create_table "cms_dynamic_view_versions", force: true do |t| t.string "type" t.string "name" t.string "format" t.string "handler" t.text "body" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.boolean "published", :default => false - t.boolean "deleted", :default => false - t.boolean "archived", :default => false + t.datetime "created_at" + t.datetime "updated_at" + t.integer "original_record_id" + t.integer "version" + t.boolean "published", default: false + t.boolean "deleted", default: false + t.boolean "archived", default: false t.string "version_comment" t.integer "created_by_id" t.integer "updated_by_id" + t.string "path" + t.string "locale", default: "en" + t.boolean "partial", default: false end - create_table "dynamic_views", :force => true do |t| - t.integer "version" - t.integer "lock_version", :default => 0 + create_table "cms_dynamic_views", force: true do |t| t.string "type" t.string "name" t.string "format" t.string "handler" t.text "body" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.boolean "published", :default => false - t.boolean "deleted", :default => false - t.boolean "archived", :default => false + t.datetime "created_at" + t.datetime "updated_at" + t.integer "version" + t.integer "lock_version", default: 0 + t.boolean "published", default: false + t.boolean "deleted", default: false + t.boolean "archived", default: false t.integer "created_by_id" t.integer "updated_by_id" + t.string "path" + t.string "locale", default: "en" + t.boolean "partial", default: false end - create_table "email_messages", :force => true do |t| + create_table "cms_email_messages", force: true do |t| t.string "sender" t.text "recipients" t.text "subject" @@ -154,179 +143,237 @@ t.text "body" t.string "content_type" t.datetime "delivered_at" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - create_table "file_block_versions", :force => true do |t| - t.integer "original_record_id" - t.integer "version" + create_table "cms_file_block_versions", force: true do |t| t.string "type" t.string "name" t.integer "attachment_id" t.integer "attachment_version" - t.boolean "published", :default => false - t.boolean "deleted", :default => false - t.boolean "archived", :default => false + t.integer "original_record_id" + t.integer "version" + t.boolean "published", default: false + t.boolean "deleted", default: false + t.boolean "archived", default: false t.string "version_comment" t.integer "created_by_id" t.integer "updated_by_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - add_index "file_block_versions", ["original_record_id"], :name => "index_file_block_versions_on_original_record_id" - add_index "file_block_versions", ["version"], :name => "index_file_block_versions_on_version" + add_index "cms_file_block_versions", ["original_record_id"], name: "index_cms_file_block_versions_on_original_record_id" + add_index "cms_file_block_versions", ["version"], name: "index_cms_file_block_versions_on_version" - create_table "file_blocks", :force => true do |t| - t.integer "version" - t.integer "lock_version", :default => 0 + create_table "cms_file_blocks", force: true do |t| t.string "type" t.string "name" t.integer "attachment_id" t.integer "attachment_version" - t.boolean "published", :default => false - t.boolean "deleted", :default => false - t.boolean "archived", :default => false + t.integer "version" + t.integer "lock_version", default: 0 + t.boolean "published", default: false + t.boolean "deleted", default: false + t.boolean "archived", default: false + t.integer "created_by_id" + t.integer "updated_by_id" + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "cms_file_blocks", ["deleted"], name: "index_cms_file_blocks_on_deleted" + add_index "cms_file_blocks", ["type"], name: "index_cms_file_blocks_on_type" + + create_table "cms_form_entries", force: true do |t| + t.text "data_columns" + t.integer "form_id" + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "cms_form_fields", force: true do |t| + t.integer "form_id" + t.string "label" + t.string "name" + t.string "field_type" + t.boolean "required" + t.integer "position" + t.text "instructions" + t.text "default_value" + t.text "choices" + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "cms_form_fields", ["form_id", "name"], name: "index_cms_form_fields_on_form_id_and_name", unique: true + + create_table "cms_form_versions", force: true do |t| + t.string "name" + t.text "description" + t.string "confirmation_behavior" + t.text "confirmation_text" + t.string "confirmation_redirect" + t.string "notification_email" + t.integer "original_record_id" + t.integer "version" + t.boolean "published", default: false + t.boolean "deleted", default: false + t.boolean "archived", default: false + t.string "version_comment" t.integer "created_by_id" t.integer "updated_by_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - add_index "file_blocks", ["deleted"], :name => "index_file_blocks_on_deleted" - add_index "file_blocks", ["type"], :name => "index_file_blocks_on_type" + create_table "cms_forms", force: true do |t| + t.string "name" + t.text "description" + t.string "confirmation_behavior" + t.text "confirmation_text" + t.string "confirmation_redirect" + t.string "notification_email" + t.integer "version" + t.integer "lock_version", default: 0 + t.boolean "published", default: false + t.boolean "deleted", default: false + t.boolean "archived", default: false + t.integer "created_by_id" + t.integer "updated_by_id" + t.datetime "created_at" + t.datetime "updated_at" + end - create_table "group_permissions", :force => true do |t| + create_table "cms_group_permissions", force: true do |t| t.integer "group_id" t.integer "permission_id" end - add_index "group_permissions", ["group_id", "permission_id"], :name => "index_group_permissions_on_group_id_and_permission_id" - add_index "group_permissions", ["group_id"], :name => "index_group_permissions_on_group_id" - add_index "group_permissions", ["permission_id"], :name => "index_group_permissions_on_permission_id" + add_index "cms_group_permissions", ["group_id", "permission_id"], name: "index_cms_group_permissions_on_group_id_and_permission_id" + add_index "cms_group_permissions", ["group_id"], name: "index_cms_group_permissions_on_group_id" + add_index "cms_group_permissions", ["permission_id"], name: "index_cms_group_permissions_on_permission_id" - create_table "group_sections", :force => true do |t| + create_table "cms_group_sections", force: true do |t| t.integer "group_id" t.integer "section_id" end - add_index "group_sections", ["group_id"], :name => "index_group_sections_on_group_id" - add_index "group_sections", ["section_id"], :name => "index_group_sections_on_section_id" + add_index "cms_group_sections", ["group_id"], name: "index_cms_group_sections_on_group_id" + add_index "cms_group_sections", ["section_id"], name: "index_cms_group_sections_on_section_id" - create_table "group_type_permissions", :force => true do |t| + create_table "cms_group_type_permissions", force: true do |t| t.integer "group_type_id" t.integer "permission_id" end - create_table "group_types", :force => true do |t| + create_table "cms_group_types", force: true do |t| t.string "name" - t.boolean "guest", :default => false - t.boolean "cms_access", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.boolean "guest", default: false + t.boolean "cms_access", default: false + t.datetime "created_at" + t.datetime "updated_at" end - add_index "group_types", ["cms_access"], :name => "index_group_types_on_cms_access" + add_index "cms_group_types", ["cms_access"], name: "index_cms_group_types_on_cms_access" - create_table "groups", :force => true do |t| + create_table "cms_groups", force: true do |t| t.string "name" t.string "code" t.integer "group_type_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - add_index "groups", ["code"], :name => "index_groups_on_code" - add_index "groups", ["group_type_id"], :name => "index_groups_on_group_type_id" + add_index "cms_groups", ["code"], name: "index_cms_groups_on_code" + add_index "cms_groups", ["group_type_id"], name: "index_cms_groups_on_group_type_id" - create_table "html_block_versions", :force => true do |t| + create_table "cms_html_block_versions", force: true do |t| + t.text "content", limit: 65537 t.integer "original_record_id" t.integer "version" t.string "name" - t.string "content", :limit => 65537 - t.boolean "published", :default => false - t.boolean "deleted", :default => false - t.boolean "archived", :default => false + t.boolean "published", default: false + t.boolean "deleted", default: false + t.boolean "archived", default: false t.string "version_comment" t.integer "created_by_id" t.integer "updated_by_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - add_index "html_block_versions", ["original_record_id"], :name => "index_html_block_versions_on_original_record_id" - add_index "html_block_versions", ["version"], :name => "index_html_block_versions_on_version" + add_index "cms_html_block_versions", ["original_record_id"], name: "index_cms_html_block_versions_on_original_record_id" + add_index "cms_html_block_versions", ["version"], name: "index_cms_html_block_versions_on_version" - create_table "html_blocks", :force => true do |t| + create_table "cms_html_blocks", force: true do |t| + t.text "content", limit: 65537 t.integer "version" - t.integer "lock_version", :default => 0 + t.integer "lock_version", default: 0 t.string "name" - t.string "content", :limit => 65537 - t.boolean "published", :default => false - t.boolean "deleted", :default => false - t.boolean "archived", :default => false + t.boolean "published", default: false + t.boolean "deleted", default: false + t.boolean "archived", default: false t.integer "created_by_id" t.integer "updated_by_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - add_index "html_blocks", ["deleted"], :name => "index_html_blocks_on_deleted" + add_index "cms_html_blocks", ["deleted"], name: "index_cms_html_blocks_on_deleted" - create_table "link_versions", :force => true do |t| - t.integer "original_record_id" - t.integer "version" + create_table "cms_link_versions", force: true do |t| t.string "name" t.string "url" - t.boolean "new_window", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.boolean "published", :default => false - t.boolean "deleted", :default => false - t.boolean "archived", :default => false + t.boolean "new_window", default: false + t.datetime "created_at" + t.datetime "updated_at" + t.integer "original_record_id" + t.integer "version" + t.boolean "published", default: false + t.boolean "deleted", default: false + t.boolean "archived", default: false t.string "version_comment" t.integer "created_by_id" t.integer "updated_by_id" end - create_table "links", :force => true do |t| - t.integer "version" - t.integer "lock_version", :default => 0 + create_table "cms_links", force: true do |t| t.string "name" t.string "url" - t.boolean "new_window", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.boolean "published", :default => false - t.boolean "deleted", :default => false - t.boolean "archived", :default => false + t.boolean "new_window", default: false + t.datetime "created_at" + t.datetime "updated_at" + t.integer "version" + t.integer "lock_version", default: 0 + t.boolean "published", default: false + t.boolean "deleted", default: false + t.boolean "archived", default: false t.integer "created_by_id" t.integer "updated_by_id" t.integer "latest_version" end - create_table "page_route_options", :force => true do |t| + create_table "cms_page_route_options", force: true do |t| t.integer "page_route_id" t.string "type" t.string "name" t.string "value" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - create_table "page_routes", :force => true do |t| + create_table "cms_page_routes", force: true do |t| t.string "name" t.string "pattern" t.integer "page_id" t.text "code" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - create_table "page_versions", :force => true do |t| - t.integer "original_record_id" - t.integer "version" + create_table "cms_page_versions", force: true do |t| t.string "name" t.string "title" t.string "path" @@ -334,23 +381,23 @@ t.text "description" t.text "keywords" t.string "language" - t.boolean "cacheable", :default => false - t.boolean "hidden", :default => false - t.boolean "published", :default => false - t.boolean "deleted", :default => false - t.boolean "archived", :default => false + t.boolean "cacheable", default: false + t.boolean "hidden", default: false + t.integer "original_record_id" + t.integer "version" + t.boolean "published", default: false + t.boolean "deleted", default: false + t.boolean "archived", default: false t.string "version_comment" t.integer "created_by_id" t.integer "updated_by_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - add_index "page_versions", ["original_record_id"], :name => "index_page_versions_on_original_record_id" + add_index "cms_page_versions", ["original_record_id"], name: "index_cms_page_versions_on_original_record_id" - create_table "pages", :force => true do |t| - t.integer "version" - t.integer "lock_version", :default => 0 + create_table "cms_pages", force: true do |t| t.string "name" t.string "title" t.string "path" @@ -358,146 +405,154 @@ t.text "description" t.text "keywords" t.string "language" - t.boolean "cacheable", :default => false - t.boolean "hidden", :default => false - t.boolean "published", :default => false - t.boolean "deleted", :default => false - t.boolean "archived", :default => false + t.boolean "cacheable", default: false + t.boolean "hidden", default: false + t.integer "version" + t.integer "lock_version", default: 0 + t.boolean "published", default: false + t.boolean "deleted", default: false + t.boolean "archived", default: false t.integer "created_by_id" t.integer "updated_by_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" t.integer "latest_version" end - add_index "pages", ["deleted"], :name => "index_pages_on_deleted" - add_index "pages", ["path"], :name => "index_pages_on_path" - add_index "pages", ["version"], :name => "index_pages_on_version" + add_index "cms_pages", ["deleted"], name: "index_cms_pages_on_deleted" + add_index "cms_pages", ["path"], name: "index_cms_pages_on_path" + add_index "cms_pages", ["version"], name: "index_cms_pages_on_version" - create_table "permissions", :force => true do |t| + create_table "cms_permissions", force: true do |t| t.string "name" t.string "full_name" t.string "description" t.string "for_module" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - create_table "portlet_attributes", :force => true do |t| + create_table "cms_portlet_attributes", force: true do |t| t.integer "portlet_id" t.string "name" t.text "value" end - add_index "portlet_attributes", ["portlet_id"], :name => "index_portlet_attributes_on_portlet_id" + add_index "cms_portlet_attributes", ["portlet_id"], name: "index_cms_portlet_attributes_on_portlet_id" - create_table "portlets", :force => true do |t| + create_table "cms_portlets", force: true do |t| t.string "type" t.string "name" - t.boolean "archived", :default => false - t.boolean "deleted", :default => false + t.boolean "archived", default: false + t.boolean "deleted", default: false t.integer "created_by_id" t.integer "updated_by_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - add_index "portlets", ["name"], :name => "index_portlets_on_name" + add_index "cms_portlets", ["name"], name: "index_cms_portlets_on_name" - create_table "redirects", :force => true do |t| + create_table "cms_redirects", force: true do |t| t.string "from_path" t.string "to_path" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - add_index "redirects", ["from_path"], :name => "index_redirects_on_from_path" + add_index "cms_redirects", ["from_path"], name: "index_cms_redirects_on_from_path" - create_table "section_nodes", :force => true do |t| + create_table "cms_section_nodes", force: true do |t| t.string "node_type" t.integer "node_id" t.integer "position" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false t.string "ancestry" + t.datetime "created_at" + t.datetime "updated_at" + t.string "slug" end - add_index "section_nodes", ["ancestry"], :name => "index_section_nodes_on_ancestry" - add_index "section_nodes", ["node_type"], :name => "index_section_nodes_on_node_type" + add_index "cms_section_nodes", ["ancestry"], name: "index_cms_section_nodes_on_ancestry" + add_index "cms_section_nodes", ["node_type"], name: "index_cms_section_nodes_on_node_type" - create_table "sections", :force => true do |t| + create_table "cms_sections", force: true do |t| t.string "name" t.string "path" - t.boolean "root", :default => false - t.boolean "hidden", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.boolean "root", default: false + t.boolean "hidden", default: false + t.datetime "created_at" + t.datetime "updated_at" end - add_index "sections", ["path"], :name => "index_sections_on_path" + add_index "cms_sections", ["path"], name: "index_cms_sections_on_path" - create_table "sites", :force => true do |t| + create_table "cms_sites", force: true do |t| t.string "name" t.string "domain" t.boolean "the_default" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - create_table "taggings", :force => true do |t| + create_table "cms_taggings", force: true do |t| t.integer "tag_id" t.integer "taggable_id" t.string "taggable_type" t.integer "taggable_version" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - create_table "tags", :force => true do |t| + create_table "cms_tags", force: true do |t| t.string "name" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - create_table "tasks", :force => true do |t| + create_table "cms_tasks", force: true do |t| t.integer "assigned_by_id" t.integer "assigned_to_id" t.integer "page_id" t.text "comment" t.date "due_date" t.datetime "completed_at" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - add_index "tasks", ["assigned_to_id"], :name => "index_tasks_on_assigned_to_id" - add_index "tasks", ["completed_at"], :name => "index_tasks_on_completed_at" - add_index "tasks", ["page_id"], :name => "index_tasks_on_page_id" + add_index "cms_tasks", ["assigned_to_id"], name: "index_cms_tasks_on_assigned_to_id" + add_index "cms_tasks", ["completed_at"], name: "index_cms_tasks_on_completed_at" + add_index "cms_tasks", ["page_id"], name: "index_cms_tasks_on_page_id" - create_table "user_group_memberships", :force => true do |t| + create_table "cms_user_group_memberships", force: true do |t| t.integer "user_id" t.integer "group_id" end - add_index "user_group_memberships", ["group_id"], :name => "index_user_group_memberships_on_group_id" - add_index "user_group_memberships", ["user_id"], :name => "index_user_group_memberships_on_user_id" + add_index "cms_user_group_memberships", ["group_id"], name: "index_cms_user_group_memberships_on_group_id" + add_index "cms_user_group_memberships", ["user_id"], name: "index_cms_user_group_memberships_on_user_id" - create_table "users", :force => true do |t| - t.string "login", :limit => 40 - t.string "first_name", :limit => 40 - t.string "last_name", :limit => 40 - t.string "email", :limit => 40 - t.string "crypted_password", :limit => 40 - t.string "salt", :limit => 40 + create_table "cms_users", force: true do |t| + t.string "login", limit: 40 + t.string "first_name", limit: 40 + t.string "last_name", limit: 40 + t.string "email", limit: 40 + t.string "salt", limit: 40 t.datetime "created_at" t.datetime "updated_at" t.datetime "expires_at" - t.string "remember_token", :limit => 40 - t.datetime "remember_token_expires_at" - t.string "reset_token" - end - - add_index "users", ["expires_at"], :name => "index_users_on_expires_at" - add_index "users", ["login"], :name => "index_users_on_login", :unique => true + t.datetime "remember_created_at" + t.string "reset_password_token" + t.string "encrypted_password", default: "", null: false + t.datetime "reset_password_sent_at" + t.string "type", default: "Cms::User" + t.string "source" + t.text "external_data" + end + + add_index "cms_users", ["email"], name: "index_cms_users_on_email", unique: true + add_index "cms_users", ["expires_at"], name: "index_cms_users_on_expires_at" + add_index "cms_users", ["login"], name: "index_cms_users_on_login", unique: true + add_index "cms_users", ["reset_password_token"], name: "index_cms_users_on_reset_password_token", unique: true end diff --git a/test/dummy/db/seeds.rb b/test/dummy/db/seeds.rb index 7619b93..ba18361 100644 --- a/test/dummy/db/seeds.rb +++ b/test/dummy/db/seeds.rb @@ -1,2 +1,3 @@ # Load BrowserCMS seed data + require File.expand_path('../browsercms.seeds.rb', __FILE__) diff --git a/test/dummy/lib/assets/.keep b/test/dummy/lib/assets/.keep new file mode 100644 index 0000000..e69de29 diff --git a/test/dummy/log/.keep b/test/dummy/log/.keep new file mode 100644 index 0000000..e69de29 diff --git a/test/dummy/public/404.html b/test/dummy/public/404.html new file mode 100644 index 0000000..a0daa0c --- /dev/null +++ b/test/dummy/public/404.html @@ -0,0 +1,58 @@ + + + + The page you were looking for doesn't exist (404) + + + + + +
+

The page you were looking for doesn't exist.

+

You may have mistyped the address or the page may have moved.

+
+

If you are the application owner check the logs for more information.

+ + diff --git a/test/dummy/public/422.html b/test/dummy/public/422.html new file mode 100644 index 0000000..fbb4b84 --- /dev/null +++ b/test/dummy/public/422.html @@ -0,0 +1,58 @@ + + + + The change you wanted was rejected (422) + + + + + +
+

The change you wanted was rejected.

+

Maybe you tried to change something you didn't have access to.

+
+

If you are the application owner check the logs for more information.

+ + diff --git a/test/dummy/public/500.html b/test/dummy/public/500.html new file mode 100644 index 0000000..e9052d3 --- /dev/null +++ b/test/dummy/public/500.html @@ -0,0 +1,57 @@ + + + + We're sorry, but something went wrong (500) + + + + + +
+

We're sorry, but something went wrong.

+
+

If you are the application owner check the logs for more information.

+ + diff --git a/test/dummy/script/rails b/test/dummy/script/rails deleted file mode 100755 index f8da2cf..0000000 --- a/test/dummy/script/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/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' diff --git a/test/integration/navigation_test.rb b/test/integration/navigation_test.rb new file mode 100644 index 0000000..97a94c9 --- /dev/null +++ b/test/integration/navigation_test.rb @@ -0,0 +1,10 @@ +require 'test_helper' + +class NavigationTest < ActionDispatch::IntegrationTest + fixtures :all + + # test "the truth" do + # assert true + # end +end +