Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove colognerb #1096

Merged
merged 7 commits into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed app/assets/images/labels/cologne.ico
Binary file not shown.
Binary file removed app/assets/images/labels/cologne.png
Binary file not shown.
32 changes: 0 additions & 32 deletions app/assets/javascripts/labels/cologne.js

This file was deleted.

48 changes: 0 additions & 48 deletions app/assets/stylesheets/labels/cologne.sass

This file was deleted.

12 changes: 0 additions & 12 deletions app/assets/stylesheets/labels/cologne/_colors.sass

This file was deleted.

7 changes: 0 additions & 7 deletions app/assets/stylesheets/labels/cologne/_dimensions.sass

This file was deleted.

7 changes: 0 additions & 7 deletions config/locales/de.label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ de:
title: RUG::B
subtitle: Ruby User Group Berlin
meta_desc: RUG::B—Ruby User Group Berlin
cologne:
city: Köln
name: Kölsch.rb
title: Cologne.rb
subtitle: Ruby User Group Cologne
meta_desc: Ruby / Rails User Group Cologne
custom_recurrence: "jeweils am 3. Mittwoch in jedem 2. Monat (Januar, März, Mai, Juli, September, November) um 19:00 Uhr"
saar:
city: Saarland
name: RUGSaar
Expand Down
7 changes: 0 additions & 7 deletions config/locales/en.label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ en:
title: RUG::B
subtitle: Ruby User Group Berlin
meta_desc: RUG::B—Ruby User Group Berlin
cologne:
city: Köln
name: Kölsch.rb
title: Cologne.rb
subtitle: Ruby User Group Cologne
meta_desc: Ruby / Rails User Group Cologne
custom_recurrence: "every 3rd Wednesday in every second month (January, March, May, July, September, November) at 7:00 p.m."
saar:
city: Saarland
name: RUGSaar
Expand Down
7 changes: 0 additions & 7 deletions config/locales/es.label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ es:
title: RUG::B
subtitle: Ruby User Group Berlin
meta_desc: RUG::B—Ruby User Group Berlin
cologne:
city: Colonia
name: Kölsch.rb
title: Cologne.rb
subtitle: Ruby User Group Cologne
meta_desc: Ruby / Rails User Group Cologne
custom_recurrence: 3er Miércoles de Enero, Marzo, Mayo, Julio, Septiembre y Noviembre, a las 19.00
saar:
city: Saarland
name: RUGSaar
Expand Down
7 changes: 0 additions & 7 deletions config/locales/pl.label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ pl:
title: RUG::B
subtitle: Ruby User Group Berlin
meta_desc: RUG::B—Ruby User Group Berlin
cologne:
city: Köln
name: Kölsch.rb
title: Cologne.rb
subtitle: Ruby User Group Cologne
meta_desc: Ruby / Rails User Group Cologne
custom_recurrence: "w trzecią środę nieparzystych miesięcy (styczeń, marzec, maj, lipiec, wrzesień, listopad) o 19:00"
saar:
city: Saarland
name: RUGSaar
Expand Down
47 changes: 0 additions & 47 deletions config/whitelabel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,53 +40,6 @@
:twitter: cocoaheads_hh
tld: de
coc: http://rubyberlin.github.io/code-of-conduct
- !ruby/object:Usergroup
label_id: cologne
canonical_url: https://www.colognerb.de
status: enabled
default_locale: de
country: Deutschland
recurring: third wednesday
email: [email protected]
twitter: colognerb
organizers:
- jkwebs
location:
:zoom: 12
:lat: 50.941231
:long: 6.957092
default_time_zone: Europe/Berlin
imprint:
:address: "An der Bottmühle 5\n50678 Köln"
:contributors:
- :name: Jakob Hilden
:email: [email protected]
- :name: Marco Schaden
:email: [email protected]
- :name: Railslove GmbH
:email: http://railslove.com
other_usergroups:
- :name: Cologne.js
:url: http://colognejs.de/
:twitter: cgnjs
- :name: DevHouse Friday
:url: http://devhousefriday.org/
:twitter: devhousefriday
- :name: NoSQL User Group Cologne
:url: http://www.nosql-cologne.org/
:twitter: nosqlcgn
- :name: pyCologne
:url: http://wiki.python.de/pycologne/
:twitter: pycologne
- :name: hacken.in
:url: http://hacken.in/
tld: de
coc: http://rubyberlin.github.io/code-of-conduct
custom_recurring: true
domains:
- colognerb.de
google_group: colognerb
slackin_url: https://colognerb.fly.dev/slackin.js
- !ruby/object:Usergroup
label_id: saar
default_locale: de
Expand Down
4 changes: 3 additions & 1 deletion spec/helpers/external_link_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@
end

describe '#mailing_list_url' do
let(:colognerb) { Usergroup.from_name('colognerb').tap { _1.recurring = 'thrid wednesday' } }

it 'creates an url' do
expect(helper.mailing_list_url).to eql('https://groups.google.com/group/rubyonrails-ug-germany')
Whitelabel.with_label(Whitelabel.label_for('cologne')) do
Whitelabel.with_label(colognerb) do
expect(helper.mailing_list_url).to eql('https://groups.google.com/group/colognerb')
end
end
Expand Down
3 changes: 1 addition & 2 deletions spec/models/location_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
describe Location do
before do
@location = create(:location, name: 'Test-Location', street: 'Schanzenstr.', house_number: '85', zip: '20357', city: 'Hamburg')
@other_location = create(:location, label: 'cologne')
@es_location = create(:location, label: 'madridrb')
@virtual_location = create(:virtual_location, label: 'madridrb')
end
Expand All @@ -29,7 +28,7 @@
hamburg_locations = Location.all
expect(hamburg_locations).to have(1).elements
expect(hamburg_locations.first).to eql(@location)
expect(Location.unscoped.size).to be(4)
expect(Location.unscoped.size).to be(3)
end
end

Expand Down
31 changes: 8 additions & 23 deletions spec/models/usergroup_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
let(:every_second_wednesday) { Usergroup.new.tap { |it| it.recurring = 'second wednesday 18:30' } }
let(:every_last_wednesday) { Usergroup.new.tap { |it| it.recurring = 'last wednesday 18:30' } }
let(:rughh) { Whitelabel.label_for('hamburg') }
let(:colognerb) { Whitelabel.label_for('cologne') }
let(:colognerb) { Usergroup.from_name('cologne').tap { _1.recurring = 'third wednesday 20:00' } }

context 'parsing of recurring' do
context 'as string' do
Expand Down Expand Up @@ -78,13 +78,6 @@
end
end

describe '#custom_recurring' do
specify do
expect(colognerb.custom_recurring).to be true
expect(rughh.custom_recurring).to be_nil
end
end

describe '#localized_custom_recurrence' do
context 'no custom recurring' do
it 'returns nil' do
Expand All @@ -93,31 +86,23 @@
end

context 'with custom recurring' do
specify 'de' do
I18n.with_locale(:de) do
expect(colognerb.localized_custom_recurrence).to eql 'jeweils am 3. Mittwoch in jedem 2. Monat (Januar, März, Mai, Juli, September, November) um 19:00 Uhr'
end
before do
rughh.custom_recurring = true
end

specify 'en' do
I18n.with_locale(:en) do
expect(colognerb.localized_custom_recurrence).to eql 'every 3rd Wednesday in every second month (January, March, May, July, September, November) at 7:00 p.m.'
end
end
specify 'de' do
allow(I18n).to receive(:tw).with('custom_recurrence').and_return('custom_recurrence')

specify 'es' do
I18n.with_locale(:es) do
expect(colognerb.localized_custom_recurrence).to eql '3er Miércoles de Enero, Marzo, Mayo, Julio, Septiembre y Noviembre, a las 19.00'
end
expect(rughh.localized_custom_recurrence).to eql 'custom_recurrence'
end

context 'translation for locale is missing (> es)' do
it 'falls back to default_locale of Whitelabel (> de)' do
I18n.with_locale(:es) do
default_translation = 'jeweils am 3. Mittwoch in jedem 2. Monat (Januar, März, Mai, Juli, September, November) um 19:00 Uhr'
allow(I18n).to receive(:tw).with('custom_recurrence').and_return('n/a')
allow(I18n).to receive(:tw).with('custom_recurrence', locale: colognerb.default_locale).and_return(default_translation)
expect(colognerb.localized_custom_recurrence).to eql default_translation
allow(I18n).to receive(:tw).with('custom_recurrence', locale: rughh.default_locale).and_return(default_translation)
expect(rughh.localized_custom_recurrence).to eql default_translation
end
end
end
Expand Down
20 changes: 18 additions & 2 deletions spec/requests/whitelabel_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
require 'spec_helper'

describe 'Whitelabel' do
let(:hamburg) { Usergroup.from_name('hamburg') }
let(:berlin) { Usergroup.from_name('berlin') }
let(:tokio) { Usergroup.from_name('tokio') }

around do |example|
whitelabel_backup = Whitelabel.labels
Whitelabel.labels = [
hamburg,
berlin,
tokio
]
example.run
ensure
Whitelabel.labels = whitelabel_backup
end

context 'GET label page with non existing subdomain' do
it 'does not do an endless redirect but halts' do
host! 'www.onruby.test'
Expand All @@ -18,11 +34,11 @@

context 'GET page with custom domain' do
it 'shows the label' do
host! 'www.colognerb.de'
host! 'www.tokio.de'

get root_url
expect(response).to be_a_successful
expect(Whitelabel[:label_id]).to eql('cologne')
expect(Whitelabel[:label_id]).to eql(tokio.label_id)
end
end
end
Loading