transitionally downgraded to Rails 4.1 since activerecord-jdbcpostgresql-adapter is not fully compatible with Active Record 4.2
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
require File.expand_path('../boot', __FILE__)
|
||||
|
||||
require 'rails/all'
|
||||
# Pick the frameworks you want:
|
||||
require "active_model/railtie"
|
||||
require "active_record/railtie"
|
||||
require "action_controller/railtie"
|
||||
require "action_mailer/railtie"
|
||||
require "action_view/railtie"
|
||||
require "sprockets/railtie"
|
||||
# require "rails/test_unit/railtie"
|
||||
|
||||
# Require the gems listed in Gemfile, including any gems
|
||||
# you've limited to :test, :development, or :production.
|
||||
@@ -21,9 +28,6 @@ module CodeOcean
|
||||
# config.i18n.default_locale = :de
|
||||
config.i18n.available_locales = [:de, :en]
|
||||
|
||||
# Do not swallow errors in after_commit/after_rollback callbacks.
|
||||
config.active_record.raise_in_transactional_callbacks = true
|
||||
|
||||
config.autoload_paths << Rails.root.join('lib')
|
||||
config.eager_load_paths << Rails.root.join('lib')
|
||||
end
|
||||
|
@@ -1,3 +1,4 @@
|
||||
# Set up gems listed in the Gemfile.
|
||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
||||
|
||||
require 'bundler/setup' # Set up gems listed in the Gemfile.
|
||||
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
||||
|
@@ -13,6 +13,8 @@ Rails.application.configure do
|
||||
config.consider_all_requests_local = true
|
||||
config.action_controller.perform_caching = false
|
||||
|
||||
config.action_mailer.perform_deliveries = true
|
||||
|
||||
# Don't care if the mailer can't send.
|
||||
config.action_mailer.raise_delivery_errors = false
|
||||
|
||||
@@ -22,15 +24,6 @@ Rails.application.configure do
|
||||
# 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.
|
||||
# This option may cause significant delays in view rendering with a large
|
||||
# number of complex assets.
|
||||
config.assets.debug = true
|
||||
|
||||
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
||||
# yet still be able to expire them through the digest params.
|
||||
config.assets.digest = true
|
||||
|
||||
# Adds additional error checking when serving assets at runtime.
|
||||
# Checks for improperly declared sprockets dependencies.
|
||||
# Raises helpful error messages.
|
||||
|
@@ -16,13 +16,11 @@ Rails.application.configure do
|
||||
|
||||
# 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.
|
||||
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
|
||||
# config.action_dispatch.rack_cache = true
|
||||
|
||||
# Disable serving static files from the `/public` folder by default since
|
||||
# Apache or NGINX already handles this.
|
||||
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
||||
# Disable Rails's static asset server (Apache or nginx will already do this).
|
||||
config.serve_static_assets = false
|
||||
|
||||
# Compress JavaScripts and CSS.
|
||||
config.assets.js_compressor = :uglifier
|
||||
@@ -31,22 +29,21 @@ Rails.application.configure do
|
||||
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
||||
config.assets.compile = false
|
||||
|
||||
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
||||
# yet still be able to expire them through the digest params.
|
||||
# Generate digests for assets URLs.
|
||||
config.assets.digest = true
|
||||
|
||||
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
||||
# 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
|
||||
# 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
|
||||
|
||||
# Use the lowest log level to ensure availability of diagnostic information
|
||||
# when problems arise.
|
||||
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.
|
||||
# config.log_tags = [ :subdomain, :uuid ]
|
||||
@@ -58,7 +55,11 @@ Rails.application.configure do
|
||||
# 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"
|
||||
|
||||
# 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.
|
||||
@@ -71,6 +72,9 @@ Rails.application.configure do
|
||||
# Send deprecation notices to registered listeners.
|
||||
config.active_support.deprecation = :notify
|
||||
|
||||
# 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
|
||||
|
||||
|
@@ -12,8 +12,8 @@ Rails.application.configure do
|
||||
# preloads Rails for running tests, you may have to set it to true.
|
||||
config.eager_load = false
|
||||
|
||||
# Configure static file server for tests with Cache-Control for performance.
|
||||
config.serve_static_files = 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.
|
||||
@@ -31,9 +31,6 @@ Rails.application.configure do
|
||||
# ActionMailer::Base.deliveries array.
|
||||
config.action_mailer.delivery_method = :test
|
||||
|
||||
# Randomize the order test cases are executed.
|
||||
config.active_support.test_order = :random
|
||||
|
||||
# Print deprecation notices to the stderr.
|
||||
config.active_support.deprecation = :stderr
|
||||
|
||||
|
@@ -1,11 +0,0 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Version of your assets, change this if you want to expire all your assets.
|
||||
Rails.application.config.assets.version = '1.0'
|
||||
|
||||
# Add additional assets to the asset load path
|
||||
# Rails.application.config.assets.paths << Emoji.images_path
|
||||
|
||||
# Precompile additional assets.
|
||||
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
||||
# Rails.application.config.assets.precompile += %w( search.js )
|
@@ -1,3 +1,3 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
Rails.application.config.session_store :cookie_store, key: '_CodeOcean_session'
|
||||
Rails.application.config.session_store :cookie_store, key: '_hands-on-programming_session'
|
||||
|
@@ -1,20 +1,20 @@
|
||||
FILENAME_REGEXP = /[\w\.]+/ unless Kernel.const_defined?(:FILENAME_REGEXP)
|
||||
|
||||
Rails.application.routes.draw do
|
||||
root 'application#welcome'
|
||||
root to: 'application#welcome'
|
||||
|
||||
namespace :admin do
|
||||
get 'dashboard' => 'dashboard#show'
|
||||
get 'dashboard', to: 'dashboard#show'
|
||||
end
|
||||
|
||||
get '/help' => 'application#help'
|
||||
get '/help', to: 'application#help'
|
||||
|
||||
resources :consumers
|
||||
|
||||
resources :execution_environments do
|
||||
member do
|
||||
get :shell
|
||||
post 'shell' => :execute_command, as: :execute_command
|
||||
post 'shell', as: :execute_command, to: :execute_command
|
||||
end
|
||||
|
||||
resources :errors, only: [:create, :index, :show]
|
||||
@@ -40,29 +40,29 @@ Rails.application.routes.draw do
|
||||
|
||||
resources :internal_users do
|
||||
member do
|
||||
match 'activate' => 'internal_users#activate', via: [:get, :patch, :put]
|
||||
match 'reset_password' => 'internal_users#reset_password', via: [:get, :patch, :put]
|
||||
match 'activate', to: 'internal_users#activate', via: [:get, :patch, :put]
|
||||
match 'reset_password', to: 'internal_users#reset_password', via: [:get, :patch, :put]
|
||||
end
|
||||
end
|
||||
|
||||
match '/forgot_password' => 'internal_users#forgot_password', as: 'forgot_password', via: [:get, :post]
|
||||
match '/forgot_password', as: 'forgot_password', to: 'internal_users#forgot_password', via: [:get, :post]
|
||||
|
||||
resources :sessions, only: [:create, :destroy, :new]
|
||||
|
||||
post '/lti/launch' => 'sessions#create_through_lti', as: 'lti_launch'
|
||||
get '/lti/return' => 'sessions#destroy_through_lti', as: 'lti_return'
|
||||
get '/sign_in' => 'sessions#new', as: 'sign_in'
|
||||
delete '/sign_out' => 'sessions#destroy', as: 'sign_out'
|
||||
post '/lti/launch', as: 'lti_launch', to: 'sessions#create_through_lti'
|
||||
get '/lti/return', as: 'lti_return', to: 'sessions#destroy_through_lti'
|
||||
get '/sign_in', as: 'sign_in', to: 'sessions#new'
|
||||
delete '/sign_out', as: 'sign_out', to: 'sessions#destroy'
|
||||
|
||||
resources :submissions, only: [:create, :index, :show] do
|
||||
member do
|
||||
get 'download/:filename' => :download_file, as: :download, constraints: {filename: FILENAME_REGEXP}
|
||||
get 'render/:filename' => :render_file, as: :render, constraints: {filename: FILENAME_REGEXP}
|
||||
get 'run/:filename' => :run, as: :run, constraints: {filename: FILENAME_REGEXP}
|
||||
get 'download/:filename', as: :download, constraints: {filename: FILENAME_REGEXP}, to: :download_file
|
||||
get 'render/:filename', as: :render, constraints: {filename: FILENAME_REGEXP}, to: :render_file
|
||||
get 'run/:filename', as: :run, constraints: {filename: FILENAME_REGEXP}, to: :run
|
||||
get :score
|
||||
get :statistics
|
||||
post :stop
|
||||
get 'test/:filename' => :test, as: :test, constraints: {filename: FILENAME_REGEXP}
|
||||
get 'test/:filename', as: :test, constraints: {filename: FILENAME_REGEXP}, to: :test
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user