Skip to content

Commit 5252d6e

Browse files
committed
Format Ruby with Rufo
1 parent e0142d9 commit 5252d6e

File tree

7 files changed

+39
-39
lines changed

7 files changed

+39
-39
lines changed

app/controllers/manage/dashboard_controller.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ def application_distribution_data
6363
end
6464

6565
def schools_confirmed_data
66-
schools = Questionnaire.joins(:school).group('schools.name').where("acc_status = 'rsvp_confirmed'").order("schools.name ASC").count
67-
schools_riding = Questionnaire.joins(:school).group('schools.name').where("acc_status = 'rsvp_confirmed' AND bus_list_id").count
66+
schools = Questionnaire.joins(:school).group("schools.name").where("acc_status = 'rsvp_confirmed'").order("schools.name ASC").count
67+
schools_riding = Questionnaire.joins(:school).group("schools.name").where("acc_status = 'rsvp_confirmed' AND bus_list_id").count
6868
schools = schools.map do |name, count|
6969
bus_count_row = schools_riding.select { |school_bus_name, _| school_bus_name == name }
7070
bus_count = bus_count_row ? bus_count_row[name] || 0 : 0
@@ -73,7 +73,7 @@ def schools_confirmed_data
7373
end
7474
render json: [
7575
{ name: "Not riding bus", data: schools.sort_by { |_, no_bus, bus| [bus, no_bus] }.reverse },
76-
{ name: "Riding bus", data: schools_riding }
76+
{ name: "Riding bus", data: schools_riding },
7777
]
7878
end
7979

@@ -85,7 +85,7 @@ def schools_applied_data
8585
"late_waitlist" => {},
8686
"waitlist" => {},
8787
"accepted" => {},
88-
"rsvp_confirmed" => {}
88+
"rsvp_confirmed" => {},
8989
}
9090
# Temporary fix
9191
# result = Questionnaire.joins(:school).group(:acc_status, "schools.name").where("schools.questionnaire_count >= 5").order("schools.questionnaire_count DESC").order("schools.name ASC").count
@@ -104,7 +104,7 @@ def schools_applied_data
104104
{ name: "Late Waitlisted", data: counted_schools["late_waitlist"] },
105105
{ name: "RSVP Denied", data: counted_schools["rsvp_denied"] },
106106
{ name: "Denied", data: counted_schools["denied"] },
107-
{ name: "Pending", data: counted_schools["pending"] }
107+
{ name: "Pending", data: counted_schools["pending"] },
108108
]
109109
end
110110

test/factories/bus_list.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
"Bus List #{n}"
66
end
77
capacity { 50 }
8-
notes { "Notes!" }
8+
notes { "Notes!" }
99
end
1010
end

test/factories/fips.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FactoryBot.define do
22
factory :fips do
3-
fips_code { "36055" }
4-
city { "Rochester" }
5-
state { "NY" }
3+
fips_code { "36055" }
4+
city { "Rochester" }
5+
state { "NY" }
66
end
77
end

test/factories/message.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
FactoryBot.define do
22
factory :message do
3-
type { "bulk" }
4-
name { "Message Name" }
5-
subject { "Message Subject" }
6-
recipients { ["all"] }
7-
body { "Hello world!" }
8-
queued_at { nil }
3+
type { "bulk" }
4+
name { "Message Name" }
5+
subject { "Message Subject" }
6+
recipients { ["all"] }
7+
body { "Hello world!" }
8+
queued_at { nil }
99
delivered_at { nil }
1010
end
1111
end

test/factories/questionnaire.rb

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
FactoryBot.define do
22
factory :questionnaire do
3-
first_name { "John" }
4-
last_name { "Doe" }
5-
phone { "(123) 456-7890" }
6-
international { false }
7-
date_of_birth { Date.today - 20.years }
8-
experience { "first" }
9-
interest { "design" }
10-
school_id { create(:school).id }
11-
shirt_size { "Unisex - M" }
12-
dietary_restrictions { "" }
13-
special_needs { "" }
14-
agreement_accepted { true }
3+
first_name { "John" }
4+
last_name { "Doe" }
5+
phone { "(123) 456-7890" }
6+
international { false }
7+
date_of_birth { Date.today - 20.years }
8+
experience { "first" }
9+
interest { "design" }
10+
school_id { create(:school).id }
11+
shirt_size { "Unisex - M" }
12+
dietary_restrictions { "" }
13+
special_needs { "" }
14+
agreement_accepted { true }
1515
code_of_conduct_accepted { true }
1616
data_sharing_accepted { true }
17-
can_share_info { true }
18-
gender { "Male" }
19-
major { "Computer Science" }
20-
level_of_study { "University (Undergraduate)" }
21-
graduation_year { Date.today.year }
22-
race_ethnicity { "Other" }
23-
why_attend { "This sounds cool" }
17+
can_share_info { true }
18+
gender { "Male" }
19+
major { "Computer Science" }
20+
level_of_study { "University (Undergraduate)" }
21+
graduation_year { Date.today.year }
22+
race_ethnicity { "Other" }
23+
why_attend { "This sounds cool" }
2424

2525
association :user
2626
end

test/factories/school.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"University of Rails #{n}"
99
end
1010
address { "123 Fake Street" }
11-
city { "Rochester" }
12-
state { "NY" }
11+
city { "Rochester" }
12+
state { "NY" }
1313
questionnaire_count { 0 }
1414
end
1515
end

test/factories/temp_doorkeeper.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
factory :access_grant, class: "Doorkeeper::AccessGrant" do
55
sequence(:resource_owner_id) { |n| n }
66
application
7-
redirect_uri { 'https://app.com/callback' }
7+
redirect_uri { "https://app.com/callback" }
88
expires_in { 100 }
9-
scopes { 'public write' }
9+
scopes { "public write" }
1010
end
1111

1212
factory :access_token, class: "Doorkeeper::AccessToken" do
@@ -21,7 +21,7 @@
2121

2222
factory :application, class: "Doorkeeper::Application" do
2323
sequence(:name) { |n| "Application #{n}" }
24-
redirect_uri { 'https://app.com/callback' }
24+
redirect_uri { "https://app.com/callback" }
2525
end
2626

2727
# do not name this factory :user, otherwise it will conflict with factories

0 commit comments

Comments
 (0)