From 6ea4db49feee3477c8df99ea9647e3672ac295e5 Mon Sep 17 00:00:00 2001 From: Ross Kaffenberger Date: Mon, 7 Apr 2014 13:45:07 -0400 Subject: [PATCH] rename rails app in spec directory --- Rakefile | 2 +- spec/dummy/app/models/user.rb | 11 ----------- spec/dummy/db/test.sqlite3 | Bin 28672 -> 0 bytes spec/dummy/log/.gitkeep | 0 spec/{dummy => rails_app}/README.rdoc | 0 spec/{dummy => rails_app}/Rakefile | 0 .../app/assets/javascripts/application.js | 0 .../app/assets/javascripts/home.js | 0 .../app/assets/stylesheets/application.css | 0 .../app/assets/stylesheets/home.css | 0 .../app/controllers/application_controller.rb | 0 .../app/controllers/home_controller.rb | 0 .../app/helpers/application_helper.rb | 0 .../app/helpers/home_helper.rb | 0 spec/{dummy => rails_app}/app/mailers/.gitkeep | 0 spec/{dummy => rails_app}/app/models/.gitkeep | 0 spec/rails_app/app/models/user.rb | 7 +++++++ .../app/views/home/index.html.erb | 0 .../app/views/layouts/application.html.erb | 0 spec/{dummy => rails_app}/config.ru | 0 spec/{dummy => rails_app}/config/application.rb | 0 spec/{dummy => rails_app}/config/boot.rb | 0 spec/{dummy => rails_app}/config/database.yml | 0 spec/{dummy => rails_app}/config/environment.rb | 0 .../config/environments/development.rb | 3 --- .../config/environments/production.rb | 0 .../config/environments/test.rb | 3 --- .../config/initializers/backtrace_silencers.rb | 0 .../config/initializers/devise.rb | 0 .../config/initializers/inflections.rb | 0 .../config/initializers/mime_types.rb | 0 .../config/initializers/secret_token.rb | 0 .../config/initializers/session_store.rb | 2 +- .../config/initializers/wrap_parameters.rb | 0 .../config/locales/devise.en.yml | 0 spec/{dummy => rails_app}/config/locales/en.yml | 0 spec/{dummy => rails_app}/config/routes.rb | 0 .../20140403184646_devise_create_users.rb | 0 ...19_two_factor_authentication_add_to_users.rb | 0 spec/{dummy => rails_app}/db/schema.rb | 0 spec/{dummy => rails_app}/lib/assets/.gitkeep | 0 spec/{dummy => rails_app}/public/404.html | 0 spec/{dummy => rails_app}/public/422.html | 0 spec/{dummy => rails_app}/public/500.html | 0 spec/{dummy => rails_app}/public/favicon.ico | 0 spec/{dummy => rails_app}/script/rails | 0 spec/spec_helper.rb | 2 +- 47 files changed, 10 insertions(+), 20 deletions(-) delete mode 100644 spec/dummy/app/models/user.rb delete mode 100644 spec/dummy/db/test.sqlite3 delete mode 100644 spec/dummy/log/.gitkeep rename spec/{dummy => rails_app}/README.rdoc (100%) rename spec/{dummy => rails_app}/Rakefile (100%) rename spec/{dummy => rails_app}/app/assets/javascripts/application.js (100%) rename spec/{dummy => rails_app}/app/assets/javascripts/home.js (100%) rename spec/{dummy => rails_app}/app/assets/stylesheets/application.css (100%) rename spec/{dummy => rails_app}/app/assets/stylesheets/home.css (100%) rename spec/{dummy => rails_app}/app/controllers/application_controller.rb (100%) rename spec/{dummy => rails_app}/app/controllers/home_controller.rb (100%) rename spec/{dummy => rails_app}/app/helpers/application_helper.rb (100%) rename spec/{dummy => rails_app}/app/helpers/home_helper.rb (100%) rename spec/{dummy => rails_app}/app/mailers/.gitkeep (100%) rename spec/{dummy => rails_app}/app/models/.gitkeep (100%) create mode 100644 spec/rails_app/app/models/user.rb rename spec/{dummy => rails_app}/app/views/home/index.html.erb (100%) rename spec/{dummy => rails_app}/app/views/layouts/application.html.erb (100%) rename spec/{dummy => rails_app}/config.ru (100%) rename spec/{dummy => rails_app}/config/application.rb (100%) rename spec/{dummy => rails_app}/config/boot.rb (100%) rename spec/{dummy => rails_app}/config/database.yml (100%) rename spec/{dummy => rails_app}/config/environment.rb (100%) rename spec/{dummy => rails_app}/config/environments/development.rb (88%) rename spec/{dummy => rails_app}/config/environments/production.rb (100%) rename spec/{dummy => rails_app}/config/environments/test.rb (90%) rename spec/{dummy => rails_app}/config/initializers/backtrace_silencers.rb (100%) rename spec/{dummy => rails_app}/config/initializers/devise.rb (100%) rename spec/{dummy => rails_app}/config/initializers/inflections.rb (100%) rename spec/{dummy => rails_app}/config/initializers/mime_types.rb (100%) rename spec/{dummy => rails_app}/config/initializers/secret_token.rb (100%) rename spec/{dummy => rails_app}/config/initializers/session_store.rb (80%) rename spec/{dummy => rails_app}/config/initializers/wrap_parameters.rb (100%) rename spec/{dummy => rails_app}/config/locales/devise.en.yml (100%) rename spec/{dummy => rails_app}/config/locales/en.yml (100%) rename spec/{dummy => rails_app}/config/routes.rb (100%) rename spec/{dummy => rails_app}/db/migrate/20140403184646_devise_create_users.rb (100%) rename spec/{dummy => rails_app}/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb (100%) rename spec/{dummy => rails_app}/db/schema.rb (100%) rename spec/{dummy => rails_app}/lib/assets/.gitkeep (100%) rename spec/{dummy => rails_app}/public/404.html (100%) rename spec/{dummy => rails_app}/public/422.html (100%) rename spec/{dummy => rails_app}/public/500.html (100%) rename spec/{dummy => rails_app}/public/favicon.ico (100%) rename spec/{dummy => rails_app}/script/rails (100%) diff --git a/Rakefile b/Rakefile index f09aec6..8dc1875 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,6 @@ require "bundler/gem_tasks" -APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__) +APP_RAKEFILE = File.expand_path("../spec/rails_app/Rakefile", __FILE__) load 'rails/tasks/engine.rake' desc "Run all specs in spec directory (excluding plugin specs)" diff --git a/spec/dummy/app/models/user.rb b/spec/dummy/app/models/user.rb deleted file mode 100644 index d61264f..0000000 --- a/spec/dummy/app/models/user.rb +++ /dev/null @@ -1,11 +0,0 @@ -class User < ActiveRecord::Base - # Include default devise modules. Others available are: - # :confirmable, :lockable, :timeoutable and :omniauthable - devise :two_factor_authenticatable, :database_authenticatable, :registerable, - :recoverable, :rememberable, :trackable, :validatable, - :two_factor_authenticatable - - # Setup accessible (or protected) attributes for your model - attr_accessible :email, :password, :password_confirmation, :remember_me - # attr_accessible :title, :body -end diff --git a/spec/dummy/db/test.sqlite3 b/spec/dummy/db/test.sqlite3 deleted file mode 100644 index 675301fb22efa53810414e99bea23fc7d324d334..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 28672 zcmeI&%Wm306b4|Mo7E<$q#JKXR;6Ht3X(w7O{LPtjZle62uNjRIc7?%!T@8FwyO%M zQXis=N`18M+h^$5T!g`>S)vVXEavgQ4s`vq}<0|F3$00bZa0SG_< z0uYE1m?{}XeOZ*JMVEEy=LvJi6KZ+R9Ua)#!0mC{cZbZ|xS_mh8r7CT+Gg##ZIGII zZoDVjws4I!OrmWJqLI9IPq`;%(DZRyQHvsx1K+;w(~Z6xH!|}KTGiKe<3EFwdz(9V zHqW0_DmpP6En>Fob$$9YrKmTmJiQ2u4?nDlCo-~z%;MCezBRHv@6(WXEr0ltvam57 zTl)i|XAI#OLFsW5XgWVy zh!2Zhkw~D(Vy%-$nQz&?M!L37eOF)vT?TY;OS$E6D(-gI+da3(ESFi%aKc2S%Y53S zoGg+mt(M|UI1i>+#H>x#x4o@x>!I!_svt6rgvYeU6|kD!WE7MgEpXYc2YYj|>Bj*9 z2tWV=5P$##AOHafKmY;|fWQt5VE@0vi;L1A009U<00Izz00bZa0SG_<0&{`K!8d;Y z$MXOI2tWV=5P$##AOHafKmY;|*l7Xm|95(MQ5*yy009U<00Izz00bZa0SG`K6bSzR zFF*M!i5CtCKmY;|fB*y_009U<00Izz00eeIASWmElhSdyR4$z!zbK!T&w}6ovH#zR i#YGVifB*y_009U<00Izz00bZafw{mzQhyZP|NjFFwvO!p diff --git a/spec/dummy/log/.gitkeep b/spec/dummy/log/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/spec/dummy/README.rdoc b/spec/rails_app/README.rdoc similarity index 100% rename from spec/dummy/README.rdoc rename to spec/rails_app/README.rdoc diff --git a/spec/dummy/Rakefile b/spec/rails_app/Rakefile similarity index 100% rename from spec/dummy/Rakefile rename to spec/rails_app/Rakefile diff --git a/spec/dummy/app/assets/javascripts/application.js b/spec/rails_app/app/assets/javascripts/application.js similarity index 100% rename from spec/dummy/app/assets/javascripts/application.js rename to spec/rails_app/app/assets/javascripts/application.js diff --git a/spec/dummy/app/assets/javascripts/home.js b/spec/rails_app/app/assets/javascripts/home.js similarity index 100% rename from spec/dummy/app/assets/javascripts/home.js rename to spec/rails_app/app/assets/javascripts/home.js diff --git a/spec/dummy/app/assets/stylesheets/application.css b/spec/rails_app/app/assets/stylesheets/application.css similarity index 100% rename from spec/dummy/app/assets/stylesheets/application.css rename to spec/rails_app/app/assets/stylesheets/application.css diff --git a/spec/dummy/app/assets/stylesheets/home.css b/spec/rails_app/app/assets/stylesheets/home.css similarity index 100% rename from spec/dummy/app/assets/stylesheets/home.css rename to spec/rails_app/app/assets/stylesheets/home.css diff --git a/spec/dummy/app/controllers/application_controller.rb b/spec/rails_app/app/controllers/application_controller.rb similarity index 100% rename from spec/dummy/app/controllers/application_controller.rb rename to spec/rails_app/app/controllers/application_controller.rb diff --git a/spec/dummy/app/controllers/home_controller.rb b/spec/rails_app/app/controllers/home_controller.rb similarity index 100% rename from spec/dummy/app/controllers/home_controller.rb rename to spec/rails_app/app/controllers/home_controller.rb diff --git a/spec/dummy/app/helpers/application_helper.rb b/spec/rails_app/app/helpers/application_helper.rb similarity index 100% rename from spec/dummy/app/helpers/application_helper.rb rename to spec/rails_app/app/helpers/application_helper.rb diff --git a/spec/dummy/app/helpers/home_helper.rb b/spec/rails_app/app/helpers/home_helper.rb similarity index 100% rename from spec/dummy/app/helpers/home_helper.rb rename to spec/rails_app/app/helpers/home_helper.rb diff --git a/spec/dummy/app/mailers/.gitkeep b/spec/rails_app/app/mailers/.gitkeep similarity index 100% rename from spec/dummy/app/mailers/.gitkeep rename to spec/rails_app/app/mailers/.gitkeep diff --git a/spec/dummy/app/models/.gitkeep b/spec/rails_app/app/models/.gitkeep similarity index 100% rename from spec/dummy/app/models/.gitkeep rename to spec/rails_app/app/models/.gitkeep diff --git a/spec/rails_app/app/models/user.rb b/spec/rails_app/app/models/user.rb new file mode 100644 index 0000000..743d176 --- /dev/null +++ b/spec/rails_app/app/models/user.rb @@ -0,0 +1,7 @@ +class User < ActiveRecord::Base + devise :two_factor_authenticatable, :database_authenticatable, :registerable, + :recoverable, :rememberable, :trackable, :validatable, + :two_factor_authenticatable + + has_one_time_password +end diff --git a/spec/dummy/app/views/home/index.html.erb b/spec/rails_app/app/views/home/index.html.erb similarity index 100% rename from spec/dummy/app/views/home/index.html.erb rename to spec/rails_app/app/views/home/index.html.erb diff --git a/spec/dummy/app/views/layouts/application.html.erb b/spec/rails_app/app/views/layouts/application.html.erb similarity index 100% rename from spec/dummy/app/views/layouts/application.html.erb rename to spec/rails_app/app/views/layouts/application.html.erb diff --git a/spec/dummy/config.ru b/spec/rails_app/config.ru similarity index 100% rename from spec/dummy/config.ru rename to spec/rails_app/config.ru diff --git a/spec/dummy/config/application.rb b/spec/rails_app/config/application.rb similarity index 100% rename from spec/dummy/config/application.rb rename to spec/rails_app/config/application.rb diff --git a/spec/dummy/config/boot.rb b/spec/rails_app/config/boot.rb similarity index 100% rename from spec/dummy/config/boot.rb rename to spec/rails_app/config/boot.rb diff --git a/spec/dummy/config/database.yml b/spec/rails_app/config/database.yml similarity index 100% rename from spec/dummy/config/database.yml rename to spec/rails_app/config/database.yml diff --git a/spec/dummy/config/environment.rb b/spec/rails_app/config/environment.rb similarity index 100% rename from spec/dummy/config/environment.rb rename to spec/rails_app/config/environment.rb diff --git a/spec/dummy/config/environments/development.rb b/spec/rails_app/config/environments/development.rb similarity index 88% rename from spec/dummy/config/environments/development.rb rename to spec/rails_app/config/environments/development.rb index 677b4ff..85f5319 100644 --- a/spec/dummy/config/environments/development.rb +++ b/spec/rails_app/config/environments/development.rb @@ -20,9 +20,6 @@ Dummy::Application.configure do # Only use best-standards-support built into browsers config.action_dispatch.best_standards_support = :builtin - # Raise exception on mass assignment protection for Active Record models - config.active_record.mass_assignment_sanitizer = :strict - # Do not compress assets config.assets.compress = false diff --git a/spec/dummy/config/environments/production.rb b/spec/rails_app/config/environments/production.rb similarity index 100% rename from spec/dummy/config/environments/production.rb rename to spec/rails_app/config/environments/production.rb diff --git a/spec/dummy/config/environments/test.rb b/spec/rails_app/config/environments/test.rb similarity index 90% rename from spec/dummy/config/environments/test.rb rename to spec/rails_app/config/environments/test.rb index fc10177..4feff96 100644 --- a/spec/dummy/config/environments/test.rb +++ b/spec/rails_app/config/environments/test.rb @@ -27,9 +27,6 @@ Dummy::Application.configure do # 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 config.active_support.deprecation = :stderr end diff --git a/spec/dummy/config/initializers/backtrace_silencers.rb b/spec/rails_app/config/initializers/backtrace_silencers.rb similarity index 100% rename from spec/dummy/config/initializers/backtrace_silencers.rb rename to spec/rails_app/config/initializers/backtrace_silencers.rb diff --git a/spec/dummy/config/initializers/devise.rb b/spec/rails_app/config/initializers/devise.rb similarity index 100% rename from spec/dummy/config/initializers/devise.rb rename to spec/rails_app/config/initializers/devise.rb diff --git a/spec/dummy/config/initializers/inflections.rb b/spec/rails_app/config/initializers/inflections.rb similarity index 100% rename from spec/dummy/config/initializers/inflections.rb rename to spec/rails_app/config/initializers/inflections.rb diff --git a/spec/dummy/config/initializers/mime_types.rb b/spec/rails_app/config/initializers/mime_types.rb similarity index 100% rename from spec/dummy/config/initializers/mime_types.rb rename to spec/rails_app/config/initializers/mime_types.rb diff --git a/spec/dummy/config/initializers/secret_token.rb b/spec/rails_app/config/initializers/secret_token.rb similarity index 100% rename from spec/dummy/config/initializers/secret_token.rb rename to spec/rails_app/config/initializers/secret_token.rb diff --git a/spec/dummy/config/initializers/session_store.rb b/spec/rails_app/config/initializers/session_store.rb similarity index 80% rename from spec/dummy/config/initializers/session_store.rb rename to spec/rails_app/config/initializers/session_store.rb index 952473f..6e1fcac 100644 --- a/spec/dummy/config/initializers/session_store.rb +++ b/spec/rails_app/config/initializers/session_store.rb @@ -1,6 +1,6 @@ # Be sure to restart your server when you modify this file. -Dummy::Application.config.session_store :cookie_store, key: '_dummy_session' +Dummy::Application.config.session_store :cookie_store, key: '_rails_app_session' # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information diff --git a/spec/dummy/config/initializers/wrap_parameters.rb b/spec/rails_app/config/initializers/wrap_parameters.rb similarity index 100% rename from spec/dummy/config/initializers/wrap_parameters.rb rename to spec/rails_app/config/initializers/wrap_parameters.rb diff --git a/spec/dummy/config/locales/devise.en.yml b/spec/rails_app/config/locales/devise.en.yml similarity index 100% rename from spec/dummy/config/locales/devise.en.yml rename to spec/rails_app/config/locales/devise.en.yml diff --git a/spec/dummy/config/locales/en.yml b/spec/rails_app/config/locales/en.yml similarity index 100% rename from spec/dummy/config/locales/en.yml rename to spec/rails_app/config/locales/en.yml diff --git a/spec/dummy/config/routes.rb b/spec/rails_app/config/routes.rb similarity index 100% rename from spec/dummy/config/routes.rb rename to spec/rails_app/config/routes.rb diff --git a/spec/dummy/db/migrate/20140403184646_devise_create_users.rb b/spec/rails_app/db/migrate/20140403184646_devise_create_users.rb similarity index 100% rename from spec/dummy/db/migrate/20140403184646_devise_create_users.rb rename to spec/rails_app/db/migrate/20140403184646_devise_create_users.rb diff --git a/spec/dummy/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb b/spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb similarity index 100% rename from spec/dummy/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb rename to spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb diff --git a/spec/dummy/db/schema.rb b/spec/rails_app/db/schema.rb similarity index 100% rename from spec/dummy/db/schema.rb rename to spec/rails_app/db/schema.rb diff --git a/spec/dummy/lib/assets/.gitkeep b/spec/rails_app/lib/assets/.gitkeep similarity index 100% rename from spec/dummy/lib/assets/.gitkeep rename to spec/rails_app/lib/assets/.gitkeep diff --git a/spec/dummy/public/404.html b/spec/rails_app/public/404.html similarity index 100% rename from spec/dummy/public/404.html rename to spec/rails_app/public/404.html diff --git a/spec/dummy/public/422.html b/spec/rails_app/public/422.html similarity index 100% rename from spec/dummy/public/422.html rename to spec/rails_app/public/422.html diff --git a/spec/dummy/public/500.html b/spec/rails_app/public/500.html similarity index 100% rename from spec/dummy/public/500.html rename to spec/rails_app/public/500.html diff --git a/spec/dummy/public/favicon.ico b/spec/rails_app/public/favicon.ico similarity index 100% rename from spec/dummy/public/favicon.ico rename to spec/rails_app/public/favicon.ico diff --git a/spec/dummy/script/rails b/spec/rails_app/script/rails similarity index 100% rename from spec/dummy/script/rails rename to spec/rails_app/script/rails diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 3c943c8..2c61751 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,5 +1,5 @@ ENV["RAILS_ENV"] ||= "test" -require File.expand_path("../dummy/config/environment.rb", __FILE__) +require File.expand_path("../rails_app/config/environment.rb", __FILE__) require 'two_factor_authentication'