Merge branch 'misc'
This commit is contained in:
@ -14,11 +14,11 @@ $(document).on('turbolinks:load', function() {
|
||||
var alternative_input = parent.find('.alternative-input');
|
||||
|
||||
if (alternative_input.attr('disabled')) {
|
||||
$(this).text($(event.target).data('text-toggled'));
|
||||
$(this).text($(event.target).first().data('text_toggled'));
|
||||
original_input.attr('disabled', true).hide();
|
||||
alternative_input.attr('disabled', false).show();
|
||||
} else {
|
||||
$(this).text($(event.target).data('text-initial'));
|
||||
$(this).text($(event.target).first().data('text_initial'));
|
||||
alternative_input.attr('disabled', true).hide();
|
||||
original_input.attr('disabled', false).show();
|
||||
}
|
||||
|
@ -22,7 +22,10 @@ class ExecutionEnvironmentsController < ApplicationController
|
||||
destroy_and_respond(object: @execution_environment)
|
||||
end
|
||||
|
||||
def edit; end
|
||||
def edit
|
||||
# Add the current execution_environment if not already present in the list
|
||||
@docker_images |= [@execution_environment.docker_image]
|
||||
end
|
||||
|
||||
def execute_command
|
||||
@docker_client = DockerClient.new(execution_environment: @execution_environment)
|
||||
|
@ -37,8 +37,11 @@ class SubmissionsController < ApplicationController
|
||||
end
|
||||
|
||||
def command_substitutions(filename)
|
||||
{class_name: File.basename(filename, File.extname(filename)).camelize, filename: filename,
|
||||
module_name: File.basename(filename, File.extname(filename)).underscore}
|
||||
{
|
||||
class_name: File.basename(filename, File.extname(filename)).upcase_first,
|
||||
filename: filename,
|
||||
module_name: File.basename(filename, File.extname(filename)).underscore,
|
||||
}
|
||||
end
|
||||
private :command_substitutions
|
||||
|
||||
|
15
docs/environment_variables.md
Normal file
15
docs/environment_variables.md
Normal file
@ -0,0 +1,15 @@
|
||||
# Environment Variables
|
||||
|
||||
The following environment variables are specifically support in CodeOcean and are used to configure the application in addition to the setting files under `config/`.
|
||||
|
||||
| Environment Variable | Default | Description |
|
||||
|- |- |- |
|
||||
| `RAILS_ENV` | `development` | Specifies the Rails environment which can be configured using the files in `config/environments` |
|
||||
| `RAILS_RELATIVE_URL_ROOT` | `/` | Specifies the subpath of the application, used for links and assets |
|
||||
| `SENTRY_DSN` | `` | Specifies the Sentry error reporting endpoint for the Rails server |
|
||||
| `RAILS_LOG_TO_STDOUT` | `false` in `production` | Enables the server to print log output to the command line |
|
||||
| `RAILS_SERVE_STATIC_FILES` | `true` in `development` and `test`<br>`false` in `production` and `staging` | Specifies whether the Rails server should be able to handle requests for non-dynamic resources (e.g., assets) |
|
||||
| `BACKTRACE` | `false` | Enables more verbose log output from framework code during debugging |
|
||||
| `TRUSTED_IP` | ` ` in `development` | Enables `BetterErrors` for the given IP addresses during development |
|
||||
| `LISTEN_ADDRESS` | `127.0.0.1` in `development` | Specifies the IP address the server should attach to during development |
|
||||
| `HEADLESS_TEST` | `false` | Enables the test environment to work without a window manager for feature tests (e.g., using Vagrant) |
|
@ -46,7 +46,7 @@ class DockerClient
|
||||
|
||||
def command_substitutions(filename)
|
||||
{
|
||||
class_name: File.basename(filename, File.extname(filename)).camelize,
|
||||
class_name: File.basename(filename, File.extname(filename)).upcase_first,
|
||||
filename: filename,
|
||||
module_name: File.basename(filename, File.extname(filename)).underscore,
|
||||
}
|
||||
|
Reference in New Issue
Block a user