Skip to content

Commit ef508bc

Browse files
committed
Merge branch 'master' into av-change-attendee-application-form
2 parents 5a19c59 + 4295aca commit ef508bc

30 files changed

+229
-66
lines changed

.rubocop.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,15 @@ Layout/HashAlignment:
1616

1717
Naming/PredicateName:
1818
Enabled: false
19+
20+
Style/MutableConstant:
21+
Enabled: false
22+
23+
Style/HashEachMethods:
24+
Enabled: false
25+
26+
Style/HashTransformKeys:
27+
Enabled: false
28+
29+
Style/HashTransformValues:
30+
Enabled: false

.rubocop_todo.yml

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
1212
Bundler/DuplicatedGem:
1313
Exclude:
14-
- 'Gemfile'
14+
- "Gemfile"
1515

1616
# Offense count: 4
1717
# Cop supports --auto-correct.
1818
# Configuration parameters: TreatCommentsAsGroupSeparators, Include.
1919
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
2020
Bundler/OrderedGems:
2121
Exclude:
22-
- 'Gemfile'
22+
- "Gemfile"
2323

2424
# Offense count: 4
2525
# Cop supports --auto-correct.
@@ -46,7 +46,7 @@ Layout/BlockAlignment:
4646
# Cop supports --auto-correct.
4747
Layout/CommentIndentation:
4848
Exclude:
49-
- 'app/helpers/admin/templates_helper.rb'
49+
- "app/helpers/admin/templates_helper.rb"
5050

5151
# Offense count: 2
5252
# Cop supports --auto-correct.
@@ -66,7 +66,7 @@ Layout/DotPosition:
6666
# Cop supports --auto-correct.
6767
Layout/EmptyLineAfterGuardClause:
6868
Exclude:
69-
- 'app/models/application.rb'
69+
- "app/models/application.rb"
7070

7171
# Offense count: 2
7272
# Cop supports --auto-correct.
@@ -84,7 +84,7 @@ Layout/EmptyLinesAroundBlockBody:
8484
# Cop supports --auto-correct.
8585
Layout/EmptyLinesAroundMethodBody:
8686
Exclude:
87-
- 'app/controllers/admin/templates_controller.rb'
87+
- "app/controllers/admin/templates_controller.rb"
8888

8989
# Offense count: 6
9090
# Cop supports --auto-correct.
@@ -118,13 +118,13 @@ Layout/LeadingCommentSpace:
118118
# SupportedStyles: aligned, indented, indented_relative_to_receiver
119119
Layout/MultilineMethodCallIndentation:
120120
Exclude:
121-
- 'app/controllers/admin/coach_applications_controller.rb'
121+
- "app/controllers/admin/coach_applications_controller.rb"
122122

123123
# Offense count: 1
124124
# Cop supports --auto-correct.
125125
Layout/RescueEnsureAlignment:
126126
Exclude:
127-
- 'app/helpers/admin/templates_helper.rb'
127+
- "app/helpers/admin/templates_helper.rb"
128128

129129
# Offense count: 2
130130
# Cop supports --auto-correct.
@@ -135,7 +135,7 @@ Layout/SpaceAfterComma:
135135
# Cop supports --auto-correct.
136136
Layout/SpaceBeforeComma:
137137
Exclude:
138-
- 'db/migrate/20180122202409_add_event_time.rb'
138+
- "db/migrate/20180122202409_add_event_time.rb"
139139

140140
# Offense count: 2
141141
# Cop supports --auto-correct.
@@ -144,7 +144,7 @@ Layout/SpaceBeforeComma:
144144
# SupportedStylesForEmptyBrackets: space, no_space
145145
Layout/SpaceInsideArrayLiteralBrackets:
146146
Exclude:
147-
- 'config/environments/production.rb'
147+
- "config/environments/production.rb"
148148

149149
# Offense count: 6
150150
# Cop supports --auto-correct.
@@ -153,7 +153,7 @@ Layout/SpaceInsideArrayLiteralBrackets:
153153
# SupportedStylesForEmptyBraces: space, no_space
154154
Layout/SpaceInsideHashLiteralBraces:
155155
Exclude:
156-
- 'test/controllers/applications_controller_test.rb'
156+
- "test/controllers/applications_controller_test.rb"
157157

158158
# Offense count: 11
159159
# Cop supports --auto-correct.
@@ -174,7 +174,7 @@ Layout/Tab:
174174
# SupportedStyles: final_newline, final_blank_line
175175
Layout/TrailingEmptyLines:
176176
Exclude:
177-
- 'app/controllers/sessions_controller.rb'
177+
- "app/controllers/sessions_controller.rb"
178178

179179
# Offense count: 15
180180
# Cop supports --auto-correct.
@@ -185,7 +185,7 @@ Layout/TrailingWhitespace:
185185
# Offense count: 1
186186
Lint/UselessAssignment:
187187
Exclude:
188-
- 'app/controllers/admin/applications_controller.rb'
188+
- "app/controllers/admin/applications_controller.rb"
189189

190190
# Offense count: 10
191191
Metrics/AbcSize:
@@ -202,14 +202,6 @@ Metrics/BlockLength:
202202
Metrics/MethodLength:
203203
Max: 34
204204

205-
# Offense count: 3
206-
# Cop supports --auto-correct.
207-
# Configuration parameters: EnforcedStyle.
208-
# SupportedStyles: braces, no_braces, context_dependent
209-
Style/BracesAroundHashParameters:
210-
Exclude:
211-
- 'test/system/edit_event_test.rb'
212-
213205
# Offense count: 18
214206
# Cop supports --auto-correct.
215207
# Configuration parameters: AutoCorrect, EnforcedStyle.
@@ -223,7 +215,7 @@ Style/ClassAndModuleChildren:
223215
# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW
224216
Style/CommentAnnotation:
225217
Exclude:
226-
- 'app/helpers/admin/templates_helper.rb'
218+
- "app/helpers/admin/templates_helper.rb"
227219

228220
# Offense count: 64
229221
Style/Documentation:
@@ -264,7 +256,7 @@ Style/HashSyntax:
264256
# Configuration parameters: AllowIfModifier.
265257
Style/IfInsideElse:
266258
Exclude:
267-
- 'app/controllers/applications_controller.rb'
259+
- "app/controllers/applications_controller.rb"
268260

269261
# Offense count: 4
270262
# Cop supports --auto-correct.
@@ -280,14 +272,14 @@ Style/MixinUsage:
280272
# Configuration parameters: MinDigits, Strict.
281273
Style/NumericLiterals:
282274
Exclude:
283-
- 'db/schema.rb'
275+
- "db/schema.rb"
284276

285277
# Offense count: 1
286278
# Cop supports --auto-correct.
287279
# Configuration parameters: PreferredDelimiters.
288280
Style/PercentLiteralDelimiters:
289281
Exclude:
290-
- 'config/spring.rb'
282+
- "config/spring.rb"
291283

292284
# Offense count: 2
293285
# Cop supports --auto-correct.
@@ -300,7 +292,7 @@ Style/RedundantBegin:
300292
# SupportedStyles: implicit, explicit
301293
Style/RescueStandardError:
302294
Exclude:
303-
- 'app/helpers/admin/templates_helper.rb'
295+
- "app/helpers/admin/templates_helper.rb"
304296

305297
# Offense count: 2
306298
# Cop supports --auto-correct.
@@ -313,7 +305,7 @@ Style/SafeNavigation:
313305
# Cop supports --auto-correct.
314306
Style/StderrPuts:
315307
Exclude:
316-
- 'bin/yarn'
308+
- "bin/yarn"
317309

318310
# Offense count: 567
319311
# Cop supports --auto-correct.
@@ -342,7 +334,7 @@ Style/SymbolArray:
342334
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
343335
Style/TrailingCommaInHashLiteral:
344336
Exclude:
345-
- 'app/helpers/admin/templates_helper.rb'
337+
- "app/helpers/admin/templates_helper.rb"
346338

347339
# Offense count: 122
348340
# Cop supports --auto-correct.

Gemfile.lock

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ GEM
121121
nokogiri (1.10.8)
122122
mini_portile2 (~> 2.4.0)
123123
parallel (1.19.1)
124-
parser (2.7.0.1)
124+
parser (2.7.0.2)
125125
ast (~> 2.4.0)
126126
pg (0.21.0)
127127
pry (0.12.2)
@@ -163,11 +163,13 @@ GEM
163163
ffi (~> 1.0)
164164
rb-readline (0.5.5)
165165
regexp_parser (1.6.0)
166-
rubocop (0.79.0)
166+
rexml (3.2.4)
167+
rubocop (0.80.0)
167168
jaro_winkler (~> 1.5.1)
168169
parallel (~> 1.10)
169170
parser (>= 2.7.0.1)
170171
rainbow (>= 2.2.2, < 4.0)
172+
rexml
171173
ruby-progressbar (~> 1.7)
172174
unicode-display_width (>= 1.4.0, < 1.7)
173175
ruby-progressbar (1.10.1)
@@ -206,7 +208,7 @@ GEM
206208
thread_safe (~> 0.1)
207209
uglifier (4.2.0)
208210
execjs (>= 0.3.0, < 3)
209-
unicode-display_width (1.6.0)
211+
unicode-display_width (1.6.1)
210212
web-console (3.7.0)
211213
actionview (>= 5.0)
212214
activemodel (>= 5.0)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ This repo is the open source project for the **code curious app** that aims to h
66

77
## Technical Requirements
88

9-
- Ruby '~> 2.3.x'
9+
- Ruby '~> 2.6.5'
1010
- Bundler
11-
- Ruby on Rails '~> 5.2.3'
11+
- Ruby on Rails '~> 5.2.x'
1212
- PostgreSQL '~> 9.5.x'
1313

1414
## How to set up

app/assets/stylesheets/application.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,13 @@ input[type=submit].button_link {
219219
margin-top: 100px;
220220
}
221221

222+
#info-for-coaches {
223+
background-color: #e7f6fd;
224+
text-align: center;
225+
border: thin solid #1e64b4;
226+
color: #1e64b4;
227+
}
228+
222229
/*Table*/
223230

224231
table {

app/controllers/admin/events_controller.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,13 @@ def event_params
7171
:copy_templates_from_event_id,
7272
:confirmation_deadline,
7373
:reminder_date,
74-
:coach_registration_enabled)
74+
:coach_registration_enabled,
75+
:coach_the_coaches_date,
76+
:coach_the_coaches_start_time,
77+
:coach_the_coaches_end_time,
78+
:installation_get_together_date,
79+
:installation_get_together_start_time,
80+
:installation_get_together_end_time)
7581
end
7682

7783
def send_selection_emails(applications)

app/controllers/coach_applications_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def find_coach_application
5656

5757
def create_coach_application_params
5858
params.require(:coach_application).
59-
permit(:installationparty, :workshopday, :lightningtalk, :notes, :first_time_coaching)
59+
permit(:installationparty, :workshopday, :lightningtalk, :notes, :first_time_coaching, :coach_the_coaches, :sponsor)
6060
end
6161

6262
def check_application_status

app/controllers/coaches_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def update
3636

3737
def coach_params
3838
params.require(:coach).permit(:name,
39-
:female,
39+
:gender,
4040
:language_en,
4141
:language_de,
4242
:notifications,

app/helpers/coaches_helper.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module CoachesHelper
2+
def genders_for_form
3+
Coach::GENDERS.map do |gender|
4+
[gender.to_s.humanize, gender]
5+
end
6+
end
7+
end

app/models/coach.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
class Coach < ApplicationRecord
2+
GENDERS = [:female, :male, :other, :prefer_not_to_say]
23
belongs_to :user
34
accepts_nested_attributes_for :user
45
has_many :coach_applications

0 commit comments

Comments
 (0)