emerge 0.7.3 → 0.7.4
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/README.md +2 -133
- data/lib/commands/upload/snapshots/snapshots.rb +1 -1
- data/lib/version.rb +1 -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: 7df9bc68c4aa8766d26378a7d8164770f2e0aee37dd919e3b7cf54de77b69ac5
|
4
|
+
data.tar.gz: 776950af8aa7c3cc32150a0969ac8074a62833c54b39166c48f896f1d87985e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81c866f015a8e6d6a29d107c307fefa792a210ed7d2063bb98f8cb6870357702c6a21dfcad27e72b4953ca3ba6b0df41fe1e3f4f96e33db534650ad149cef41f
|
7
|
+
data.tar.gz: e6afe32068d8068f57e211973b13309317714e4bce8a29ea22725b57557c376da8daf222b38aac46993dc451e962923882e65959fea2d206b70a695196f01e30
|
data/README.md
CHANGED
@@ -4,137 +4,6 @@ The official CLI for Emerge Tools.
|
|
4
4
|
|
5
5
|
[Emerge](https://emergetools.com) offers a suite of products to help optimize app size, performance, and quality by detecting regressions before they make it to production. This plugin provides a set of actions to interact with the Emerge API.
|
6
6
|
|
7
|
-
|
7
|
+
# Documentation
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
```
|
12
|
-
gem install emerge
|
13
|
-
```
|
14
|
-
|
15
|
-
## API Key
|
16
|
-
|
17
|
-
Follow our guide to obtain an [API key](https://docs.emergetools.com/docs/uploading-basics#obtain-an-api-key) for your organization. The API Token is used by the CLI to authenticate with the Emerge API. The CLI will automatically pick up the API key if configured as an `EMERGE_API_TOKEN` environment variable, or you can manually pass it into individual commands with the `--api-token` option.
|
18
|
-
|
19
|
-
## Snapshots
|
20
|
-
|
21
|
-
Uploads a directory of images to be used in [Emerge Snapshot Testing](https://docs.emergetools.com/docs/snapshot-testing).
|
22
|
-
|
23
|
-
Run `emerge upload snapshots -h` for a full list of supported options.
|
24
|
-
|
25
|
-
Example:
|
26
|
-
|
27
|
-
```shell
|
28
|
-
emerge upload snapshots \
|
29
|
-
--name "AwesomeApp" \
|
30
|
-
--id "com.emerge.awesomeapp" \
|
31
|
-
--repo-name "EmergeTools/AwesomeApp" \
|
32
|
-
path/to/snapshot/images
|
33
|
-
```
|
34
|
-
|
35
|
-
### Git Configuration
|
36
|
-
|
37
|
-
For CI diffs to work, Emerge needs the appropriate Git `sha` and `base_sha` values set on each build. Emerge will automatically compare a build at `sha` against the build we find matching the `base_sha` for a given application id. We also recommend setting `pr_number`, `branch`, and `repo_name` for the best experience.
|
38
|
-
|
39
|
-
For example:
|
40
|
-
|
41
|
-
- `sha`: `pr-branch-commit-1`
|
42
|
-
- `base_sha`: `main-branch-commit-1`
|
43
|
-
- `pr_number`: `42`
|
44
|
-
- `branch`: `my-awesome-feature`
|
45
|
-
- `repo_name`: `EmergeTools/hackernews`
|
46
|
-
|
47
|
-
Will compare the snapshot diffs of your pull request changes.
|
48
|
-
|
49
|
-
This plugin will automatically configure Git values for you assuming certain Github workflow triggers:
|
50
|
-
|
51
|
-
```yaml
|
52
|
-
on:
|
53
|
-
# Produce base builds with a 'sha' when commits are pushed to the main branch
|
54
|
-
push:
|
55
|
-
branches: [main]
|
56
|
-
|
57
|
-
# Produce branch comparison builds with `sha` and `base_sha` when commits are pushed
|
58
|
-
# to open pull requests
|
59
|
-
pull_request:
|
60
|
-
branches: [main]
|
61
|
-
...
|
62
|
-
```
|
63
|
-
|
64
|
-
If this doesn't cover your use-case, manually set the `sha` and `base_sha` values when calling the Emerge plugin.
|
65
|
-
|
66
|
-
### Using with swift-snapshot-testing
|
67
|
-
|
68
|
-
Snapshots generated via [swift-snapshot-testing](https://github.com/pointfreeco/swift-snapshot-testing) are natively supported by the CLI by setting `--client-library swift-snapshot-testing` and a `--project-root` directory. This will scan your project for all images found in `__Snapshot__` directories.
|
69
|
-
|
70
|
-
Example:
|
71
|
-
|
72
|
-
```shell
|
73
|
-
emerge upload snapshots \
|
74
|
-
--name "AwesomeApp swift-snapshot-testing" \
|
75
|
-
--id "com.emerge.awesomeapp.swift-snapshot-testing" \
|
76
|
-
--repo-name "EmergeTools/AwesomeApp" \
|
77
|
-
--client-library swift-snapshot-testing \
|
78
|
-
--project-root /my/awesomeapp/ios/repo
|
79
|
-
```
|
80
|
-
|
81
|
-
### Using with Paparazzi
|
82
|
-
|
83
|
-
Snapshots generated via [Paparazzi](https://github.com/cashapp/paparazzi) are natively supported by the CLI by setting `--client-library paparazzi` and a `--project-root` directory. This will scan your project for all images found in `src/test/snapshots/images` directories.
|
84
|
-
|
85
|
-
Example:
|
86
|
-
|
87
|
-
```shell
|
88
|
-
emerge upload snapshots \
|
89
|
-
--name "AwesomeApp Paparazzi" \
|
90
|
-
--id "com.emerge.awesomeapp.paparazzi" \
|
91
|
-
--repo-name "EmergeTools/AwesomeApp" \
|
92
|
-
--client-library paparazzi \
|
93
|
-
--project-root /my/awesomeapp/android/repo
|
94
|
-
```
|
95
|
-
|
96
|
-
### Using with Roborazzi
|
97
|
-
|
98
|
-
Snapshots generated via [Roborazzi](https://github.com/takahirom/roborazzi) are natively supported by the CLI by setting `--client-library roborazzi` and a `--project-root` directory. This will scan your project for all images found in `**/build/outputs/roborazzi` directories.
|
99
|
-
|
100
|
-
Example:
|
101
|
-
|
102
|
-
```shell
|
103
|
-
emerge upload snapshots \
|
104
|
-
--name "AwesomeApp Roborazzi" \
|
105
|
-
--id "com.emerge.awesomeapp.roborazzi" \
|
106
|
-
--repo-name "EmergeTools/AwesomeApp" \
|
107
|
-
--client-library roborazzi \
|
108
|
-
--project-root /my/awesomeapp/android/repo
|
109
|
-
```
|
110
|
-
|
111
|
-
## Reaper
|
112
|
-
|
113
|
-
Experimental support has been added to interactively examine [Reaper](https://docs.emergetools.com/docs/reaper) results and also **delete them from your codebase**.
|
114
|
-
|
115
|
-
Use the `reaper` subcommand to get started, e.g.:
|
116
|
-
|
117
|
-
```shell
|
118
|
-
emerge reaper --upload-id 40f1dfe7-6c57-47c3-bc52-b621aec0ba8d \
|
119
|
-
--project-root /path/to/your/repo
|
120
|
-
```
|
121
|
-
|
122
|
-
After which it will prompt you to select classes to delete.
|
123
|
-
|
124
|
-
### How it works
|
125
|
-
|
126
|
-
Under the hood we are using [Tree Sitter](https://tree-sitter.github.io/tree-sitter/) to parse your source files into an AST which is then used for deletions. There are some obvious limitations to this approach, namely that Tree Sitter is designed for source code editors and only looks at a single file at a time. We are exploring some better long-term approaches but this works well enough for now!
|
127
|
-
|
128
|
-
### Supported languages
|
129
|
-
|
130
|
-
We currently support the following languages:
|
131
|
-
|
132
|
-
- Swift
|
133
|
-
- Kotlin
|
134
|
-
- Java
|
135
|
-
|
136
|
-
Please open an issue if you need an additional language grammar.
|
137
|
-
|
138
|
-
### Building
|
139
|
-
|
140
|
-
Because many of the language grammars we use are third-party, we have to package them with our CLI tool as shared libraries for distribution. We depend on [tsdl](https://github.com/stackmystack/tsdl) to build the grammars from our `parsers.toml` file.
|
9
|
+
See [Emerge CLI](https://docs.emergetools.com/docs/emerge-cli#/) for our full documentation.
|
@@ -35,7 +35,7 @@ module EmergeCLI
|
|
35
35
|
|
36
36
|
option :profile, type: :boolean, default: false, desc: 'Enable performance profiling metrics'
|
37
37
|
|
38
|
-
option :batch, type: :boolean, default:
|
38
|
+
option :batch, type: :boolean, default: true, desc: 'Upload images in batch using zip file'
|
39
39
|
|
40
40
|
argument :image_paths, type: :array, required: false, desc: 'Paths to folders containing images'
|
41
41
|
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: emerge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emerge Tools
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-02-
|
11
|
+
date: 2025-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-http
|