playwright-cli 0.1.12 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +22 -8
- data/bin/console +1 -2
- data/exe/playwright +0 -1
- data/lib/assets/templates/expanded_script_template.erb +6 -1
- data/lib/assets/templates/simple_script_template.erb +5 -1
- data/lib/playwright/cli/commands/destroy.rb +1 -1
- data/lib/playwright/cli/commands.rb +3 -1
- data/lib/playwright/cli/utils/display.rb +1 -1
- data/lib/playwright/cli/version.rb +3 -1
- data/lib/playwright/cli.rb +0 -3
- data/playwright-cli.gemspec +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 519dc2cf7efa3932f1849ece83e9e546525970f2e745ef7a8e561dafdb87c2ed
|
4
|
+
data.tar.gz: b4cb8c9dbbd1b7aaceafcb75152e9e7def086336f7f9a68b027c98af9aaeea41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 589f5fb1130c852c15b4216fd3ece7a16839ac829a196877c756caa693eff3e622930917ac76c1021c317c31a63f1233f0bd9fbf1efbfcb0d5bd7730f95ad3f4
|
7
|
+
data.tar.gz: 77c1e3b4431dab8e293e1bdac4fb8fe33c13f8571f5536bac4767cea2c170db6a0c0222cb8864cde2fce4c7fa8e714bc32b2f1a9c0a37868e0fa5e18bd6e258c
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -17,7 +17,7 @@ Install this gem with:
|
|
17
17
|
|
18
18
|
To check the version:
|
19
19
|
```shell
|
20
|
-
$ playwright -v #=> 0.1.
|
20
|
+
$ playwright -v #=> 0.1.14
|
21
21
|
```
|
22
22
|
|
23
23
|
### Create An App
|
@@ -34,7 +34,11 @@ It will look something like this:
|
|
34
34
|
```ruby
|
35
35
|
#!/usr/bin/env ruby
|
36
36
|
|
37
|
-
require '
|
37
|
+
require 'bundler/inline'
|
38
|
+
gemfile do
|
39
|
+
source 'https://rubygems.org'
|
40
|
+
gem 'playwright-cli', require: 'playwright/cli'
|
41
|
+
end
|
38
42
|
|
39
43
|
module MyScript
|
40
44
|
module CLI
|
@@ -66,14 +70,19 @@ Playwright::CLI.new(MyScript::CLI::Commands).call
|
|
66
70
|
|
67
71
|
```
|
68
72
|
|
69
|
-
Most of this code is simply wrapping [Hanami::CLI](https://github.com/hanami/cli), so their documentation
|
70
|
-
will be the best source of information for you in handling arguments and options.
|
71
|
-
|
72
|
-
So far, only `#register_root` here is a playwright feature. It allows you to
|
73
|
-
overwrite the root command. In this case that means:
|
74
73
|
```shell
|
75
74
|
$ my-script tom #=> Why, hello tom!
|
76
75
|
```
|
76
|
+
Most of this code is simply wrapping [Hanami::CLI](https://github.com/hanami/cli), so their documentation
|
77
|
+
will be the best source of information for you in handling arguments and options.
|
78
|
+
|
79
|
+
You can list any gems you want inside the gemfile block as you would any gemfile.
|
80
|
+
You won't have to worry about running `bundle`.
|
81
|
+
|
82
|
+
All commands must implement a `#call` method and must be registered, either using
|
83
|
+
`#register` (as in the example below) or `#register_root`. `#register_root` is
|
84
|
+
for registering the base command. All subcommands are registered with `#register`,
|
85
|
+
as in the example below.
|
77
86
|
|
78
87
|
Hanami::CLI is built for more intricate command line apps, so playwright allows
|
79
88
|
you to generate that as well.
|
@@ -85,7 +94,12 @@ This will give you a mostly similar main class:
|
|
85
94
|
```ruby
|
86
95
|
#!/usr/bin/env ruby
|
87
96
|
|
88
|
-
require '
|
97
|
+
require 'bundler/inline'
|
98
|
+
gemfile do
|
99
|
+
source 'https://rubygems.org'
|
100
|
+
gem 'playwright-cli', require: 'playwright/cli'
|
101
|
+
end
|
102
|
+
|
89
103
|
require_relative 'lib/version'
|
90
104
|
|
91
105
|
module MyScript
|
data/bin/console
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require "bundler/setup"
|
4
|
-
require "hanami/cli"
|
5
4
|
require "playwright/cli"
|
6
5
|
require "pry"
|
7
6
|
|
8
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
9
8
|
# with your gem easier. You can also use a different console, if you like.
|
10
9
|
|
11
|
-
@cli =
|
10
|
+
@cli = Playwright::CLI.new(Playwright::CLI::Commands)
|
12
11
|
|
13
12
|
Pry.start
|
data/exe/playwright
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
+
require 'playwright/cli/registry'
|
2
|
+
|
1
3
|
module Playwright
|
2
4
|
class CLI < Hanami::CLI
|
3
5
|
module Commands
|
4
|
-
extend
|
6
|
+
extend Playwright::CLI::Registry
|
5
7
|
require 'playwright/cli/commands/destroy'
|
6
8
|
require 'playwright/cli/commands/edit'
|
7
9
|
require 'playwright/cli/commands/generate'
|
data/lib/playwright/cli.rb
CHANGED
data/playwright-cli.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playwright-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Gregory
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03
|
11
|
+
date: 2018-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|