Skip to content

Commit

Permalink
we need bundle exec for thor :-( (#922)
Browse files Browse the repository at this point in the history
  • Loading branch information
epugh authored Jan 18, 2024
1 parent 56c1c48 commit e158050
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 45 deletions.
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
```

0 comments on commit e158050

Please sign in to comment.