Skip to content

Commit 5416af4

Browse files
committed
Put four logos where they belong
Really is an integrator, not a global partner -- it was in :global because its link goes to Open Collective, which said more about how it pays us than about what it does. AnyCam serves more than Russia, so it leaves the territory-gated list for :integrators proper, next to GoodCam, and is now shown to everyone rather than only to Russian-speaking visitors. TUDSaT stays in :education, which was the reading rather than the instruction until now. Expo Electronica is a trade show and belongs in neither. It gets a group of its own, :exhibitions, which no page composes: kept in the system with its logo and link intact, rendered nowhere, ready for the exhibitions page that may come. That is the same treatment /merchandise got, and like that one it needs holding in place -- adding a group to a row is a word. A test asserts it appears on none of the seven pages that carry a wall. RU_INTEGRATORS is down to fifteen and the general integrator row is up to four, so English finally has a row that is not the same three logos.
1 parent c879995 commit 5416af4

2 files changed

Lines changed: 38 additions & 8 deletions

File tree

app/helpers/pages_helper.rb

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ module PagesHelper
1919
# Who hosts our money and our code.
2020
global: [
2121
{ name: 'Open Source Collective', url: 'https://www.oscollective.org/', img: 'partners/osc_mini.png' },
22-
{ name: 'GitHub', url: 'https://github.com/', img: 'partners/github_mini.png' },
23-
{ name: 'Really', url: 'https://opencollective.com/really-541ee976', img: 'partners/really_mini.png' }
22+
{ name: 'GitHub', url: 'https://github.com/', img: 'partners/github_mini.png' }
2423
],
2524
# Ships hardware with OpenIPC on it.
2625
manufacturers: [
@@ -33,7 +32,9 @@ module PagesHelper
3332
# group for Russian-speaking visitors only -- see partner_groups.
3433
integrators: [
3534
{ name: 'GoodCam', url: 'https://www.goodcam.io/', img: 'partners/goodcam_mini.png' },
36-
{ name: 'Faceter', url: 'https://faceter.cam/', img: 'partners/faceter_mini.png' }
35+
{ name: 'AnyCam', url: 'https://anycam.io/', img: 'partners/anycam_mini.png' },
36+
{ name: 'Faceter', url: 'https://faceter.cam/', img: 'partners/faceter_mini.png' },
37+
{ name: 'Really', url: 'https://opencollective.com/really-541ee976', img: 'partners/really_mini.png' }
3738
],
3839
# The FPV projects we grew up alongside.
3940
fpv: [
@@ -46,6 +47,13 @@ module PagesHelper
4647
{ name: 'TUDSaT', url: 'https://www.tudsat.space/', img: 'partners/tudsat_mini.png' },
4748
{ name: 'WuSpace', url: 'https://wuespace.de/', img: 'partners/wuespace_mini.png' }
4849
],
50+
# Kept in the system, rendered nowhere. There is no page for trade shows and
51+
# exhibitions yet; when there is, it asks for :exhibitions and both the logo
52+
# and the link are already here. Deliberately absent from HOME_PARTNER_ROWS
53+
# and from every partner_groups call -- a test holds it that way.
54+
exhibitions: [
55+
{ name: 'Expo Electronica', url: 'https://expoelectronica.ru/en/', img: 'partners/expo-electronica_mini.png' }
56+
],
4957
# Reverse engineering and silicon research we build on.
5058
research: [
5159
{ name: 'Linux Chenxing', url: 'https://linux-chenxing.org/', img: 'partners/linuxchenxing_mini.png' }
@@ -66,7 +74,6 @@ module PagesHelper
6674
{ name: 'Sputnik', url: 'https://sputnik.systems/', img: 'partners/sputnik_mini.png' },
6775
{ name: 'Techno-Shield', url: 'https://msvoko.ru/', img: 'partners/techno-shield_mini.png' },
6876
{ name: 'KeyTelecom', url: 'https://keytele.com/', img: 'partners/keytelecom_mini.png' },
69-
{ name: 'AnyCam', url: 'https://anycam.io/', img: 'partners/anycam_mini.png' },
7077
{ name: 'WebGlazok', url: 'https://webglazok.com/', img: 'partners/webglazok_mini.png' },
7178
{ name: 'Yucca', url: 'https://yucca.app/en', img: 'partners/yucca_mini.png' },
7279
{ name: 'IPEYE', url: 'https://ipeye.ru/', img: 'partners/ipeye_mini.png' },
@@ -83,7 +90,6 @@ module PagesHelper
8390
# { name: 'Flagman', url: 'https://flagman.org/', img: 'partners/flagman_mini.png' },
8491
# { name: 'Meldana', url: 'https://meldana.com/', img: 'partners/meldana_mini.png' },
8592
# { name: 'Binary Machines', url: 'https://bmachines.ru/', img: 'partners/binary-machines_mini.png' },
86-
# { name: 'Expo Electronica', url: 'https://expoelectronica.ru/en/', img: 'partners/expo-electronica_mini.png' },
8793
# { name: 'GAINS', url: 'https://gains.company/', img: 'partners/gain_mini.png' }
8894
].freeze
8995

test/controllers/relaunch_pages_test.rb

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,33 @@ class RelaunchPagesTest < ActionDispatch::IntegrationTest
206206
labels.each do |label|
207207
assert_includes response.body, I18n.t("site.partners.#{label}"), "the #{label} row is missing"
208208
end
209-
# Every group still reaches the page through one row or another.
210-
PagesHelper::PARTNER_GROUPS.each_value do |logos|
211-
logos.each { |l| assert_includes response.body, l[:img].sub('.png', '') }
209+
# Every group the rows name still reaches the page through one of them.
210+
PagesHelper::HOME_PARTNER_ROWS.each_value do |keys|
211+
keys.each do |key|
212+
PagesHelper::PARTNER_GROUPS.fetch(key).each do |logo|
213+
assert_includes response.body, logo[:img].sub('.png', '')
214+
end
215+
end
216+
end
217+
end
218+
219+
# :exhibitions is held in the system on purpose and shown on no page. There
220+
# is no trade-show page yet; when there is, it asks for the group and the
221+
# logo and link are already there. Until then this is what keeps it off the
222+
# site -- a group is easy to add to a row by accident.
223+
test 'the exhibitions group is kept but rendered nowhere' do
224+
held = PagesHelper::PARTNER_GROUPS.fetch(:exhibitions)
225+
226+
assert_not_empty held
227+
assert_not_includes PagesHelper::HOME_PARTNER_ROWS.values.flatten, :exhibitions
228+
229+
%w[/ /business /ecosystem /community /donate /low-latency /get-started].each do |path|
230+
get path
231+
232+
held.each do |logo|
233+
assert_not_includes response.body, logo[:img].sub('.png', ''),
234+
"#{logo[:name]} is being rendered on #{path}"
235+
end
212236
end
213237
end
214238

0 commit comments

Comments
 (0)