mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Updating test app running rake rails:update, tests running with failures
This commit is contained in:
parent
1bae64d8c4
commit
9ae013ae3c
16 changed files with 134 additions and 64 deletions
1
Gemfile
1
Gemfile
|
@ -3,6 +3,7 @@ source "http://rubygems.org"
|
||||||
gemspec
|
gemspec
|
||||||
|
|
||||||
gem "rails", "~> 4.0.0.beta", github: "rails/rails", branch: "master"
|
gem "rails", "~> 4.0.0.beta", github: "rails/rails", branch: "master"
|
||||||
|
gem "protected_attributes", "~> 1.0.0"
|
||||||
gem "omniauth", "~> 1.0.0"
|
gem "omniauth", "~> 1.0.0"
|
||||||
gem "omniauth-oauth2", "~> 1.0.0"
|
gem "omniauth-oauth2", "~> 1.0.0"
|
||||||
gem "rdoc"
|
gem "rdoc"
|
||||||
|
|
|
@ -112,6 +112,8 @@ GEM
|
||||||
origin (1.0.11)
|
origin (1.0.11)
|
||||||
orm_adapter (0.4.0)
|
orm_adapter (0.4.0)
|
||||||
polyglot (0.3.3)
|
polyglot (0.3.3)
|
||||||
|
protected_attributes (1.0.0)
|
||||||
|
activemodel (>= 4.0.0.beta, < 5.0)
|
||||||
rack (1.5.2)
|
rack (1.5.2)
|
||||||
rack-openid (1.3.1)
|
rack-openid (1.3.1)
|
||||||
rack (>= 1.1.0)
|
rack (>= 1.1.0)
|
||||||
|
@ -161,6 +163,7 @@ DEPENDENCIES
|
||||||
omniauth-facebook
|
omniauth-facebook
|
||||||
omniauth-oauth2 (~> 1.0.0)
|
omniauth-oauth2 (~> 1.0.0)
|
||||||
omniauth-openid (~> 1.0.1)
|
omniauth-openid (~> 1.0.1)
|
||||||
|
protected_attributes (~> 1.0.0)
|
||||||
rails (~> 4.0.0.beta)!
|
rails (~> 4.0.0.beta)!
|
||||||
rdoc
|
rdoc
|
||||||
sqlite3
|
sqlite3
|
||||||
|
|
|
@ -398,13 +398,13 @@ module ActionDispatch::Routing
|
||||||
|
|
||||||
providers = Regexp.union(mapping.to.omniauth_providers.map(&:to_s))
|
providers = Regexp.union(mapping.to.omniauth_providers.map(&:to_s))
|
||||||
|
|
||||||
match "#{path_prefix}/:provider",
|
get "#{path_prefix}/:provider",
|
||||||
:constraints => { :provider => providers },
|
:constraints => { :provider => providers },
|
||||||
:to => "#{controllers[:omniauth_callbacks]}#passthru",
|
:to => "#{controllers[:omniauth_callbacks]}#passthru",
|
||||||
:as => :omniauth_authorize,
|
:as => :omniauth_authorize,
|
||||||
:via => [:get, :post]
|
:via => [:get, :post]
|
||||||
|
|
||||||
match "#{path_prefix}/:action/callback",
|
get "#{path_prefix}/:action/callback",
|
||||||
:constraints => { :action => providers },
|
:constraints => { :action => providers },
|
||||||
:to => controllers[:omniauth_callbacks],
|
:to => controllers[:omniauth_callbacks],
|
||||||
:as => :omniauth_callback,
|
:as => :omniauth_callback,
|
||||||
|
|
|
@ -3,8 +3,4 @@
|
||||||
|
|
||||||
require File.expand_path('../config/application', __FILE__)
|
require File.expand_path('../config/application', __FILE__)
|
||||||
|
|
||||||
require 'rake'
|
|
||||||
require 'rake/testtask'
|
|
||||||
require 'rake/rdoctask'
|
|
||||||
|
|
||||||
Rails.application.load_tasks
|
Rails.application.load_tasks
|
||||||
|
|
3
test/rails_app/bin/bundle
Executable file
3
test/rails_app/bin/bundle
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
||||||
|
load Gem.bin_path('bundler', 'bundle')
|
4
test/rails_app/bin/rails
Executable file
4
test/rails_app/bin/rails
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
||||||
|
require_relative '../config/boot'
|
||||||
|
require 'rails/commands'
|
4
test/rails_app/bin/rake
Executable file
4
test/rails_app/bin/rake
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
require_relative '../config/boot'
|
||||||
|
require 'rake'
|
||||||
|
Rake.application.run
|
|
@ -2,7 +2,6 @@ require File.expand_path('../boot', __FILE__)
|
||||||
|
|
||||||
require "action_controller/railtie"
|
require "action_controller/railtie"
|
||||||
require "action_mailer/railtie"
|
require "action_mailer/railtie"
|
||||||
require "active_resource/railtie"
|
|
||||||
require "rails/test_unit/railtie"
|
require "rails/test_unit/railtie"
|
||||||
|
|
||||||
Bundler.require :default, DEVISE_ORM
|
Bundler.require :default, DEVISE_ORM
|
||||||
|
|
|
@ -2,7 +2,7 @@ unless defined?(DEVISE_ORM)
|
||||||
DEVISE_ORM = (ENV["DEVISE_ORM"] || :active_record).to_sym
|
DEVISE_ORM = (ENV["DEVISE_ORM"] || :active_record).to_sym
|
||||||
end
|
end
|
||||||
|
|
||||||
require 'rubygems'
|
# Set up gems listed in the Gemfile.
|
||||||
require 'bundler/setup'
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
|
||||||
|
|
||||||
$:.unshift File.expand_path('../../../../lib', __FILE__)
|
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Load the rails application
|
# Load the rails application.
|
||||||
require File.expand_path('../application', __FILE__)
|
require File.expand_path('../application', __FILE__)
|
||||||
|
|
||||||
# Initialize the rails application
|
# Initialize the rails application.
|
||||||
RailsApp::Application.initialize!
|
RailsApp::Application.initialize!
|
||||||
|
|
|
@ -1,18 +1,34 @@
|
||||||
RailsApp::Application.configure do
|
RailsApp::Application.configure do
|
||||||
# Settings specified here will take precedence over those in config/environment.rb
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
|
|
||||||
# In the development environment your application's code is reloaded on
|
# In the development environment your application's code is reloaded on
|
||||||
# every request. This slows down response time but is perfect for development
|
# every request. This slows down response time but is perfect for development
|
||||||
# since you don't have to restart the webserver when you make code changes.
|
# since you don't have to restart the web server when you make code changes.
|
||||||
config.cache_classes = false
|
config.cache_classes = false
|
||||||
|
|
||||||
# Log error messages when you accidentally call methods on nil.
|
# Do not eager load code on boot.
|
||||||
config.whiny_nils = true
|
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.consider_all_requests_local = true
|
||||||
config.action_controller.perform_caching = false
|
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
|
config.action_mailer.raise_delivery_errors = false
|
||||||
|
|
||||||
|
# Print deprecation notices to the Rails logger.
|
||||||
|
config.active_support.deprecation = :log
|
||||||
|
|
||||||
|
# Only use best-standards-support built into browsers.
|
||||||
|
config.action_dispatch.best_standards_support = :builtin
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# Raise an error on page load if there are pending migrations
|
||||||
|
config.active_record.migration_error = :page_load
|
||||||
|
|
||||||
|
# Debug mode disables concatenation and preprocessing of assets.
|
||||||
|
config.assets.debug = true
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,33 +1,84 @@
|
||||||
RailsApp::Application.configure do
|
RailsApp::Application.configure do
|
||||||
# Settings specified here will take precedence over those in config/environment.rb
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
|
|
||||||
# The production environment is meant for finished, "live" apps.
|
# Code is not reloaded between requests.
|
||||||
# Code is not reloaded between requests
|
|
||||||
config.cache_classes = true
|
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.consider_all_requests_local = false
|
||||||
config.action_controller.perform_caching = true
|
config.action_controller.perform_caching = true
|
||||||
|
|
||||||
# See everything in the log (default is :info)
|
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
||||||
# config.log_level = :debug
|
# 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
|
||||||
|
|
||||||
# Use a different logger for distributed setups
|
# Disable Rails's static asset server (Apache or nginx will already do this).
|
||||||
# config.logger = SyslogLogger.new
|
|
||||||
|
|
||||||
# Use a different cache store in production
|
|
||||||
# config.cache_store = :mem_cache_store
|
|
||||||
|
|
||||||
# Disable Rails's static asset server
|
|
||||||
# In production, Apache or nginx will already do this
|
|
||||||
config.serve_static_assets = false
|
config.serve_static_assets = false
|
||||||
|
|
||||||
# Enable serving of images, stylesheets, and javascripts from an asset server
|
# Compress JavaScripts and CSS.
|
||||||
|
config.assets.js_compressor = :uglifier
|
||||||
|
# config.assets.css_compressor = :sass
|
||||||
|
|
||||||
|
# Whether to fallback to assets pipeline if a precompiled asset is missed.
|
||||||
|
config.assets.compile = false
|
||||||
|
|
||||||
|
# Generate digests for assets URLs.
|
||||||
|
config.assets.digest = true
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# Set to :debug to see everything in the log.
|
||||||
|
config.log_level = :info
|
||||||
|
|
||||||
|
# Prepend all log lines with the following tags.
|
||||||
|
# config.log_tags = [ :subdomain, :uuid ]
|
||||||
|
|
||||||
|
# Use a different logger for distributed setups.
|
||||||
|
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
||||||
|
|
||||||
|
# Use a different cache store in production.
|
||||||
|
# config.cache_store = :mem_cache_store
|
||||||
|
|
||||||
|
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
||||||
# config.action_controller.asset_host = "http://assets.example.com"
|
# config.action_controller.asset_host = "http://assets.example.com"
|
||||||
|
|
||||||
# Disable delivery errors, bad email addresses will be ignored
|
# 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 )
|
||||||
|
|
||||||
|
# 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
|
# config.action_mailer.raise_delivery_errors = false
|
||||||
|
|
||||||
# Enable threaded mode
|
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||||
# config.threadsafe!
|
# the I18n.default_locale when a translation can not be found).
|
||||||
|
config.i18n.fallbacks = true
|
||||||
|
|
||||||
|
# Send deprecation notices to registered listeners.
|
||||||
|
config.active_support.deprecation = :notify
|
||||||
|
|
||||||
|
# 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
|
end
|
||||||
|
|
|
@ -1,33 +1,36 @@
|
||||||
RailsApp::Application.configure do
|
RailsApp::Application.configure do
|
||||||
# Settings specified here will take precedence over those in config/environment.rb
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
|
|
||||||
# The test environment is used exclusively to run your application's
|
# The test environment is used exclusively to run your application's
|
||||||
# test suite. You never need to work with it otherwise. Remember that
|
# test suite. You never need to work with it otherwise. Remember that
|
||||||
# your test database is "scratch space" for the test suite and is wiped
|
# your test database is "scratch space" for the test suite and is wiped
|
||||||
# and recreated between test runs. Don't rely on the data there!
|
# and recreated between test runs. Don't rely on the data there!
|
||||||
config.cache_classes = true
|
config.cache_classes = true
|
||||||
|
|
||||||
# Log error messages when you accidentally call methods on nil.
|
# Do not eager load code on boot. This avoids loading your whole application
|
||||||
config.whiny_nils = true
|
# 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
|
||||||
|
|
||||||
# Show full error reports and disable caching
|
# 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.
|
||||||
config.consider_all_requests_local = true
|
config.consider_all_requests_local = true
|
||||||
config.action_controller.perform_caching = false
|
config.action_controller.perform_caching = false
|
||||||
|
|
||||||
# Disable request forgery protection in test environment
|
# Raise exceptions instead of rendering exception templates.
|
||||||
config.action_controller.allow_forgery_protection = false
|
config.action_dispatch.show_exceptions = false
|
||||||
|
|
||||||
|
# Disable request forgery protection in test environment.
|
||||||
|
config.action_controller.allow_forgery_protection = false
|
||||||
|
|
||||||
# Tell Action Mailer not to deliver emails to the real world.
|
# Tell Action Mailer not to deliver emails to the real world.
|
||||||
# The :test delivery method accumulates sent emails in the
|
# The :test delivery method accumulates sent emails in the
|
||||||
# ActionMailer::Base.deliveries array.
|
# ActionMailer::Base.deliveries array.
|
||||||
config.action_mailer.delivery_method = :test
|
config.action_mailer.delivery_method = :test
|
||||||
|
|
||||||
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
# Print deprecation notices to the stderr.
|
||||||
# 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
|
|
||||||
|
|
||||||
config.action_dispatch.show_exceptions = false
|
|
||||||
|
|
||||||
config.active_support.deprecation = :stderr
|
config.active_support.deprecation = :stderr
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
Rails.application.config.secret_token = 'ea942c41850d502f2c8283e26bdc57829f471bb18224ddff0a192c4f32cdf6cb5aa0d82b3a7a7adbeb640c4b06f3aa1cd5f098162d8240f669b39d6b49680571'
|
RailsApp::Application.config.secret_key_base = 'd588e99efff13a86461fd6ab82327823ad2f8feb5dc217ce652cdd9f0dfc5eb4b5a62a92d24d2574d7d51dfb1ea8dd453ea54e00cf672159a13104a135422a10'
|
||||||
Rails.application.config.session_store :cookie_store, :key => "_my_app"
|
|
||||||
|
|
1
test/rails_app/config/initializers/session_store.rb
Normal file
1
test/rails_app/config/initializers/session_store.rb
Normal file
|
@ -0,0 +1 @@
|
||||||
|
RailsApp::Application.config.session_store :encrypted_cookie_store, key: '_rails_app_session'
|
|
@ -1,10 +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.
|
|
||||||
|
|
||||||
ENV_PATH = File.expand_path('../../config/environment', __FILE__)
|
|
||||||
BOOT_PATH = File.expand_path('../../config/boot', __FILE__)
|
|
||||||
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
|
||||||
ROOT_PATH = File.expand_path('../..', __FILE__)
|
|
||||||
|
|
||||||
require BOOT_PATH
|
|
||||||
require 'rails/commands'
|
|
Loading…
Reference in a new issue