Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

we need bundle exec for thor :-( #922

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ A number of changes all wrapped up in one large PR https://github.com/o19s/quepi

## 7.12.3 - 2023-12-05

* Restore `thor` based scripts by letting you run `docker compose run app bin/thor list` to see all the thor scripts available for interacting with Quepid. https://github.com/o19s/quepid/pull/904 by @epugh, reported by @vincetrumental in https://github.com/o19s/quepid/issues/888.
* Restore `thor` based scripts by letting you run `docker compose run app bundle exec thor list` to see all the thor scripts available for interacting with Quepid. https://github.com/o19s/quepid/pull/904 by @epugh, reported by @vincetrumental in https://github.com/o19s/quepid/issues/888.

* Bump splainer-search to 2.30.7 to pass through basic auth properties to Solr.

Expand Down
46 changes: 2 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,52 +347,10 @@ bin/docker r bin/rake test:jshint
The see available tasks:

```
bin/docker r thor list
bin/docker r bundle exec thor list
```

Examples include:

```
case
----
thor case:create NAME ... # creates a new case
thor case:share CASEID TEAMID # shares case with an team

ratings
-------
thor ratings:generate SOLRURL FILENAME # generates random ratings into a .csv file
thor ratings:import CASEID FILENAME # imports ratings to a case

user
----
thor user:create EMAIL USERNAME PASSWORD # creates a new user
thor user:grant_administrator EMAIL # grant administrator privileges to user
thor user:reset_password EMAIL NEWPASSWORD # resets user's password
```

To see more details about any of the tasks, run `bin/docker r thor help TASKNAME`:

```
thor help user:create
Usage:
thor user:create EMAIL USERNAME PASSWORD

Options:
-a, [--administrator], [--no-administrator]

Description:
`user:create` creates a new user with the passed in email, name and password.

EXAMPLES:

$ thor user:create foo@example.com "Eric Pugh" mysuperstrongpassword

With -a option, will mark the user as Administrator

EXAMPLES:

$ thor user:create -a admin@example.com Administrator mysuperstrongpassword
```
Additional documentation is in [Operating Documentation](docs/operating_documentation.md#scripting-users-cases-ratings).

# Elasticsearch

Expand Down
54 changes: 54 additions & 0 deletions docs/operating_documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ This document explains how Quepid can be operated and configured.
- [Database Management](#database-management)
- [Jupyterlite Notebooks](#jupyterlite-notebooks)
- [Using Personal Access Tokens](#using-personal-access-tokens)
- [Scripting Users Cases Ratings](#scripting-users-cases-ratings)

## Running behind a load balancer

> ⚠️ _Quepid will run in TLS (`https`) or plain `http` mode depending on the
Expand Down Expand Up @@ -236,3 +238,55 @@ curl -X POST http://localhost:3000/api/books/2/judgements/ -H 'Authorization: Be
}
}'
```

## Scripting Users Cases Ratings

The see available tasks:

```
docker compose run app bundle exec thor list
```

Examples include:

```
case
----
thor case:create NAME ... # creates a new case
thor case:share CASEID TEAMID # shares case with an team

ratings
-------
thor ratings:generate SOLRURL FILENAME # generates random ratings into a .csv file
thor ratings:import CASEID FILENAME # imports ratings to a case

user
----
thor user:create EMAIL USERNAME PASSWORD # creates a new user
thor user:grant_administrator EMAIL # grant administrator privileges to user
thor user:reset_password EMAIL NEWPASSWORD # resets user's password
```

To see more details about any of the tasks, run `bin/docker r bundle exec thor help TASKNAME`:

```
thor help user:create
Usage:
thor user:create EMAIL USERNAME PASSWORD

Options:
-a, [--administrator], [--no-administrator]

Description:
`user:create` creates a new user with the passed in email, name and password.

EXAMPLES:

$ thor user:create foo@example.com "Eric Pugh" mysuperstrongpassword

With -a option, will mark the user as Administrator

EXAMPLES:

$ thor user:create -a admin@example.com Administrator mysuperstrongpassword
```