@@ -21,30 +21,23 @@ class Pipenv implements Serializable {
21
21
* other words, it runs {@code pipenv install --dev }. Also, it removes the virtualenv
22
22
* after the last Python version has been run.
23
23
*
24
- * @param args Map of arguments. Valid arguments include:
25
- * <ul >
26
- * <li >
27
- * {@code pythonVersions }: List of Python versions to run the command
28
- * with. This argument is passed to Pipenv via {@code pipenv --python }.
29
- * See {@code pipenv --help } for supported syntax.
30
- * <strong >Required value, may not be null!</strong>
31
- * </li>
32
- * </ul>
24
+ * @param pythonVersions List of Python versions to run the command with. This argument
25
+ * is passed to Pipenv via {@code pipenv --python }. See
26
+ * {@code pipenv --help } for supported syntax.
33
27
* @param body Closure body to execute. The closure body is passed the python version
34
28
* as an argument.
35
29
* @return Map of return values. The keys in the map correspond to the Python versions
36
30
* given in {@code args.pythonVersions }, and the values are the result of
37
31
* executing the closure body.
38
32
*/
39
- Map runWith (Map args , Closure body ) {
33
+ Map runWith (List pythonVersions , Closure body ) {
40
34
assert script
41
- assert args
42
- assert args. pythonVersions
35
+ assert pythonVersions
43
36
44
37
Map result = [:]
45
38
46
39
try {
47
- args . pythonVersions. each { python ->
40
+ pythonVersions. each { python ->
48
41
script. sh " pipenv install --dev --python ${ python} "
49
42
result[python] = body(python)
50
43
}
0 commit comments