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.
Files changed (126) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/ruby.yml +26 -0
  3. data/.gitignore +1 -0
  4. data/.rubocop.yml +6 -0
  5. data/.rubocop_todo.yml +1 -1
  6. data/CHANGELOG.md +54 -1
  7. data/CLAUDE.md +55 -0
  8. data/Dangerfile +28 -0
  9. data/Gemfile +12 -1
  10. data/README.md +52 -510
  11. data/docs/v3.md +525 -0
  12. data/docs/v4.md +179 -0
  13. data/lib/spacex/base_request.rb +8 -8
  14. data/lib/spacex/capsules.rb +10 -12
  15. data/lib/spacex/company.rb +7 -0
  16. data/lib/spacex/cores.rb +11 -14
  17. data/lib/spacex/crew.rb +15 -0
  18. data/lib/spacex/{dragon_capsules.rb → dragons.rb} +14 -16
  19. data/lib/spacex/history.rb +9 -2
  20. data/lib/spacex/landpads.rb +23 -0
  21. data/lib/spacex/launches.rb +35 -11
  22. data/lib/spacex/launchpads.rb +23 -0
  23. data/lib/spacex/models.rb +16 -0
  24. data/lib/spacex/payloads.rb +31 -2
  25. data/lib/spacex/rockets.rb +26 -3
  26. data/lib/spacex/ships.rb +22 -24
  27. data/lib/spacex/starlink.rb +16 -0
  28. data/lib/spacex/version.rb +1 -1
  29. data/lib/spacex.rb +2 -17
  30. data/spacex.gemspec +6 -9
  31. data/spec/coverage_helper.rb +5 -0
  32. data/spec/fixtures/spacex/v4/capsules/all.yml +122 -0
  33. data/spec/fixtures/spacex/v4/capsules/one.yml +89 -0
  34. data/spec/fixtures/spacex/v4/company.yml +80 -0
  35. data/spec/fixtures/spacex/v4/cores/all.yml +76 -0
  36. data/spec/fixtures/spacex/v4/cores/one.yml +75 -0
  37. data/spec/fixtures/spacex/v4/crew/all.yml +92 -0
  38. data/spec/fixtures/spacex/v4/crew/one.yml +74 -0
  39. data/spec/fixtures/spacex/v4/dragons/all.yml +101 -0
  40. data/spec/fixtures/spacex/v4/dragons/one.yml +189 -0
  41. data/spec/fixtures/spacex/v4/history/all.yml +85 -0
  42. data/spec/fixtures/spacex/v4/history/one.yml +168 -0
  43. data/spec/fixtures/spacex/v4/landpads/all.yml +85 -0
  44. data/spec/fixtures/spacex/v4/landpads/one.yml +172 -0
  45. data/spec/fixtures/spacex/v4/launches/all.yml +85 -0
  46. data/spec/fixtures/spacex/v4/launches/latest.yml +84 -0
  47. data/spec/fixtures/spacex/v4/launches/next.yml +84 -0
  48. data/spec/fixtures/spacex/v4/launches/one.yml +167 -0
  49. data/spec/fixtures/spacex/v4/launches/past.yml +85 -0
  50. data/spec/fixtures/spacex/v4/launches/upcoming.yml +97 -0
  51. data/spec/fixtures/spacex/v4/launchpads/all.yml +139 -0
  52. data/spec/fixtures/spacex/v4/launchpads/one.yml +225 -0
  53. data/spec/fixtures/spacex/v4/payloads/all.yml +85 -0
  54. data/spec/fixtures/spacex/v4/payloads/one.yml +167 -0
  55. data/spec/fixtures/spacex/v4/roadster.yml +90 -0
  56. data/spec/fixtures/spacex/v4/rockets/all.yml +76 -0
  57. data/spec/fixtures/spacex/v4/rockets/one.yml +84 -0
  58. data/spec/fixtures/spacex/v4/ships/all.yml +164 -0
  59. data/spec/fixtures/spacex/v4/ships/one.yml +248 -0
  60. data/spec/fixtures/spacex/v4/starlink/all.yml +17713 -0
  61. data/spec/fixtures/spacex/v4/starlink/one.yml +17798 -0
  62. data/spec/spacex/base_request_spec.rb +112 -0
  63. data/spec/spacex/capsules_spec.rb +19 -28
  64. data/spec/spacex/company_spec.rb +26 -0
  65. data/spec/spacex/cores_spec.rb +18 -31
  66. data/spec/spacex/crew_spec.rb +27 -0
  67. data/spec/spacex/dragons_spec.rb +39 -0
  68. data/spec/spacex/history_spec.rb +16 -40
  69. data/spec/spacex/landpads_spec.rb +35 -0
  70. data/spec/spacex/launches_spec.rb +28 -628
  71. data/spec/spacex/launchpads_spec.rb +34 -0
  72. data/spec/spacex/payloads_spec.rb +27 -51
  73. data/spec/spacex/roadster_spec.rb +5 -29
  74. data/spec/spacex/rockets_spec.rb +26 -194
  75. data/spec/spacex/ships_spec.rb +20 -51
  76. data/spec/spacex/starlink_spec.rb +28 -0
  77. data/spec/spacex/version_spec.rb +12 -0
  78. data/spec/spec_helper.rb +3 -9
  79. metadata +106 -137
  80. data/.ruby-version +0 -1
  81. data/.travis.yml +0 -21
  82. data/lib/spacex/api_info.rb +0 -7
  83. data/lib/spacex/company_info.rb +0 -7
  84. data/lib/spacex/endpoint.rb +0 -3
  85. data/lib/spacex/landing_pads.rb +0 -11
  86. data/lib/spacex/launch_pads.rb +0 -11
  87. data/lib/spacex/missions.rb +0 -18
  88. data/spec/fixtures/spacex/api_info/info.yml +0 -65
  89. data/spec/fixtures/spacex/capsules/C202.yml +0 -123
  90. data/spec/fixtures/spacex/capsules.yml +0 -83
  91. data/spec/fixtures/spacex/company_info/info.yml +0 -129
  92. data/spec/fixtures/spacex/cores/B1041.yml +0 -123
  93. data/spec/fixtures/spacex/cores.yml +0 -62
  94. data/spec/fixtures/spacex/dragon_capsules/info/dragon1.yml +0 -131
  95. data/spec/fixtures/spacex/dragon_capsules/info.yml +0 -77
  96. data/spec/fixtures/spacex/history/info/4.yml +0 -62
  97. data/spec/fixtures/spacex/history/info.yml +0 -62
  98. data/spec/fixtures/spacex/landing_pads/info/LZ-4.yml +0 -70
  99. data/spec/fixtures/spacex/landing_pads/info.yml +0 -68
  100. data/spec/fixtures/spacex/launch_pads/info/vafb_slc_4e.yml +0 -71
  101. data/spec/fixtures/spacex/launch_pads/info.yml +0 -104
  102. data/spec/fixtures/spacex/launches/68.yml +0 -69
  103. data/spec/fixtures/spacex/launches/all.yml +0 -62
  104. data/spec/fixtures/spacex/launches/info.yml +0 -62
  105. data/spec/fixtures/spacex/launches/latest.yml +0 -245
  106. data/spec/fixtures/spacex/launches/next.yml +0 -123
  107. data/spec/fixtures/spacex/launches/past.yml +0 -62
  108. data/spec/fixtures/spacex/launches/upcoming.yml +0 -64
  109. data/spec/fixtures/spacex/launches.yml +0 -62
  110. data/spec/fixtures/spacex/missions/F3364BF.yml +0 -157
  111. data/spec/fixtures/spacex/missions/info.yml +0 -62
  112. data/spec/fixtures/spacex/payloads/RatSat.yml +0 -62
  113. data/spec/fixtures/spacex/payloads/info.yml +0 -62
  114. data/spec/fixtures/spacex/roadster/info.yml +0 -133
  115. data/spec/fixtures/spacex/rockets/info/falcon1.yml +0 -139
  116. data/spec/fixtures/spacex/rockets/info/invalid.yml +0 -61
  117. data/spec/fixtures/spacex/rockets/info.yml +0 -105
  118. data/spec/fixtures/spacex/ships/info/AMERICANCHAMPION.yml +0 -125
  119. data/spec/fixtures/spacex/ships/info.yml +0 -139
  120. data/spec/spacex/api_info_spec.rb +0 -16
  121. data/spec/spacex/company_info_spec.rb +0 -27
  122. data/spec/spacex/dragon_capsules_spec.rb +0 -107
  123. data/spec/spacex/endpoint_spec.rb +0 -9
  124. data/spec/spacex/landing_pads_spec.rb +0 -72
  125. data/spec/spacex/launch_pads_spec.rb +0 -77
  126. data/spec/spacex/missions_spec.rb +0 -35
@@ -1,651 +1,51 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe SPACEX::Launches do
4
- context '#latest', vcr: { cassette_name: 'launches/latest' } do
5
- subject do
6
- SPACEX::Launches.latest
7
- end
8
-
9
- it 'returns latest launch' do
10
- expect(subject.flight_number).to eq 67
11
- expect(subject.mission_name).to eq 'Merah Putih'
12
- expect(subject.launch_year).to eq '2018'
13
- expect(subject.launch_date_unix).to eq 1_533_619_080
14
- expect(subject.launch_date_utc).to eq '2018-08-07T05:18:00.000Z'
15
- expect(subject.launch_date_local).to eq '2018-08-07T01:18:00-04:00'
16
- expect(subject.launch_success).to eq true
17
- expect(subject.rocket.rocket_id).to eq 'falcon9'
18
- expect(subject.rocket.rocket_name).to eq 'Falcon 9'
19
- expect(subject.rocket.rocket_type).to eq 'FT'
20
- expect(subject.rocket.first_stage.cores.first.core_serial).to eq 'B1046'
21
- expect(subject.rocket.first_stage.cores.first.flight).to eq 2
22
- expect(subject.rocket.first_stage.cores.first.block).to eq 5
23
- expect(subject.rocket.first_stage.cores.first.reused).to eq true
24
- expect(subject.rocket.first_stage.cores.first.land_success).to eq true
25
- expect(subject.rocket.first_stage.cores.first.landing_type).to eq 'ASDS'
26
- expect(subject.rocket.first_stage.cores.first.landing_vehicle).to eq 'OCISLY'
27
- expect(subject.rocket.second_stage.block).to eq 5
28
- expect(subject.rocket.second_stage.payloads.first.payload_id).to eq 'Telkom-4'
29
- expect(subject.rocket.second_stage.payloads.first.norad_id.first).to eq 43_587
30
- expect(subject.rocket.second_stage.payloads.first.reused).to eq false
31
- expect(subject.rocket.second_stage.payloads.first.customers.first).to eq 'Telkom'
32
- expect(subject.rocket.second_stage.payloads.first.nationality).to eq 'Indonesia'
33
- expect(subject.rocket.second_stage.payloads.first.manufacturer).to eq 'SSL'
34
- expect(subject.rocket.second_stage.payloads.first.payload_type).to eq 'Satellite'
35
- expect(subject.rocket.second_stage.payloads.first.payload_mass_kg).to eq 5800
36
- expect(subject.rocket.second_stage.payloads.first.payload_mass_lbs).to eq 12_786.81
37
- expect(subject.rocket.second_stage.payloads.first.orbit).to eq 'GTO'
38
- expect(subject.rocket.second_stage.payloads.first.orbit_params.regime).to eq 'geostationary'
39
- expect(subject.rocket.second_stage.payloads.first.orbit_params.longitude).to eq '-108'.to_i
40
- expect(subject.rocket.second_stage.payloads.first.orbit_params.semi_major_axis_km).to eq 21_226.178
41
- expect(subject.rocket.second_stage.payloads.first.orbit_params.eccentricity).to eq 0.6904141
42
- expect(subject.rocket.second_stage.payloads.first.orbit_params.periapsis_km).to eq 193.19
43
- expect(subject.rocket.second_stage.payloads.first.orbit_params.apoapsis_km).to eq 29_502.896
44
- expect(subject.rocket.second_stage.payloads.first.orbit_params.inclination_deg).to eq 27.0648
45
- expect(subject.rocket.second_stage.payloads.first.orbit_params.period_min).to eq 512.941
46
- expect(subject.rocket.second_stage.payloads.first.orbit_params.lifespan_years).to eq 15
47
- expect(subject.rocket.second_stage.payloads.first.orbit_params.epoch).to eq '2018-08-07T06:57:16.000Z'
48
- expect(subject.rocket.second_stage.payloads.first.orbit_params.mean_motion).to eq 2.80734018
49
- expect(subject.rocket.second_stage.payloads.first.orbit_params.raan).to eq 227.0228
50
- expect(subject.telemetry.flight_club).to eq nil
51
- expect(subject.reuse.core).to eq true
52
- expect(subject.reuse.sire_core1).to eq nil
53
- expect(subject.reuse.side_core2).to eq false
54
- expect(subject.reuse.fairings).to eq false
55
- expect(subject.reuse.capsule).to eq false
56
- expect(subject.launch_site.site_id).to eq 'ccafs_slc_40'
57
- expect(subject.launch_site.site_name).to eq 'CCAFS SLC 40'
58
- expect(subject.launch_site.site_name_long).to eq 'Cape Canaveral Air Force Station Space Launch Complex 40'
59
- expect(subject.launch_success).to eq true
60
- expect(subject.links.mission_patch).to eq 'https://images2.imgbox.com/a8/f5/ZgdsrbqW_o.png'
61
- expect(subject.links.mision_patch_small).to eq nil
62
- expect(subject.links.reddit_campaign).to eq 'https://www.reddit.com/r/spacex/comments/91gwfg/merah_putih_telkom4_launch_campaign_thread/'
63
- expect(subject.links.reddit_launch).to eq 'https://www.reddit.com/r/spacex/comments/9539nr/rspacex_merah_putih_telkom4_official_launch/'
64
- expect(subject.links.reddit_recovery).to eq nil
65
- expect(subject.links.reddit_media).to eq 'https://www.reddit.com/r/spacex/comments/94zr0b/rspacex_merah_putih_media_thread_videos_images/'
66
- expect(subject.links.presskit).to eq 'https://www.spacex.com/sites/spacex/files/merahputihpresskit.pdf'
67
- expect(subject.links.article_link).to eq 'https://spaceflightnow.com/2018/08/07/indonesian-communications-satellite-deployed-in-orbit-by-spacex/'
68
- expect(subject.links.wikipedia).to eq 'https://en.wikipedia.org/wiki/Telkom_Indonesia'
69
- expect(subject.links.video_link).to eq 'https://www.youtube.com/watch?v=FjfQNBYv2IY'
70
- expect(subject.details).to eq 'Indonesian comsat intended to replace the aging Telkom 1 at 108° E. First reflight of a Block 5-version booster.'
71
- expect(subject.upcoming).to eq false
72
- expect(subject.static_fire_date_utc).to eq '2018-08-02T15:53:00.000Z'
73
- end
74
- end
75
-
76
- context '#info', vcr: { cassette_name: 'launches/info' } do
77
- subject do
78
- SPACEX::Launches.info
79
- end
80
-
81
- it 'returns and array of launch hashes' do
4
+ context '#info', vcr: { cassette_name: 'v4/launches/all' } do
5
+ subject { SPACEX::Launches.info }
6
+ it 'returns an array of SPACEX::Launches' do
82
7
  expect(subject).to be_an Array
83
- expect(subject.first).to be_a Hash
84
- end
85
-
86
- it 'returns the correct number of launches' do
87
- expect(subject.count).to eq 90
88
- end
89
-
90
- it 'returns the subject.first launch' do
91
- expect(subject.first.flight_number).to eq 1
92
- expect(subject.first.mission_name).to eq 'FalconSat'
93
- expect(subject.first.launch_year).to eq '2006'
94
- expect(subject.first.launch_date_unix).to eq 1_143_239_400
95
- expect(subject.first.launch_date_utc).to eq '2006-03-24T22:30:00.000Z'
96
- expect(subject.first.launch_date_local).to eq '2006-03-25T10:30:00+12:00'
97
- expect(subject.first.launch_success).to eq false
98
- expect(subject.first.rocket.rocket_id).to eq 'falcon1'
99
- expect(subject.first.rocket.rocket_name).to eq 'Falcon 1'
100
- expect(subject.first.rocket.rocket_type).to eq 'Merlin A'
101
- expect(subject.first.rocket.first_stage.cores.first.core_serial).to eq 'Merlin1A'
102
- expect(subject.first.rocket.first_stage.cores.first.flight).to eq 1
103
- expect(subject.first.rocket.first_stage.cores.first.block).to eq nil
104
- expect(subject.first.rocket.first_stage.cores.first.reused).to eq false
105
- expect(subject.first.rocket.first_stage.cores.first.land_success).to eq nil
106
- expect(subject.first.rocket.first_stage.cores.first.landing_type).to eq nil
107
- expect(subject.first.rocket.first_stage.cores.first.landing_vehicle).to eq nil
108
- expect(subject.first.rocket.second_stage.block).to eq 1
109
- expect(subject.first.rocket.second_stage.payloads.first.payload_id).to eq 'FalconSAT-2'
110
- expect(subject.first.rocket.second_stage.payloads.first.norad_id.first).to eq nil
111
- expect(subject.first.rocket.second_stage.payloads.first.reused).to eq false
112
- expect(subject.first.rocket.second_stage.payloads.first.customers.first).to eq 'DARPA'
113
- expect(subject.first.rocket.second_stage.payloads.first.nationality).to eq 'United States'
114
- expect(subject.first.rocket.second_stage.payloads.first.manufacturer).to eq 'SSTL'
115
- expect(subject.first.rocket.second_stage.payloads.first.payload_type).to eq 'Satellite'
116
- expect(subject.first.rocket.second_stage.payloads.first.payload_mass_kg).to eq 20
117
- expect(subject.first.rocket.second_stage.payloads.first.payload_mass_lbs).to eq 43
118
- expect(subject.first.rocket.second_stage.payloads.first.orbit).to eq 'LEO'
119
- expect(subject.first.rocket.second_stage.payloads.first.orbit_params.reference_system).to eq 'geocentric'
120
- expect(subject.first.rocket.second_stage.payloads.first.orbit_params.regime).to eq 'low-earth'
121
- expect(subject.first.rocket.second_stage.payloads.first.orbit_params.longitude).to eq nil
122
- expect(subject.first.rocket.second_stage.payloads.first.orbit_params.semi_major_axis_km).to eq nil
123
- expect(subject.first.rocket.second_stage.payloads.first.orbit_params.eccentricity).to eq nil
124
- expect(subject.first.rocket.second_stage.payloads.first.orbit_params.periapsis_km).to eq 400
125
- expect(subject.first.rocket.second_stage.payloads.first.orbit_params.apoapsis_km).to eq 500
126
- expect(subject.first.rocket.second_stage.payloads.first.orbit_params.inclination_deg).to eq 39
127
- expect(subject.first.rocket.second_stage.payloads.first.orbit_params.period_min).to eq nil
128
- expect(subject.first.rocket.second_stage.payloads.first.orbit_params.lifespan_years).to eq nil
129
- expect(subject.first.rocket.second_stage.payloads.first.orbit_params.epoch).to eq nil
130
- expect(subject.first.rocket.second_stage.payloads.first.orbit_params.mean_motion).to eq nil
131
- expect(subject.first.rocket.second_stage.payloads.first.orbit_params.raan).to eq nil
132
- expect(subject.first.telemetry.flight_club).to eq nil
133
- expect(subject.first.reuse).to be_nil
134
- expect(subject.first.launch_site.site_id).to eq 'kwajalein_atoll'
135
- expect(subject.first.launch_site.site_name).to eq 'Kwajalein Atoll'
136
- expect(subject.first.launch_site.site_name_long).to eq 'Kwajalein Atoll Omelek Island'
137
- expect(subject.first.launch_success).to eq false
138
- expect(subject.first.links.mission_patch).to eq 'https://images2.imgbox.com/40/e3/GypSkayF_o.png'
139
- expect(subject.first.links.mision_patch_small).to eq nil
140
- expect(subject.first.links.reddit_campaign).to eq nil
141
- expect(subject.first.links.reddit_launch).to eq nil
142
- expect(subject.first.links.reddit_recovery).to eq nil
143
- expect(subject.first.links.reddit_media).to eq nil
144
- expect(subject.first.links.presskit).to eq nil
145
- expect(subject.first.links.article_link).to eq 'https://www.space.com/2196-spacex-inaugural-falcon-1-rocket-lost-launch.html'
146
- expect(subject.first.links.wikipedia).to eq 'https://en.wikipedia.org/wiki/DemoSat'
147
- expect(subject.first.links.video_link).to eq 'https://www.youtube.com/watch?v=0a_00nJ_Y88'
148
- expect(subject.first.details).to eq 'Engine failure at 33 seconds and loss of vehicle'
149
- expect(subject.first.upcoming).to eq false
150
- expect(subject.first.static_fire_date_utc).to eq '2006-03-17T00:00:00.000Z'
151
- end
152
-
153
- it 'returns the subject.last scheduled launch' do
154
- expect(subject.last.flight_number).to eq 91
155
- expect(subject.last.mission_name).to eq 'GPS IIIA-3'
156
- expect(subject.last.launch_year).to eq '2019'
157
- expect(subject.last.launch_date_unix).to eq 1_569_888_000
158
- expect(subject.last.launch_date_utc).to eq '2019-10-01T00:00:00.000Z'
159
- expect(subject.last.launch_date_local).to eq '2019-09-30T20:00:00-04:00'
160
- expect(subject.last.launch_success).to eq nil
161
- expect(subject.last.rocket.rocket_id).to eq 'falcon9'
162
- expect(subject.last.rocket.rocket_name).to eq 'Falcon 9'
163
- expect(subject.last.rocket.rocket_type).to eq 'FT'
164
- expect(subject.last.rocket.last_stage).to be_nil
165
- expect(subject.last.rocket.second_stage.block).to eq nil
166
- expect(subject.last.rocket.second_stage.payloads.last.payload_id).to eq 'GPS IIIA-3'
167
- expect(subject.last.rocket.second_stage.payloads.last.norad_id.last).to eq nil
168
- expect(subject.last.rocket.second_stage.payloads.last.reused).to eq false
169
- expect(subject.last.rocket.second_stage.payloads.last.customers.last).to eq 'USAF'
170
- expect(subject.last.rocket.second_stage.payloads.last.nationality).to eq 'United States'
171
- expect(subject.last.rocket.second_stage.payloads.last.manufacturer).to eq 'Lockheed Martin'
172
- expect(subject.last.rocket.second_stage.payloads.last.payload_type).to eq 'Satellite'
173
- expect(subject.last.rocket.second_stage.payloads.last.payload_mass_kg).to eq 3880
174
- expect(subject.last.rocket.second_stage.payloads.last.payload_mass_lbs).to eq 8553.94
175
- expect(subject.last.rocket.second_stage.payloads.last.orbit).to eq 'MEO'
176
- expect(subject.last.rocket.second_stage.payloads.last.orbit_params.reference_system).to eq nil
177
- expect(subject.last.rocket.second_stage.payloads.last.orbit_params.regime).to eq nil
178
- expect(subject.last.rocket.second_stage.payloads.last.orbit_params.longitude).to eq nil
179
- expect(subject.last.rocket.second_stage.payloads.last.orbit_params.semi_major_axis_km).to eq nil
180
- expect(subject.last.rocket.second_stage.payloads.last.orbit_params.eccentricity).to eq nil
181
- expect(subject.last.rocket.second_stage.payloads.last.orbit_params.periapsis_km).to eq nil
182
- expect(subject.last.rocket.second_stage.payloads.last.orbit_params.apoapsis_km).to eq nil
183
- expect(subject.last.rocket.second_stage.payloads.last.orbit_params.inclination_deg).to eq nil
184
- expect(subject.last.rocket.second_stage.payloads.last.orbit_params.period_min).to eq nil
185
- expect(subject.last.rocket.second_stage.payloads.last.orbit_params.lifespan_years).to eq 15
186
- expect(subject.last.rocket.second_stage.payloads.last.orbit_params.epoch).to eq nil
187
- expect(subject.last.rocket.second_stage.payloads.last.orbit_params.mean_motion).to eq nil
188
- expect(subject.last.rocket.second_stage.payloads.last.orbit_params.raan).to eq nil
189
- expect(subject.last.telemetry.flight_club).to eq nil
190
- expect(subject.last.reuse).to be_nil
191
- expect(subject.last.launch_site.site_id).to eq 'ccafs_slc_40'
192
- expect(subject.last.launch_site.site_name).to eq 'CCAFS SLC 40'
193
- expect(subject.last.launch_site.site_name_long).to eq 'Cape Canaveral Air Force Station Space Launch Complex 40'
194
- expect(subject.last.launch_success).to eq nil
195
- expect(subject.last.links.mission_patch).to eq nil
196
- expect(subject.last.links.mision_patch_small).to eq nil
197
- expect(subject.last.links.reddit_campaign).to eq nil
198
- expect(subject.last.links.reddit_launch).to eq nil
199
- expect(subject.last.links.reddit_recovery).to eq nil
200
- expect(subject.last.links.reddit_media).to eq nil
201
- expect(subject.last.links.presskit).to eq nil
202
- expect(subject.last.links.article_link).to eq nil
203
- expect(subject.last.links.wikipedia).to eq nil
204
- expect(subject.last.links.video_link).to eq nil
205
- expect(subject.last.details).to eq nil
206
- expect(subject.last.upcoming).to eq true
207
- expect(subject.last.static_fire_date_utc).to eq nil
8
+ expect(subject.first).to be_a SPACEX::Launches
208
9
  end
209
10
  end
210
11
 
211
- context '#info(68)', vcr: { cassette_name: 'launches/68' } do
212
- subject do
213
- SPACEX::Launches.info(68)
214
- end
215
-
216
- it 'returns info for flight number 68' do
217
- expect(subject.flight_number).to eq(68)
218
- expect(subject.rocket.rocket_name).to eq('Falcon 9')
219
- expect(subject.rocket.first_stage.cores.first.core_serial).to eq('B1049')
220
- expect(subject.rocket.second_stage.payloads.first.orbit_params.regime).to eq('geostationary')
221
-
222
- expect(subject).to eq(
223
- 'flight_number' => 68,
224
- 'mission_name' => 'Telstar 18V',
225
- 'mission_id' => [
226
- 'F4F83DE'
227
- ],
228
- 'launch_year' => '2018',
229
- 'launch_date_unix' => 1_536_554_700,
230
- 'launch_date_utc' => '2018-09-10T04:45:00.000Z',
231
- 'launch_date_local' => '2018-09-10T00:45:00-04:00',
232
- 'is_tentative' => false,
233
- 'tentative_max_precision' => 'hour',
234
- 'rocket' => {
235
- 'rocket_id' => 'falcon9',
236
- 'rocket_name' => 'Falcon 9',
237
- 'rocket_type' => 'FT',
238
- 'first_stage' => {
239
- 'cores' => [{
240
- 'core_serial' => 'B1049',
241
- 'flight' => 1,
242
- 'block' => 5,
243
- 'reused' => false,
244
- 'land_success' => true,
245
- 'landing_intent' => true,
246
- 'landing_type' => 'ASDS',
247
- 'landing_vehicle' => 'OCISLY'
248
- }]
249
- },
250
- 'second_stage' => {
251
- 'block' => 5,
252
- 'payloads' => [{
253
- 'payload_id' => 'Telstar 18V',
254
- 'norad_id' => [43_611],
255
- 'reused' => false,
256
- 'customers' => ['Telesat'],
257
- 'nationality' => 'Canada',
258
- 'manufacturer' => 'SSL',
259
- 'payload_type' => 'Satellite',
260
- 'payload_mass_kg' => 7060,
261
- 'payload_mass_lbs' => 15_564.64,
262
- 'orbit' => 'GTO',
263
- 'orbit_params' => {
264
- 'reference_system' => 'geocentric',
265
- 'regime' => 'geostationary',
266
- 'longitude' => 138,
267
- 'semi_major_axis_km' => 7226.647,
268
- 'eccentricity' => 0.0013608,
269
- 'periapsis_km' => 838.677,
270
- 'apoapsis_km' => 858.346,
271
- 'inclination_deg' => 98.8086,
272
- 'period_min' => 101.897,
273
- 'lifespan_years' => 15,
274
- 'epoch' => '2018-09-07T06:29:40.000Z',
275
- 'mean_motion' => 14.13180055,
276
- 'raan' => 322.194,
277
- 'arg_of_pericenter' => 130.3173,
278
- 'mean_anomaly' => 328.1487
279
- }
280
- }]
281
- },
282
- 'fairings' => {
283
- 'reused' => false,
284
- 'recovery_attempt' => false,
285
- 'recovered' => false,
286
- 'ship' => nil
287
- }
288
- },
289
- 'ships' => %w[OCISLY HAWK GOQUEST],
290
- 'telemetry' => {
291
- 'flight_club' => 'https://www.flightclub.io/result/2d?code=T18V'
292
- },
293
- 'launch_site' => {
294
- 'site_id' => 'ccafs_slc_40',
295
- 'site_name' => 'CCAFS SLC 40',
296
- 'site_name_long' => 'Cape Canaveral Air Force Station Space Launch Complex 40'
297
- },
298
- 'launch_success' => true,
299
- 'links' => {
300
- 'mission_patch' => 'https://images2.imgbox.com/ba/db/3plcm5IB_o.png',
301
- 'mission_patch_small' => 'https://images2.imgbox.com/2d/d2/jStsqeLC_o.png',
302
- 'reddit_campaign' => 'https://www.reddit.com/r/spacex/comments/95cte4/telstar_18v_apstar_5c_launch_campaign_thread/',
303
- 'reddit_launch' => 'https://www.reddit.com/r/spacex/comments/9e7bmq/rspacex_telstar_18v_official_launch_discussion/',
304
- 'reddit_recovery' => 'https://www.reddit.com/r/spacex/comments/9erxlh/telstar_18_vantage_recovery_thread/',
305
- 'reddit_media' => 'https://www.reddit.com/r/spacex/comments/9ebkqw/rspacex_telstar_18v_media_thread_videos_images/',
306
- 'presskit' => 'https://www.spacex.com/sites/spacex/files/telstar18vantagepresskit.pdf',
307
- 'article_link' => 'https://spaceflightnow.com/2018/09/10/spacex-telesat-achieve-repeat-success-with-midnight-hour-launch/',
308
- 'wikipedia' => 'https://en.wikipedia.org/wiki/Telstar_18V',
309
- 'video_link' => 'https://www.youtube.com/watch?v=Apw3xqwsG1U',
310
- 'flickr_images' => [
311
- 'https://farm2.staticflickr.com/1878/43690848045_492ef182dd_o.jpg',
312
- 'https://farm2.staticflickr.com/1856/43881229604_6d42e838b6_o.jpg',
313
- 'https://farm2.staticflickr.com/1852/43881223704_93777e34af_o.jpg',
314
- 'https://farm2.staticflickr.com/1841/43881217094_558b7b214e_o.jpg',
315
- 'https://farm2.staticflickr.com/1869/43881193934_423eff8c86_o.jpg'
316
- ]
317
- },
318
- 'details' => 'SpaceX\'s sixteenth flight of 2018 launched the Telstar '\
319
- '18v GEO communication satellite for Telesat, the second launch for '\
320
- 'the canadian company in a few months. The first stage was a new '\
321
- 'Falcon 9 V1.2 Block 5 which was successfully recovered on OCISLY.',
322
- 'upcoming' => false,
323
- 'static_fire_date_utc' => '2018-09-05T07:21:00.000Z',
324
- 'static_fire_date_unix' => 1_536_132_060
325
- )
12
+ context "#info('5eb87cd9ffd86e000604b32a')",
13
+ vcr: { cassette_name: 'v4/launches/one' } do
14
+ subject { SPACEX::Launches.info('5eb87cd9ffd86e000604b32a') }
15
+ it 'returns a specific launch' do
16
+ expect(subject).to be_a SPACEX::Launches
17
+ expect(subject.id).to eq '5eb87cd9ffd86e000604b32a'
18
+ expect(subject.name).not_to be_nil
326
19
  end
327
20
  end
328
21
 
329
- context '#next', vcr: { cassette_name: 'launches/next' } do
330
- subject do
331
- SPACEX::Launches.next
332
- end
333
-
334
- it 'returns next launch' do
335
- expect(subject.flight_number).to eq 70
336
- expect(subject.mission_name).to eq 'Es’hail 2'
337
- expect(subject.launch_year).to eq '2018'
338
- expect(subject.launch_date_unix).to eq 1_541_030_400
339
- expect(subject.launch_date_utc).to eq '2018-11-01T00:00:00.000Z'
340
- expect(subject.launch_date_local).to eq '2018-10-31T20:00:00-04:00'
341
- expect(subject.launch_success).to eq nil
342
- expect(subject.rocket.rocket_id).to eq 'falcon9'
343
- expect(subject.rocket.rocket_name).to eq 'Falcon 9'
344
- expect(subject.rocket.rocket_type).to eq 'FT'
345
- expect(subject.rocket.first_stage.cores.first.core_serial).to eq nil
346
- expect(subject.rocket.first_stage.cores.first.flight).to eq nil
347
- expect(subject.rocket.first_stage.cores.first.block).to eq 5
348
- expect(subject.rocket.first_stage.cores.first.reused).to eq false
349
- expect(subject.rocket.first_stage.cores.first.land_success).to eq nil
350
- expect(subject.rocket.first_stage.cores.first.landing_type).to eq nil
351
- expect(subject.rocket.first_stage.cores.first.landing_vehicle).to eq nil
352
- expect(subject.rocket.second_stage.block).to eq 5
353
- expect(subject.rocket.second_stage.payloads.first.payload_id).to eq 'Es’hail 2'
354
- expect(subject.rocket.second_stage.payloads.first.norad_id.first).to eq nil
355
- expect(subject.rocket.second_stage.payloads.first.reused).to eq false
356
- expect(subject.rocket.second_stage.payloads.first.customers.first).to eq 'Es’hailSat'
357
- expect(subject.rocket.second_stage.payloads.first.nationality).to eq 'Qatar'
358
- expect(subject.rocket.second_stage.payloads.first.manufacturer).to eq 'Mitsubishi Electric'
359
- expect(subject.rocket.second_stage.payloads.first.payload_type).to eq 'Satellite'
360
- expect(subject.rocket.second_stage.payloads.first.payload_mass_kg).to eq 3000
361
- expect(subject.rocket.second_stage.payloads.first.payload_mass_lbs).to eq 6_613.868
362
- expect(subject.rocket.second_stage.payloads.first.orbit).to eq 'GTO'
363
- expect(subject.rocket.second_stage.payloads.first.orbit_params.regime).to eq 'geostationary'
364
- expect(subject.rocket.second_stage.payloads.first.orbit_params.longitude).to eq 25.5
365
- expect(subject.rocket.second_stage.payloads.first.orbit_params.semi_major_axis_km).to eq nil
366
- expect(subject.rocket.second_stage.payloads.first.orbit_params.eccentricity).to eq nil
367
- expect(subject.rocket.second_stage.payloads.first.orbit_params.periapsis_km).to eq nil
368
- expect(subject.rocket.second_stage.payloads.first.orbit_params.apoapsis_km).to eq nil
369
- expect(subject.rocket.second_stage.payloads.first.orbit_params.inclination_deg).to eq nil
370
- expect(subject.rocket.second_stage.payloads.first.orbit_params.period_min).to eq nil
371
- expect(subject.rocket.second_stage.payloads.first.orbit_params.lifespan_years).to eq 15
372
- expect(subject.rocket.second_stage.payloads.first.orbit_params.epoch).to eq nil
373
- expect(subject.rocket.second_stage.payloads.first.orbit_params.mean_motion).to eq nil
374
- expect(subject.rocket.second_stage.payloads.first.orbit_params.raan).to eq nil
375
- expect(subject.telemetry.flight_club).to eq nil
376
- expect(subject.launch_site.site_id).to eq 'ccafs_slc_40'
377
- expect(subject.launch_site.site_name).to eq 'CCAFS SLC 40'
378
- expect(subject.launch_site.site_name_long).to eq 'Cape Canaveral Air Force Station Space Launch Complex 40'
379
- expect(subject.launch_success).to eq nil
380
- expect(subject.links.mission_patch).to eq nil
381
- expect(subject.links.mision_patch_small).to eq nil
382
- expect(subject.links.reddit_campaign).to eq nil
383
- expect(subject.links.reddit_launch).to eq nil
384
- expect(subject.links.reddit_recovery).to eq nil
385
- expect(subject.links.reddit_media).to eq nil
386
- expect(subject.links.presskit).to eq nil
387
- expect(subject.links.article_link).to eq nil
388
- expect(subject.links.wikipedia).to eq nil
389
- expect(subject.links.video_link).to eq nil
390
- expect(subject.details).to eq nil
391
- expect(subject.upcoming).to eq true
392
- expect(subject.static_fire_date_utc).to eq nil
22
+ context '#latest', vcr: { cassette_name: 'v4/launches/latest' } do
23
+ subject { SPACEX::Launches.latest }
24
+ it 'returns a SPACEX::Launches object' do
25
+ expect(subject).to be_a SPACEX::Launches
393
26
  end
394
27
  end
395
28
 
396
- context '#upcoming', vcr: { cassette_name: 'launches/upcoming' } do
397
- subject do
398
- SPACEX::Launches.upcoming
399
- end
400
-
401
- it 'returns and array of upcoming launch hashes' do
402
- expect(subject).to be_an Array
403
- expect(subject.first).to be_a Hash
404
- expect(subject.all?(&:upcoming)).to be true
405
- end
406
-
407
- it 'returns launches scheduled in the future' do
408
- subject.each do |launch|
409
- expect(launch.launch_year.to_i).to be >= 2018
410
- expect(launch.rocket.first_stage.cores.first.land_success).to be nil
411
- expect(launch.launch_success).to be nil
412
- end
413
- end
414
-
415
- context 'returns upcoming launches' do
416
- it 'returns the next upcoming launch' do
417
- expect(subject.first.flight_number).to eq 70
418
- expect(subject.first.mission_name).to eq 'Es’hail 2'
419
- expect(subject.first.mission_id).to eq []
420
- expect(subject.first.launch_year).to eq '2018'
421
- expect(subject.first.launch_date_unix).to eq 1_542_228_360
422
- expect(subject.first.launch_date_utc).to eq '2018-11-14T20:46:00.000Z'
423
- expect(subject.first.launch_date_local).to eq '2018-11-14T15:46:00-05:00'
424
- expect(subject.first.is_tentative).to eq true
425
- expect(subject.first.tentative_max_precision).to eq 'hour'
426
- expect(subject.first.rocket.rocket_id).to eq 'falcon9'
427
- expect(subject.first.rocket.rocket_name).to eq 'Falcon 9'
428
- expect(subject.first.rocket.rocket_type).to eq 'FT'
429
- expect(subject.first.rocket.first_stage.cores).to be_an(Array)
430
- expect(subject.first.rocket.first_stage.cores.first).to eq(
431
- 'core_serial' => nil,
432
- 'flight' => nil,
433
- 'block' => 5,
434
- 'gridfins' => true,
435
- 'legs' => true,
436
- 'reused' => false,
437
- 'land_success' => nil,
438
- 'landing_intent' => true,
439
- 'landing_type' => 'ASDS',
440
- 'landing_vehicle' => 'OCISLY'
441
- )
442
- expect(subject.first.rocket.second_stage.block).to eq 5
443
- expect(subject.first.rocket.second_stage.payloads).to be_an(Array)
444
- expect(subject.first.rocket.second_stage.payloads.first).to eq(
445
- 'payload_id' => 'Es’hail 2',
446
- 'norad_id' => [],
447
- 'reused' => false,
448
- 'customers' => ['Es’hailSat'],
449
- 'nationality' => 'Qatar',
450
- 'manufacturer' => 'Mitsubishi Electric',
451
- 'payload_type' => 'Satellite',
452
- 'payload_mass_kg' => 3000,
453
- 'payload_mass_lbs' => 6613.868,
454
- 'orbit' => 'GTO',
455
- 'orbit_params' => {
456
- 'reference_system' => 'geocentric',
457
- 'regime' => 'geostationary',
458
- 'longitude' => 25.5,
459
- 'semi_major_axis_km' => nil,
460
- 'eccentricity' => nil,
461
- 'periapsis_km' => nil,
462
- 'apoapsis_km' => nil,
463
- 'inclination_deg' => nil,
464
- 'period_min' => nil,
465
- 'lifespan_years' => 15,
466
- 'epoch' => nil,
467
- 'mean_motion' => nil,
468
- 'raan' => nil,
469
- 'arg_of_pericenter' => nil,
470
- 'mean_anomaly' => nil
471
- }
472
- )
473
- expect(subject.first.rocket.fairings).to eq(
474
- 'reused' => false,
475
- 'recovery_attempt' => false,
476
- 'recovered' => false,
477
- 'ship' => nil
478
- )
479
- expect(subject.first.ships).to eq []
480
- expect(subject.first.telemetry.flight_club).to eq nil
481
- expect(subject.first.launch_site).to eq(
482
- 'site_id' => 'ccafs_slc_40',
483
- 'site_name' => 'CCAFS SLC 40',
484
- 'site_name_long' => 'Cape Canaveral Air Force Station Space Launch Complex 40'
485
- )
486
- expect(subject.first.launch_success).to eq nil
487
- expect(subject.first.links).to eq(
488
- 'mission_patch' => nil,
489
- 'mission_patch_small' => nil,
490
- 'reddit_campaign' => 'https://www.reddit.com/r/spacex/comments/9p82jt/eshail_2_launch_campaign_thread/',
491
- 'reddit_launch' => nil,
492
- 'reddit_recovery' => nil,
493
- 'reddit_media' => nil,
494
- 'presskit' => nil,
495
- 'article_link' => nil,
496
- 'wikipedia' => nil,
497
- 'video_link' => nil,
498
- 'flickr_images' => []
499
- )
500
- expect(subject.first.details).to eq 'SpaceX\'s eighteenth flight of 2018 will '\
501
- 'be its first for Es\'hailSat. Es\'hail-2 is a communications satellite '\
502
- 'that will deliver television and internet to Qatar and the surrounding '\
503
- 'region. It will be launched into a geostationary transfer orbit from '\
504
- 'LC-39A at Kennedy Space Center. The booster is expected to land on OCISLY.'
505
- expect(subject.first.upcoming).to eq true
506
- expect(subject.first.static_fire_date_utc).to eq nil
507
- expect(subject.first.static_fire_date_unix).to eq nil
508
- end
509
-
510
- it 'returns the last upcoming launch' do
511
- expect(subject.last.flight_number).to eq 91
512
- expect(subject.last.mission_name).to eq 'GPS IIIA-3'
513
- expect(subject.last.mission_id).to eq []
514
- expect(subject.last.launch_year).to eq '2019'
515
- expect(subject.last.launch_date_unix).to eq 1_569_888_000
516
- expect(subject.last.launch_date_utc).to eq '2019-10-01T00:00:00.000Z'
517
- expect(subject.last.launch_date_local).to eq '2019-09-30T20:00:00-04:00'
518
- expect(subject.last.is_tentative).to eq true
519
- expect(subject.last.tentative_max_precision).to eq 'month'
520
- expect(subject.last.rocket.rocket_id).to eq 'falcon9'
521
- expect(subject.last.rocket.rocket_name).to eq 'Falcon 9'
522
- expect(subject.last.rocket.rocket_type).to eq 'FT'
523
- expect(subject.last.rocket.first_stage.cores).to be_an(Array)
524
- expect(subject.last.rocket.first_stage.cores.first).to eq(
525
- 'core_serial' => nil,
526
- 'flight' => nil,
527
- 'block' => nil,
528
- 'gridfins' => nil,
529
- 'legs' => nil,
530
- 'reused' => false,
531
- 'land_success' => nil,
532
- 'landing_intent' => nil,
533
- 'landing_type' => nil,
534
- 'landing_vehicle' => nil
535
- )
536
- expect(subject.last.rocket.second_stage.block).to eq nil
537
- expect(subject.last.rocket.second_stage.payloads).to be_an(Array)
538
- expect(subject.last.rocket.second_stage.payloads.first).to eq(
539
- 'payload_id' => 'GPS IIIA-3',
540
- 'norad_id' => [],
541
- 'reused' => false,
542
- 'customers' => ['USAF'],
543
- 'nationality' => 'United States',
544
- 'manufacturer' => 'Lockheed Martin',
545
- 'payload_type' => 'Satellite',
546
- 'payload_mass_kg' => 3880,
547
- 'payload_mass_lbs' => 8553.94,
548
- 'orbit' => 'MEO',
549
- 'orbit_params' => {
550
- 'reference_system' => nil,
551
- 'regime' => nil,
552
- 'longitude' => nil,
553
- 'semi_major_axis_km' => nil,
554
- 'eccentricity' => nil,
555
- 'periapsis_km' => nil,
556
- 'apoapsis_km' => nil,
557
- 'inclination_deg' => nil,
558
- 'period_min' => nil,
559
- 'lifespan_years' => 15,
560
- 'epoch' => nil,
561
- 'mean_motion' => nil,
562
- 'raan' => nil,
563
- 'arg_of_pericenter' => nil,
564
- 'mean_anomaly' => nil
565
- }
566
- )
567
- expect(subject.last.rocket.fairings).to eq(
568
- 'reused' => false,
569
- 'recovery_attempt' => nil,
570
- 'recovered' => nil,
571
- 'ship' => nil
572
- )
573
- expect(subject.last.ships).to eq []
574
- expect(subject.last.telemetry.flight_club).to eq nil
575
- expect(subject.last.launch_site).to eq(
576
- 'site_id' => 'ccafs_slc_40',
577
- 'site_name' => 'CCAFS SLC 40',
578
- 'site_name_long' => 'Cape Canaveral Air Force Station Space Launch Complex 40'
579
- )
580
- expect(subject.last.launch_success).to eq nil
581
- expect(subject.last.links).to eq(
582
- 'mission_patch' => nil,
583
- 'mission_patch_small' => nil,
584
- 'reddit_campaign' => nil,
585
- 'reddit_launch' => nil,
586
- 'reddit_recovery' => nil,
587
- 'reddit_media' => nil,
588
- 'presskit' => nil,
589
- 'article_link' => nil,
590
- 'wikipedia' => nil,
591
- 'video_link' => nil,
592
- 'flickr_images' => []
593
- )
594
- expect(subject.last.details).to eq nil
595
- expect(subject.last.upcoming).to eq true
596
- expect(subject.last.static_fire_date_utc).to eq nil
597
- expect(subject.last.static_fire_date_unix).to eq nil
598
- end
29
+ context '#next', vcr: { cassette_name: 'v4/launches/next' } do
30
+ subject { SPACEX::Launches.next }
31
+ it 'returns a SPACEX::Launches object' do
32
+ expect(subject).to be_a SPACEX::Launches
599
33
  end
600
34
  end
601
35
 
602
- context '#all', vcr: { cassette_name: 'launches/all' } do
603
- subject do
604
- SPACEX::Launches.all
605
- end
606
-
607
- it 'returns all launches' do
608
- expect(subject.first.flight_number).to eq 1
609
- expect(subject.first.mission_name).to eq 'FalconSat'
36
+ context '#past', vcr: { cassette_name: 'v4/launches/past' } do
37
+ subject { SPACEX::Launches.past }
38
+ it 'returns an array of SPACEX::Launches' do
39
+ expect(subject).to be_an Array
40
+ expect(subject.first).to be_a SPACEX::Launches
610
41
  end
611
42
  end
612
43
 
613
- context '#past', vcr: { cassette_name: 'launches/past' } do
614
- subject do
615
- SPACEX::Launches.past
616
- end
617
-
618
- it 'returns and array of launch hashes' do
44
+ context '#upcoming', vcr: { cassette_name: 'v4/launches/upcoming' } do
45
+ subject { SPACEX::Launches.upcoming }
46
+ it 'returns an array of SPACEX::Launches' do
619
47
  expect(subject).to be_an Array
620
- expect(subject.first).to be_a Hash
621
- end
622
-
623
- it 'returns the correct number of launches' do
624
- expect(subject.count).to eq 69
625
- end
626
-
627
- context 'returns past launches' do
628
- it 'returns the first launch' do
629
- expect(subject.first.flight_number).to eq(1)
630
- expect(subject.first.mission_name).to eq('FalconSat')
631
- expect(subject.first.rocket.rocket_name).to eq('Falcon 1')
632
- expect(subject.first.rocket.first_stage.cores.first.core_serial).to eq('Merlin1A')
633
- expect(subject.first.rocket.second_stage.payloads.first.payload_id).to eq('FalconSAT-2')
634
- expect(subject.first.rocket.second_stage.payloads.first.orbit_params.regime).to eq('low-earth')
635
- expect(subject.first.launch_site.site_id).to eq('kwajalein_atoll')
636
- expect(subject.first.launch_success).to eq(false)
637
- end
638
-
639
- it 'returns the last past launch' do
640
- expect(subject.last.flight_number).to eq(69)
641
- expect(subject.last.mission_name).to eq('SAOCOM 1A')
642
- expect(subject.last.rocket.rocket_name).to eq('Falcon 9')
643
- expect(subject.last.rocket.first_stage.cores.first.core_serial).to eq('B1048')
644
- expect(subject.last.rocket.second_stage.payloads.first.payload_id).to eq('SAOCOM 1A')
645
- expect(subject.last.rocket.second_stage.payloads.first.orbit_params.regime).to eq('sun-synchronous')
646
- expect(subject.last.launch_site.site_id).to eq('vafb_slc_4e')
647
- expect(subject.last.launch_success).to eq(true)
648
- end
48
+ expect(subject.first).to be_a SPACEX::Launches
649
49
  end
650
50
  end
651
51
  end