playwright-cli 0.1.17 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/playwright/cli/commands/generate.rb +7 -3
- data/lib/playwright/cli/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 157148cc31918fb5d7f860dc144610f10c80c14c742fbcd8f3617d3ea93f7373
|
4
|
+
data.tar.gz: 508d6c45521825d33c856fa2cbe491c67427cbc249ee9426cfe6b606d45f0576
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f30f8b651de1af35bdf71bdc32f2dd17054f51916cd0ca3fae23e347ef31cdc3fdc56702857f74d42fc7dcb01c3d1dec3b24ec095c1d0d6e24478c0d6e2537ee
|
7
|
+
data.tar.gz: 4e6f5fe7066482e17e4d30190da0d1309eb6fcad2529e79416511add9dc128b445c9fd779405851af8a5c834503230d1a27777434d0718a96b0cec20047b3d40
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -106,7 +106,7 @@ as in the example below.
|
|
106
106
|
Hanami::CLI is built for more intricate command line apps, so playwright allows
|
107
107
|
you to generate that as well.
|
108
108
|
```shell
|
109
|
-
$ playwright g my-script --
|
109
|
+
$ playwright g my-script --expanded
|
110
110
|
```
|
111
111
|
This will give you a mostly similar main class:
|
112
112
|
|
@@ -9,14 +9,18 @@ module Playwright
|
|
9
9
|
desc "Builds a template for a new playwright command."
|
10
10
|
|
11
11
|
argument :name, required: true, desc: 'Script name'
|
12
|
-
option :type, default:
|
12
|
+
option :expanded, type: :boolean, default: false, desc: 'Use this if you will have subcommands'
|
13
13
|
|
14
14
|
example [
|
15
15
|
"my-new-script\n# script will be called with my-new-script\n# class will be called MyNewScript"
|
16
16
|
]
|
17
17
|
|
18
|
-
def call(name:,
|
19
|
-
Command.run(name, type
|
18
|
+
def call(name:, expanded:, **)
|
19
|
+
Command.run(name, type(expanded))
|
20
|
+
end
|
21
|
+
|
22
|
+
def type expanded
|
23
|
+
expanded ? :expanded : :simple
|
20
24
|
end
|
21
25
|
end
|
22
26
|
|