spacex 1.0.2 → 2.0.0
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 +5 -5
- data/.github/workflows/ruby.yml +26 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +6 -0
- data/.rubocop_todo.yml +1 -1
- data/CHANGELOG.md +54 -1
- data/CLAUDE.md +55 -0
- data/Dangerfile +28 -0
- data/Gemfile +12 -1
- data/README.md +52 -510
- data/docs/v3.md +525 -0
- data/docs/v4.md +179 -0
- data/lib/spacex/base_request.rb +8 -8
- data/lib/spacex/capsules.rb +10 -12
- data/lib/spacex/company.rb +7 -0
- data/lib/spacex/cores.rb +11 -14
- data/lib/spacex/crew.rb +15 -0
- data/lib/spacex/{dragon_capsules.rb → dragons.rb} +14 -16
- data/lib/spacex/history.rb +9 -2
- data/lib/spacex/landpads.rb +23 -0
- data/lib/spacex/launches.rb +35 -11
- data/lib/spacex/launchpads.rb +23 -0
- data/lib/spacex/models.rb +16 -0
- data/lib/spacex/payloads.rb +31 -2
- data/lib/spacex/rockets.rb +26 -3
- data/lib/spacex/ships.rb +22 -24
- data/lib/spacex/starlink.rb +16 -0
- data/lib/spacex/version.rb +1 -1
- data/lib/spacex.rb +2 -17
- data/spacex.gemspec +6 -9
- data/spec/coverage_helper.rb +5 -0
- data/spec/fixtures/spacex/v4/capsules/all.yml +122 -0
- data/spec/fixtures/spacex/v4/capsules/one.yml +89 -0
- data/spec/fixtures/spacex/v4/company.yml +80 -0
- data/spec/fixtures/spacex/v4/cores/all.yml +76 -0
- data/spec/fixtures/spacex/v4/cores/one.yml +75 -0
- data/spec/fixtures/spacex/v4/crew/all.yml +92 -0
- data/spec/fixtures/spacex/v4/crew/one.yml +74 -0
- data/spec/fixtures/spacex/v4/dragons/all.yml +101 -0
- data/spec/fixtures/spacex/v4/dragons/one.yml +189 -0
- data/spec/fixtures/spacex/v4/history/all.yml +85 -0
- data/spec/fixtures/spacex/v4/history/one.yml +168 -0
- data/spec/fixtures/spacex/v4/landpads/all.yml +85 -0
- data/spec/fixtures/spacex/v4/landpads/one.yml +172 -0
- data/spec/fixtures/spacex/v4/launches/all.yml +85 -0
- data/spec/fixtures/spacex/v4/launches/latest.yml +84 -0
- data/spec/fixtures/spacex/v4/launches/next.yml +84 -0
- data/spec/fixtures/spacex/v4/launches/one.yml +167 -0
- data/spec/fixtures/spacex/v4/launches/past.yml +85 -0
- data/spec/fixtures/spacex/v4/launches/upcoming.yml +97 -0
- data/spec/fixtures/spacex/v4/launchpads/all.yml +139 -0
- data/spec/fixtures/spacex/v4/launchpads/one.yml +225 -0
- data/spec/fixtures/spacex/v4/payloads/all.yml +85 -0
- data/spec/fixtures/spacex/v4/payloads/one.yml +167 -0
- data/spec/fixtures/spacex/v4/roadster.yml +90 -0
- data/spec/fixtures/spacex/v4/rockets/all.yml +76 -0
- data/spec/fixtures/spacex/v4/rockets/one.yml +84 -0
- data/spec/fixtures/spacex/v4/ships/all.yml +164 -0
- data/spec/fixtures/spacex/v4/ships/one.yml +248 -0
- data/spec/fixtures/spacex/v4/starlink/all.yml +17713 -0
- data/spec/fixtures/spacex/v4/starlink/one.yml +17798 -0
- data/spec/spacex/base_request_spec.rb +112 -0
- data/spec/spacex/capsules_spec.rb +19 -28
- data/spec/spacex/company_spec.rb +26 -0
- data/spec/spacex/cores_spec.rb +18 -31
- data/spec/spacex/crew_spec.rb +27 -0
- data/spec/spacex/dragons_spec.rb +39 -0
- data/spec/spacex/history_spec.rb +16 -40
- data/spec/spacex/landpads_spec.rb +35 -0
- data/spec/spacex/launches_spec.rb +28 -628
- data/spec/spacex/launchpads_spec.rb +34 -0
- data/spec/spacex/payloads_spec.rb +27 -51
- data/spec/spacex/roadster_spec.rb +5 -29
- data/spec/spacex/rockets_spec.rb +26 -194
- data/spec/spacex/ships_spec.rb +20 -51
- data/spec/spacex/starlink_spec.rb +28 -0
- data/spec/spacex/version_spec.rb +12 -0
- data/spec/spec_helper.rb +3 -9
- metadata +106 -137
- data/.ruby-version +0 -1
- data/.travis.yml +0 -21
- data/lib/spacex/api_info.rb +0 -7
- data/lib/spacex/company_info.rb +0 -7
- data/lib/spacex/endpoint.rb +0 -3
- data/lib/spacex/landing_pads.rb +0 -11
- data/lib/spacex/launch_pads.rb +0 -11
- data/lib/spacex/missions.rb +0 -18
- data/spec/fixtures/spacex/api_info/info.yml +0 -65
- data/spec/fixtures/spacex/capsules/C202.yml +0 -123
- data/spec/fixtures/spacex/capsules.yml +0 -83
- data/spec/fixtures/spacex/company_info/info.yml +0 -129
- data/spec/fixtures/spacex/cores/B1041.yml +0 -123
- data/spec/fixtures/spacex/cores.yml +0 -62
- data/spec/fixtures/spacex/dragon_capsules/info/dragon1.yml +0 -131
- data/spec/fixtures/spacex/dragon_capsules/info.yml +0 -77
- data/spec/fixtures/spacex/history/info/4.yml +0 -62
- data/spec/fixtures/spacex/history/info.yml +0 -62
- data/spec/fixtures/spacex/landing_pads/info/LZ-4.yml +0 -70
- data/spec/fixtures/spacex/landing_pads/info.yml +0 -68
- data/spec/fixtures/spacex/launch_pads/info/vafb_slc_4e.yml +0 -71
- data/spec/fixtures/spacex/launch_pads/info.yml +0 -104
- data/spec/fixtures/spacex/launches/68.yml +0 -69
- data/spec/fixtures/spacex/launches/all.yml +0 -62
- data/spec/fixtures/spacex/launches/info.yml +0 -62
- data/spec/fixtures/spacex/launches/latest.yml +0 -245
- data/spec/fixtures/spacex/launches/next.yml +0 -123
- data/spec/fixtures/spacex/launches/past.yml +0 -62
- data/spec/fixtures/spacex/launches/upcoming.yml +0 -64
- data/spec/fixtures/spacex/launches.yml +0 -62
- data/spec/fixtures/spacex/missions/F3364BF.yml +0 -157
- data/spec/fixtures/spacex/missions/info.yml +0 -62
- data/spec/fixtures/spacex/payloads/RatSat.yml +0 -62
- data/spec/fixtures/spacex/payloads/info.yml +0 -62
- data/spec/fixtures/spacex/roadster/info.yml +0 -133
- data/spec/fixtures/spacex/rockets/info/falcon1.yml +0 -139
- data/spec/fixtures/spacex/rockets/info/invalid.yml +0 -61
- data/spec/fixtures/spacex/rockets/info.yml +0 -105
- data/spec/fixtures/spacex/ships/info/AMERICANCHAMPION.yml +0 -125
- data/spec/fixtures/spacex/ships/info.yml +0 -139
- data/spec/spacex/api_info_spec.rb +0 -16
- data/spec/spacex/company_info_spec.rb +0 -27
- data/spec/spacex/dragon_capsules_spec.rb +0 -107
- data/spec/spacex/endpoint_spec.rb +0 -9
- data/spec/spacex/landing_pads_spec.rb +0 -72
- data/spec/spacex/launch_pads_spec.rb +0 -77
- data/spec/spacex/missions_spec.rb +0 -35
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: get
|
|
5
|
+
uri: https://api.spacexdata.com/v4/launches/latest
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: ''
|
|
9
|
+
headers:
|
|
10
|
+
User-Agent:
|
|
11
|
+
- Faraday v2.14.1
|
|
12
|
+
Accept-Encoding:
|
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
14
|
+
Accept:
|
|
15
|
+
- "*/*"
|
|
16
|
+
response:
|
|
17
|
+
status:
|
|
18
|
+
code: 200
|
|
19
|
+
message: OK
|
|
20
|
+
headers:
|
|
21
|
+
Date:
|
|
22
|
+
- Sat, 21 Mar 2026 19:44:08 GMT
|
|
23
|
+
Content-Type:
|
|
24
|
+
- application/json; charset=utf-8
|
|
25
|
+
Content-Length:
|
|
26
|
+
- '1427'
|
|
27
|
+
Connection:
|
|
28
|
+
- keep-alive
|
|
29
|
+
Access-Control-Allow-Origin:
|
|
30
|
+
- "*"
|
|
31
|
+
Access-Control-Expose-Headers:
|
|
32
|
+
- spacex-api-cache,spacex-api-response-time
|
|
33
|
+
Alt-Svc:
|
|
34
|
+
- h3=":443"; ma=86400
|
|
35
|
+
Cache-Control:
|
|
36
|
+
- max-age=20
|
|
37
|
+
Content-Security-Policy:
|
|
38
|
+
- 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
|
|
39
|
+
https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
|
|
40
|
+
''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
|
|
41
|
+
Etag:
|
|
42
|
+
- '"593-+Fiu3XKvmfUy10xCx7PQ7s+kCOI"'
|
|
43
|
+
Expect-Ct:
|
|
44
|
+
- max-age=0
|
|
45
|
+
Referrer-Policy:
|
|
46
|
+
- no-referrer
|
|
47
|
+
Server:
|
|
48
|
+
- cloudflare
|
|
49
|
+
Spacex-Api-Cache:
|
|
50
|
+
- HIT
|
|
51
|
+
Spacex-Api-Cache-Online:
|
|
52
|
+
- 'true'
|
|
53
|
+
Spacex-Api-Response-Time:
|
|
54
|
+
- 1ms
|
|
55
|
+
Strict-Transport-Security:
|
|
56
|
+
- max-age=15552000; includeSubDomains
|
|
57
|
+
Vary:
|
|
58
|
+
- Accept-Encoding
|
|
59
|
+
- Origin
|
|
60
|
+
X-Content-Type-Options:
|
|
61
|
+
- nosniff
|
|
62
|
+
X-Dns-Prefetch-Control:
|
|
63
|
+
- 'off'
|
|
64
|
+
X-Download-Options:
|
|
65
|
+
- noopen
|
|
66
|
+
X-Frame-Options:
|
|
67
|
+
- SAMEORIGIN
|
|
68
|
+
X-Permitted-Cross-Domain-Policies:
|
|
69
|
+
- none
|
|
70
|
+
X-Xss-Protection:
|
|
71
|
+
- '0'
|
|
72
|
+
Cf-Cache-Status:
|
|
73
|
+
- DYNAMIC
|
|
74
|
+
Nel:
|
|
75
|
+
- '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}'
|
|
76
|
+
Report-To:
|
|
77
|
+
- '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=Z3Ib2QcU2U71hLMgge%2F8WxSay4DfNc82rAtEG08DoROlqhqLuX8YiBm0%2FlZoinRRha01OYTYTl1iMkrVx0fR3QWRU3%2FSAInD0XCKB%2Bi7NVzf1Q%3D%3D"}]}'
|
|
78
|
+
Cf-Ray:
|
|
79
|
+
- 9dff731468aa97b9-YYZ
|
|
80
|
+
body:
|
|
81
|
+
encoding: ASCII-8BIT
|
|
82
|
+
string: '{"fairings":null,"links":{"patch":{"small":"https://images2.imgbox.com/eb/d8/D1Yywp0w_o.png","large":"https://images2.imgbox.com/33/2e/k6VE4iYl_o.png"},"reddit":{"campaign":null,"launch":"https://www.reddit.com/r/spacex/comments/xvm76j/rspacex_crew5_launchcoast_docking_discussion_and/","media":null,"recovery":null},"flickr":{"small":[],"original":[]},"presskit":null,"webcast":"https://youtu.be/5EwW8ZkArL4","youtube_id":"5EwW8ZkArL4","article":null,"wikipedia":"https://en.wikipedia.org/wiki/SpaceX_Crew-5"},"static_fire_date_utc":null,"static_fire_date_unix":null,"net":false,"window":null,"rocket":"5e9d0d95eda69973a809d1ec","success":true,"failures":[],"details":null,"crew":["62dd7196202306255024d13c","62dd71c9202306255024d13d","62dd7210202306255024d13e","62dd7253202306255024d13f"],"ships":[],"capsules":["617c05591bad2c661a6e2909"],"payloads":["62dd73ed202306255024d145"],"launchpad":"5e9e4502f509094188566f88","flight_number":187,"name":"Crew-5","date_utc":"2022-10-05T16:00:00.000Z","date_unix":1664985600,"date_local":"2022-10-05T12:00:00-04:00","date_precision":"hour","upcoming":false,"cores":[{"core":"633d9da635a71d1d9c66797b","flight":1,"gridfins":true,"legs":true,"reused":false,"landing_attempt":true,"landing_success":true,"landing_type":"ASDS","landpad":"5e9e3033383ecbb9e534e7cc"}],"auto_update":true,"tbd":false,"launch_library_id":"f33d5ece-e825-4cd8-809f-1d4c72a2e0d3","id":"62dd70d5202306255024d139"}'
|
|
83
|
+
recorded_at: Sat, 21 Mar 2026 19:44:08 GMT
|
|
84
|
+
recorded_with: VCR 6.4.0
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
http_interactions:
|
|
3
|
+
- request:
|
|
4
|
+
method: get
|
|
5
|
+
uri: https://api.spacexdata.com/v4/launches/next
|
|
6
|
+
body:
|
|
7
|
+
encoding: US-ASCII
|
|
8
|
+
string: ''
|
|
9
|
+
headers:
|
|
10
|
+
User-Agent:
|
|
11
|
+
- Faraday v2.14.1
|
|
12
|
+
Accept-Encoding:
|
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
14
|
+
Accept:
|
|
15
|
+
- "*/*"
|
|
16
|
+
response:
|
|
17
|
+
status:
|
|
18
|
+
code: 200
|
|
19
|
+
message: OK
|
|
20
|
+
headers:
|
|
21
|
+
Date:
|
|
22
|
+
- Sat, 21 Mar 2026 19:44:08 GMT
|
|
23
|
+
Content-Type:
|
|
24
|
+
- application/json; charset=utf-8
|
|
25
|
+
Content-Length:
|
|
26
|
+
- '1449'
|
|
27
|
+
Connection:
|
|
28
|
+
- keep-alive
|
|
29
|
+
Access-Control-Allow-Origin:
|
|
30
|
+
- "*"
|
|
31
|
+
Access-Control-Expose-Headers:
|
|
32
|
+
- spacex-api-cache,spacex-api-response-time
|
|
33
|
+
Alt-Svc:
|
|
34
|
+
- h3=":443"; ma=86400
|
|
35
|
+
Cache-Control:
|
|
36
|
+
- max-age=20
|
|
37
|
+
Content-Security-Policy:
|
|
38
|
+
- 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
|
|
39
|
+
https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
|
|
40
|
+
''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
|
|
41
|
+
Etag:
|
|
42
|
+
- '"5a9-wKIeQnSkITl0wyy/ZD9anmlhR4c"'
|
|
43
|
+
Expect-Ct:
|
|
44
|
+
- max-age=0
|
|
45
|
+
Referrer-Policy:
|
|
46
|
+
- no-referrer
|
|
47
|
+
Server:
|
|
48
|
+
- cloudflare
|
|
49
|
+
Spacex-Api-Cache:
|
|
50
|
+
- HIT
|
|
51
|
+
Spacex-Api-Cache-Online:
|
|
52
|
+
- 'true'
|
|
53
|
+
Spacex-Api-Response-Time:
|
|
54
|
+
- 1ms
|
|
55
|
+
Strict-Transport-Security:
|
|
56
|
+
- max-age=15552000; includeSubDomains
|
|
57
|
+
Vary:
|
|
58
|
+
- Accept-Encoding
|
|
59
|
+
- Origin
|
|
60
|
+
X-Content-Type-Options:
|
|
61
|
+
- nosniff
|
|
62
|
+
X-Dns-Prefetch-Control:
|
|
63
|
+
- 'off'
|
|
64
|
+
X-Download-Options:
|
|
65
|
+
- noopen
|
|
66
|
+
X-Frame-Options:
|
|
67
|
+
- SAMEORIGIN
|
|
68
|
+
X-Permitted-Cross-Domain-Policies:
|
|
69
|
+
- none
|
|
70
|
+
X-Xss-Protection:
|
|
71
|
+
- '0'
|
|
72
|
+
Cf-Cache-Status:
|
|
73
|
+
- DYNAMIC
|
|
74
|
+
Nel:
|
|
75
|
+
- '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}'
|
|
76
|
+
Report-To:
|
|
77
|
+
- '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=H%2BvivXY9ksGhXbR9oEsdVnzcB8%2Ba736n1sI0SZzeiBCx2ozLRCvr2QELiHZh3GmobUkRjHFD0mnr%2B%2FC6rrplc%2BnH0ph99Gx3SfJOyATl1K6YEA%3D%3D"}]}'
|
|
78
|
+
Cf-Ray:
|
|
79
|
+
- 9dff73152c5cac6c-YYZ
|
|
80
|
+
body:
|
|
81
|
+
encoding: ASCII-8BIT
|
|
82
|
+
string: '{"fairings":{"reused":null,"recovery_attempt":null,"recovered":null,"ships":[]},"links":{"patch":{"small":null,"large":null},"reddit":{"campaign":null,"launch":null,"media":null,"recovery":null},"flickr":{"small":[],"original":[]},"presskit":null,"webcast":"https://youtu.be/pY628jRd6gM","youtube_id":"pY628jRd6gM","article":null,"wikipedia":null},"static_fire_date_utc":null,"static_fire_date_unix":null,"net":false,"window":null,"rocket":"5e9d0d95eda69974db09d1ed","success":null,"failures":[],"details":null,"crew":[],"ships":[],"capsules":[],"payloads":["5fe3b86eb3467846b324217c"],"launchpad":"5e9e4502f509094188566f88","flight_number":188,"name":"USSF-44","date_utc":"2022-11-01T13:41:00.000Z","date_unix":1667310060,"date_local":"2022-11-01T09:41:00-04:00","date_precision":"hour","upcoming":true,"cores":[{"core":"5fe3b8f2b3467846b3242181","flight":1,"gridfins":true,"legs":true,"reused":false,"landing_attempt":null,"landing_success":null,"landing_type":null,"landpad":null},{"core":"5fe3b8fbb3467846b3242182","flight":1,"gridfins":true,"legs":true,"reused":false,"landing_attempt":null,"landing_success":null,"landing_type":null,"landpad":null},{"core":"5fe3b906b3467846b3242183","flight":1,"gridfins":true,"legs":true,"reused":false,"landing_attempt":null,"landing_success":null,"landing_type":null,"landpad":null}],"auto_update":true,"tbd":false,"launch_library_id":"2306e0bc-e1a3-4a4a-9285-e1a94073655e","id":"6243aec2af52800c6e91925d"}'
|
|
83
|
+
recorded_at: Sat, 21 Mar 2026 19:44:08 GMT
|
|
84
|
+
recorded_with: VCR 6.4.0
|