Skip to content

Commit 64d19ee

Browse files
authored
Merge pull request #1096 from rughh/chore/remove_colognerb
chore: remove colognerb
2 parents 054be95 + 6ad703b commit 64d19ee

File tree

15 files changed

+30
-202
lines changed

15 files changed

+30
-202
lines changed

app/assets/images/labels/cologne.ico

-32.2 KB
Binary file not shown.

app/assets/images/labels/cologne.png

-19.3 KB
Binary file not shown.

app/assets/javascripts/labels/cologne.js

-32
This file was deleted.

app/assets/stylesheets/labels/cologne.sass

-48
This file was deleted.

app/assets/stylesheets/labels/cologne/_colors.sass

-12
This file was deleted.

app/assets/stylesheets/labels/cologne/_dimensions.sass

-7
This file was deleted.

config/locales/de.label.yml

-7
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@ de:
1919
title: RUG::B
2020
subtitle: Ruby User Group Berlin
2121
meta_desc: RUG::B—Ruby User Group Berlin
22-
cologne:
23-
city: Köln
24-
name: Kölsch.rb
25-
title: Cologne.rb
26-
subtitle: Ruby User Group Cologne
27-
meta_desc: Ruby / Rails User Group Cologne
28-
custom_recurrence: "jeweils am 3. Mittwoch in jedem 2. Monat (Januar, März, Mai, Juli, September, November) um 19:00 Uhr"
2922
saar:
3023
city: Saarland
3124
name: RUGSaar

config/locales/en.label.yml

-7
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@ en:
1919
title: RUG::B
2020
subtitle: Ruby User Group Berlin
2121
meta_desc: RUG::B—Ruby User Group Berlin
22-
cologne:
23-
city: Köln
24-
name: Kölsch.rb
25-
title: Cologne.rb
26-
subtitle: Ruby User Group Cologne
27-
meta_desc: Ruby / Rails User Group Cologne
28-
custom_recurrence: "every 3rd Wednesday in every second month (January, March, May, July, September, November) at 7:00 p.m."
2922
saar:
3023
city: Saarland
3124
name: RUGSaar

config/locales/es.label.yml

-7
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@ es:
1919
title: RUG::B
2020
subtitle: Ruby User Group Berlin
2121
meta_desc: RUG::B—Ruby User Group Berlin
22-
cologne:
23-
city: Colonia
24-
name: Kölsch.rb
25-
title: Cologne.rb
26-
subtitle: Ruby User Group Cologne
27-
meta_desc: Ruby / Rails User Group Cologne
28-
custom_recurrence: 3er Miércoles de Enero, Marzo, Mayo, Julio, Septiembre y Noviembre, a las 19.00
2922
saar:
3023
city: Saarland
3124
name: RUGSaar

config/locales/pl.label.yml

-7
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@ pl:
1919
title: RUG::B
2020
subtitle: Ruby User Group Berlin
2121
meta_desc: RUG::B—Ruby User Group Berlin
22-
cologne:
23-
city: Köln
24-
name: Kölsch.rb
25-
title: Cologne.rb
26-
subtitle: Ruby User Group Cologne
27-
meta_desc: Ruby / Rails User Group Cologne
28-
custom_recurrence: "w trzecią środę nieparzystych miesięcy (styczeń, marzec, maj, lipiec, wrzesień, listopad) o 19:00"
2922
saar:
3023
city: Saarland
3124
name: RUGSaar

config/whitelabel.yml

-47
Original file line numberDiff line numberDiff line change
@@ -40,53 +40,6 @@
4040
:twitter: cocoaheads_hh
4141
tld: de
4242
coc: http://rubyberlin.github.io/code-of-conduct
43-
- !ruby/object:Usergroup
44-
label_id: cologne
45-
canonical_url: https://www.colognerb.de
46-
status: enabled
47-
default_locale: de
48-
country: Deutschland
49-
recurring: third wednesday
50-
51-
twitter: colognerb
52-
organizers:
53-
- jkwebs
54-
location:
55-
:zoom: 12
56-
:lat: 50.941231
57-
:long: 6.957092
58-
default_time_zone: Europe/Berlin
59-
imprint:
60-
:address: "An der Bottmühle 5\n50678 Köln"
61-
:contributors:
62-
- :name: Jakob Hilden
63-
64-
- :name: Marco Schaden
65-
66-
- :name: Railslove GmbH
67-
:email: http://railslove.com
68-
other_usergroups:
69-
- :name: Cologne.js
70-
:url: http://colognejs.de/
71-
:twitter: cgnjs
72-
- :name: DevHouse Friday
73-
:url: http://devhousefriday.org/
74-
:twitter: devhousefriday
75-
- :name: NoSQL User Group Cologne
76-
:url: http://www.nosql-cologne.org/
77-
:twitter: nosqlcgn
78-
- :name: pyCologne
79-
:url: http://wiki.python.de/pycologne/
80-
:twitter: pycologne
81-
- :name: hacken.in
82-
:url: http://hacken.in/
83-
tld: de
84-
coc: http://rubyberlin.github.io/code-of-conduct
85-
custom_recurring: true
86-
domains:
87-
- colognerb.de
88-
google_group: colognerb
89-
slackin_url: https://colognerb.fly.dev/slackin.js
9043
- !ruby/object:Usergroup
9144
label_id: saar
9245
default_locale: de

spec/helpers/external_link_helper_spec.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@
4242
end
4343

4444
describe '#mailing_list_url' do
45+
let(:colognerb) { Usergroup.from_name('colognerb').tap { _1.recurring = 'thrid wednesday' } }
46+
4547
it 'creates an url' do
4648
expect(helper.mailing_list_url).to eql('https://groups.google.com/group/rubyonrails-ug-germany')
47-
Whitelabel.with_label(Whitelabel.label_for('cologne')) do
49+
Whitelabel.with_label(colognerb) do
4850
expect(helper.mailing_list_url).to eql('https://groups.google.com/group/colognerb')
4951
end
5052
end

spec/models/location_spec.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
describe Location do
44
before do
55
@location = create(:location, name: 'Test-Location', street: 'Schanzenstr.', house_number: '85', zip: '20357', city: 'Hamburg')
6-
@other_location = create(:location, label: 'cologne')
76
@es_location = create(:location, label: 'madridrb')
87
@virtual_location = create(:virtual_location, label: 'madridrb')
98
end
@@ -29,7 +28,7 @@
2928
hamburg_locations = Location.all
3029
expect(hamburg_locations).to have(1).elements
3130
expect(hamburg_locations.first).to eql(@location)
32-
expect(Location.unscoped.size).to be(4)
31+
expect(Location.unscoped.size).to be(3)
3332
end
3433
end
3534

spec/models/usergroup_spec.rb

+8-23
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
let(:every_second_wednesday) { Usergroup.new.tap { |it| it.recurring = 'second wednesday 18:30' } }
55
let(:every_last_wednesday) { Usergroup.new.tap { |it| it.recurring = 'last wednesday 18:30' } }
66
let(:rughh) { Whitelabel.label_for('hamburg') }
7-
let(:colognerb) { Whitelabel.label_for('cologne') }
7+
let(:colognerb) { Usergroup.from_name('cologne').tap { _1.recurring = 'third wednesday 20:00' } }
88

99
context 'parsing of recurring' do
1010
context 'as string' do
@@ -78,13 +78,6 @@
7878
end
7979
end
8080

81-
describe '#custom_recurring' do
82-
specify do
83-
expect(colognerb.custom_recurring).to be true
84-
expect(rughh.custom_recurring).to be_nil
85-
end
86-
end
87-
8881
describe '#localized_custom_recurrence' do
8982
context 'no custom recurring' do
9083
it 'returns nil' do
@@ -93,31 +86,23 @@
9386
end
9487

9588
context 'with custom recurring' do
96-
specify 'de' do
97-
I18n.with_locale(:de) do
98-
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'
99-
end
89+
before do
90+
rughh.custom_recurring = true
10091
end
10192

102-
specify 'en' do
103-
I18n.with_locale(:en) do
104-
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.'
105-
end
106-
end
93+
specify 'de' do
94+
allow(I18n).to receive(:tw).with('custom_recurrence').and_return('custom_recurrence')
10795

108-
specify 'es' do
109-
I18n.with_locale(:es) do
110-
expect(colognerb.localized_custom_recurrence).to eql '3er Miércoles de Enero, Marzo, Mayo, Julio, Septiembre y Noviembre, a las 19.00'
111-
end
96+
expect(rughh.localized_custom_recurrence).to eql 'custom_recurrence'
11297
end
11398

11499
context 'translation for locale is missing (> es)' do
115100
it 'falls back to default_locale of Whitelabel (> de)' do
116101
I18n.with_locale(:es) do
117102
default_translation = 'jeweils am 3. Mittwoch in jedem 2. Monat (Januar, März, Mai, Juli, September, November) um 19:00 Uhr'
118103
allow(I18n).to receive(:tw).with('custom_recurrence').and_return('n/a')
119-
allow(I18n).to receive(:tw).with('custom_recurrence', locale: colognerb.default_locale).and_return(default_translation)
120-
expect(colognerb.localized_custom_recurrence).to eql default_translation
104+
allow(I18n).to receive(:tw).with('custom_recurrence', locale: rughh.default_locale).and_return(default_translation)
105+
expect(rughh.localized_custom_recurrence).to eql default_translation
121106
end
122107
end
123108
end

spec/requests/whitelabel_spec.rb

+18-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
require 'spec_helper'
22

33
describe 'Whitelabel' do
4+
let(:hamburg) { Usergroup.from_name('hamburg') }
5+
let(:berlin) { Usergroup.from_name('berlin') }
6+
let(:tokio) { Usergroup.from_name('tokio') }
7+
8+
around do |example|
9+
whitelabel_backup = Whitelabel.labels
10+
Whitelabel.labels = [
11+
hamburg,
12+
berlin,
13+
tokio
14+
]
15+
example.run
16+
ensure
17+
Whitelabel.labels = whitelabel_backup
18+
end
19+
420
context 'GET label page with non existing subdomain' do
521
it 'does not do an endless redirect but halts' do
622
host! 'www.onruby.test'
@@ -18,11 +34,11 @@
1834

1935
context 'GET page with custom domain' do
2036
it 'shows the label' do
21-
host! 'www.colognerb.de'
37+
host! 'www.tokio.de'
2238

2339
get root_url
2440
expect(response).to be_a_successful
25-
expect(Whitelabel[:label_id]).to eql('cologne')
41+
expect(Whitelabel[:label_id]).to eql(tokio.label_id)
2642
end
2743
end
2844
end

0 commit comments

Comments
 (0)