Skip to content

Commit 54a0607

Browse files
committed
Add script to regenerate mock data
Signed-off-by: Keshav Priyadarshi <[email protected]>
1 parent 17a1d4c commit 54a0607

25 files changed

+1213
-667
lines changed

tests/data/package_versions/cargo.json

+8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
[
2+
{
3+
"value": "0.2.0",
4+
"release_date": "2023-11-13T15:21:46.464930+00:00"
5+
},
6+
{
7+
"value": "0.1.1",
8+
"release_date": "2023-11-12T17:01:58.462018+00:00"
9+
},
210
{
311
"value": "0.1.0",
412
"release_date": "2023-09-11T15:54:25.449371+00:00"

tests/data/package_versions/cargo_mock_data.json

+92-8
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"created_at": "2023-09-11T15:54:25.449371+00:00",
77
"description": "A modifying, multiplexer tcp proxy server tool and library.",
88
"documentation": null,
9-
"downloads": 18,
9+
"downloads": 118,
1010
"exact_match": false,
1111
"homepage": null,
1212
"id": "yprox",
@@ -19,19 +19,103 @@
1919
"version_downloads": "/api/v1/crates/yprox/downloads",
2020
"versions": null
2121
},
22-
"max_stable_version": "0.1.0",
23-
"max_version": "0.1.0",
22+
"max_stable_version": "0.2.0",
23+
"max_version": "0.2.0",
2424
"name": "yprox",
25-
"newest_version": "0.1.0",
26-
"recent_downloads": 18,
27-
"repository": null,
28-
"updated_at": "2023-09-11T15:54:25.449371+00:00",
25+
"newest_version": "0.2.0",
26+
"recent_downloads": 118,
27+
"repository": "https://github.com/fcoury/yprox",
28+
"updated_at": "2023-11-13T15:21:46.464930+00:00",
2929
"versions": [
30+
953512,
31+
952742,
3032
894733
3133
]
3234
},
3335
"keywords": [],
3436
"versions": [
37+
{
38+
"audit_actions": [
39+
{
40+
"action": "publish",
41+
"time": "2023-11-13T15:21:46.464930+00:00",
42+
"user": {
43+
"avatar": "https://avatars.githubusercontent.com/u/1371?v=4",
44+
"id": 113702,
45+
"login": "fcoury",
46+
"name": "Felipe Coury",
47+
"url": "https://github.com/fcoury"
48+
}
49+
}
50+
],
51+
"checksum": "c950eefceec79e4328d5311c771d27fe0616e4a34f48c783d1d34d37bd243fde",
52+
"crate": "yprox",
53+
"crate_size": 37493,
54+
"created_at": "2023-11-13T15:21:46.464930+00:00",
55+
"dl_path": "/api/v1/crates/yprox/0.2.0/download",
56+
"downloads": 36,
57+
"features": {},
58+
"id": 953512,
59+
"license": "MIT",
60+
"links": {
61+
"authors": "/api/v1/crates/yprox/0.2.0/authors",
62+
"dependencies": "/api/v1/crates/yprox/0.2.0/dependencies",
63+
"version_downloads": "/api/v1/crates/yprox/0.2.0/downloads"
64+
},
65+
"num": "0.2.0",
66+
"published_by": {
67+
"avatar": "https://avatars.githubusercontent.com/u/1371?v=4",
68+
"id": 113702,
69+
"login": "fcoury",
70+
"name": "Felipe Coury",
71+
"url": "https://github.com/fcoury"
72+
},
73+
"readme_path": "/api/v1/crates/yprox/0.2.0/readme",
74+
"rust_version": null,
75+
"updated_at": "2023-11-13T15:21:46.464930+00:00",
76+
"yanked": false
77+
},
78+
{
79+
"audit_actions": [
80+
{
81+
"action": "publish",
82+
"time": "2023-11-12T17:01:58.462018+00:00",
83+
"user": {
84+
"avatar": "https://avatars.githubusercontent.com/u/1371?v=4",
85+
"id": 113702,
86+
"login": "fcoury",
87+
"name": "Felipe Coury",
88+
"url": "https://github.com/fcoury"
89+
}
90+
}
91+
],
92+
"checksum": "10d1df08ed79ac292fad32cda2963a76e9a55f47b9e0ab8dfca4c1f41b90857f",
93+
"crate": "yprox",
94+
"crate_size": 40059,
95+
"created_at": "2023-11-12T17:01:58.462018+00:00",
96+
"dl_path": "/api/v1/crates/yprox/0.1.1/download",
97+
"downloads": 32,
98+
"features": {},
99+
"id": 952742,
100+
"license": "MIT",
101+
"links": {
102+
"authors": "/api/v1/crates/yprox/0.1.1/authors",
103+
"dependencies": "/api/v1/crates/yprox/0.1.1/dependencies",
104+
"version_downloads": "/api/v1/crates/yprox/0.1.1/downloads"
105+
},
106+
"num": "0.1.1",
107+
"published_by": {
108+
"avatar": "https://avatars.githubusercontent.com/u/1371?v=4",
109+
"id": 113702,
110+
"login": "fcoury",
111+
"name": "Felipe Coury",
112+
"url": "https://github.com/fcoury"
113+
},
114+
"readme_path": "/api/v1/crates/yprox/0.1.1/readme",
115+
"rust_version": null,
116+
"updated_at": "2023-11-12T17:01:58.462018+00:00",
117+
"yanked": false
118+
},
35119
{
36120
"audit_actions": [
37121
{
@@ -51,7 +135,7 @@
51135
"crate_size": 39483,
52136
"created_at": "2023-09-11T15:54:25.449371+00:00",
53137
"dl_path": "/api/v1/crates/yprox/0.1.0/download",
54-
"downloads": 18,
138+
"downloads": 50,
55139
"features": {},
56140
"id": 894733,
57141
"license": "MIT",

tests/data/package_versions/composer.json

+16
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
"value": "10.2.1",
4848
"release_date": "2023-05-12T18:39:56+00:00"
4949
},
50+
{
51+
"value": "10.2.10",
52+
"release_date": "2023-11-30T22:35:41+00:00"
53+
},
5054
{
5155
"value": "10.2.2",
5256
"release_date": "2023-05-23T21:45:40+00:00"
@@ -67,6 +71,18 @@
6771
"value": "10.2.6",
6872
"release_date": "2023-08-10T07:19:31+00:00"
6973
},
74+
{
75+
"value": "10.2.7",
76+
"release_date": "2023-10-31T14:38:55+00:00"
77+
},
78+
{
79+
"value": "10.2.8",
80+
"release_date": "2023-11-02T13:42:28+00:00"
81+
},
82+
{
83+
"value": "10.2.9",
84+
"release_date": "2023-11-13T16:36:45+00:00"
85+
},
7086
{
7187
"value": "4.0.0",
7288
"release_date": "2013-05-28T16:28:05+00:00"

0 commit comments

Comments
 (0)