Skip to content

Commit 81bc463

Browse files
authored
Merge pull request #29 from drgrice1/renderer-no-app
Remove "App" from the app name.
2 parents d5a1000 + 07d5e17 commit 81bc463

File tree

16 files changed

+48
-49
lines changed

16 files changed

+48
-49
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*.DS_Store
2-
render_app.conf
2+
renderer.conf
33
lib/.pls-tmp-*
44
webwork-open-problem-library
55
private

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ RUN cpanm install Mojo::Base Statistics::R::IO::Rserve Date::Format Future::Asyn
5151

5252
COPY . .
5353

54-
RUN cp render_app.conf.dist render_app.conf
54+
RUN cp renderer.conf.dist renderer.conf
5555

5656
RUN cp conf/pg_config.yml lib/PG/conf/pg_config.yml
5757

@@ -63,4 +63,4 @@ EXPOSE 3000
6363

6464
HEALTHCHECK CMD curl -I localhost:3000/health
6565

66-
CMD hypnotoad -f ./script/render_app
66+
CMD hypnotoad -f ./script/renderer

Dockerfile_with_OPL

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ RUN rm -r webwork-open-problem-library-master/
6262

6363
COPY . .
6464

65-
RUN cp render_app.conf.dist render_app.conf
65+
RUN cp renderer.conf.dist renderer.conf
6666

6767
RUN cp conf/pg_config.yml lib/PG/conf/pg_config.yml
6868

@@ -74,4 +74,4 @@ EXPOSE 3000
7474

7575
HEALTHCHECK CMD curl -I localhost:3000/health
7676

77-
CMD hypnotoad -f ./script/render_app
77+
CMD hypnotoad -f ./script/renderer

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ A default configuration file is included in the container, but it can be overrid
3636
application root. This is necessary if, for example, you want to run the container in `production` mode.
3737

3838
```bash
39-
--mount type=bind,source=/pathToYour/render_app.conf,target=/usr/app/render_app.conf \
39+
--mount type=bind,source=/pathToYour/renderer.conf,target=/usr/app/renderer.conf \
4040
```
4141

4242
## LOCAL INSTALL
@@ -48,7 +48,7 @@ If using a local install instead of docker:
4848
- Install Perl dependencies listed in Dockerfile (CPANMinus recommended)
4949
- clone webwork-open-problem-library into the provided stub ./webwork-open-problem-library
5050
- `git clone https://github.com/openwebwork/webwork-open-problem-library ./webwork-open-problem-library`
51-
- copy `render_app.conf.dist` to `render_app.conf` and make any desired modifications
51+
- copy `renderer.conf.dist` to `renderer.conf` and make any desired modifications
5252
- copy `conf/pg_config.yml` to `lib/PG/pg_config.yml` and make any desired modifications
5353
- install third party JavaScript dependencies
5454
- `cd public/`
@@ -57,7 +57,7 @@ If using a local install instead of docker:
5757
- install PG JavaScript dependencies
5858
- `cd lib/PG/htdocs`
5959
- `npm ci`
60-
- start the app with `morbo ./script/render_app` or `morbo -l http://localhost:3000 ./script/render_app` if changing
60+
- start the app with `morbo ./script/renderer` or `morbo -l http://localhost:3000 ./script/renderer` if changing
6161
root url
6262
- access on `localhost:3000` by default or otherwise specified root url
6363

@@ -111,12 +111,12 @@ The bare minimum of parameters that must be included are:
111111

112112
### Infrastructure Parameters
113113

114-
The defaults for these parameters are set in `render_app.conf`, but these can be overridden on a per-request basis.
114+
The defaults for these parameters are set in `renderer.conf`, but these can be overridden on a per-request basis.
115115

116-
| Key | Type | Default Value | Description | Notes |
117-
| ------- | ------ | ------------------------------------------- | --------------------------- | ----- |
118-
| baseURL | string | '/' (as set in `render_app.conf`) | the URL for relative paths | |
119-
| formURL | string | '/render-api' (as set in `render_app.conf`) | the URL for form submission | |
116+
| Key | Type | Default Value | Description | Notes |
117+
| ------- | ------ | ----------------------------------------- | --------------------------- | ----- |
118+
| baseURL | string | '/' (as set in `renderer.conf`) | the URL for relative paths | |
119+
| formURL | string | '/render-api' (as set in `renderer.conf`) | the URL for form submission | |
120120

121121
### Display Parameters
122122

docs/make_translation_files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
```bash
88
cd lib
9-
xgettext.pl -o WeBWorK/Localize/standalone.pot -D PG/lib -D PG/macros -D RenderApp -D WeBWorK RenderApp.pm
9+
xgettext.pl -o WeBWorK/Localize/standalone.pot -D PG/lib -D PG/macros -D Renderer -D WeBWorK Renderer.pm
1010
```
1111

1212
- That creates the POT file of all strings found

lib/RenderApp.pm renamed to lib/Renderer.pm

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package RenderApp;
1+
package Renderer;
22
use Mojo::Base 'Mojolicious';
33

44
BEGIN {
@@ -16,18 +16,17 @@ BEGIN {
1616
$ENV{OPL_DIRECTORY} = "$ENV{RENDER_ROOT}/webwork-open-problem-library";
1717

1818
$ENV{MOJO_CONFIG} =
19-
(-r "$ENV{RENDER_ROOT}/render_app.conf")
20-
? "$ENV{RENDER_ROOT}/render_app.conf"
21-
: "$ENV{RENDER_ROOT}/render_app.conf.dist";
19+
(-r "$ENV{RENDER_ROOT}/renderer.conf")
20+
? "$ENV{RENDER_ROOT}/renderer.conf"
21+
: "$ENV{RENDER_ROOT}/renderer.conf.dist";
2222
$ENV{MOJO_LOG_LEVEL} = 'debug';
2323
}
2424

2525
use lib "$main::libname";
2626
print "using root directory: $ENV{RENDER_ROOT}\n";
2727

28-
use RenderApp::Model::Problem;
29-
use RenderApp::Controller::IO;
30-
use WeBWorK::RenderProblem;
28+
use Renderer::Model::Problem;
29+
use Renderer::Controller::IO;
3130
use WeBWorK::FormatRenderedProblem;
3231

3332
sub startup {
@@ -115,15 +114,15 @@ sub startup {
115114
}
116115

117116
# Models
118-
$self->helper(newProblem => sub { shift; RenderApp::Model::Problem->new(@_) });
117+
$self->helper(newProblem => sub { shift; Renderer::Model::Problem->new(@_) });
119118

120119
# Helpers
121120
$self->helper(format => sub { WeBWorK::FormatRenderedProblem::formatRenderedProblem(@_) });
122-
$self->helper(validateRequest => sub { RenderApp::Controller::IO::validate(@_) });
123-
$self->helper(parseRequest => sub { RenderApp::Controller::Render::parseRequest(@_) });
124-
$self->helper(croak => sub { RenderApp::Controller::Render::croak(@_) });
121+
$self->helper(validateRequest => sub { Renderer::Controller::IO::validate(@_) });
122+
$self->helper(parseRequest => sub { Renderer::Controller::Render::parseRequest(@_) });
123+
$self->helper(croak => sub { Renderer::Controller::Render::croak(@_) });
125124
$self->helper(logID => sub { shift->req->request_id });
126-
$self->helper(exception => sub { RenderApp::Controller::Render::exception(@_) });
125+
$self->helper(exception => sub { Renderer(@_) });
127126

128127
# Routes
129128
# baseURL sets the root at which the renderer is listening,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package RenderApp::Controller::IO;
1+
package Renderer::Controller::IO;
22
use Mojo::Base -async_await;
33
use Mojo::Base 'Mojolicious::Controller';
44
use File::Spec::Functions qw(splitdir);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package RenderApp::Controller::Pages;
1+
package Renderer::Controller::Pages;
22
use Mojo::Base 'Mojolicious::Controller';
33

44
sub twocolumn {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package RenderApp::Controller::Render;
1+
package Renderer::Controller::Render;
22
use Mojo::Base 'Mojolicious::Controller', -async_await;
33

44
use Mojo::JSON qw(encode_json decode_json);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package RenderApp::Controller::StaticFiles;
1+
package Renderer::Controller::StaticFiles;
22
use Mojo::Base 'Mojolicious::Controller', -signatures;
33

44
use Mojo::File qw(path);

0 commit comments

Comments
 (0)