Skip to content

Commit bca9b91

Browse files
committed
change strings and remove trailing lines for the hound
1 parent 7eb3a2c commit bca9b91

File tree

12 files changed

+53
-65
lines changed

12 files changed

+53
-65
lines changed
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
class Badge::BobaFett
22
BADGE_ID = 7
3-
DISPLAY_NAME = "Boba Fett"
4-
SLUG = "bobafett"
3+
DISPLAY_NAME = 'Boba Fett'
4+
SLUG = 'bobafett'
55

66
include Badge
77

88
def description
9-
"Given to users who have attended 35 lessons."
9+
'Given to users who have attended 35 lessons.'
1010
end
1111

1212
def notification_bonus_message
13-
"Your knowledge is feared across many galaxies."
13+
'Your knowledge is feared across many galaxies.'
1414
end
1515

1616
def self.allocate_to_user?(user)
1717
user.attendances.count >= 35
1818
end
1919
end
20-

app/models/badges/ewok.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
class Badge::Ewok
22
BADGE_ID = 5
3-
DISPLAY_NAME = "Ewok"
4-
SLUG = "ewok"
3+
DISPLAY_NAME = 'Ewok'
4+
SLUG = 'ewok'
55

66
include Badge
77

88
def description
9-
"Given to users who have attended 5 lessons."
9+
'Given to users who have attended 5 lessons.'
1010
end
1111

1212
def notification_bonus_message
13-
"Congratulations! You are on the path."
13+
'Congratulations! You are on the path.'
1414
end
1515

1616
def self.allocate_to_user?(user)
1717
user.attendances.count >= 5
1818
end
1919
end
20-

app/models/badges/greedo.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
class Badge::Greedo
22
BADGE_ID = 6
3-
DISPLAY_NAME = "Greedo"
4-
SLUG = "greedo"
3+
DISPLAY_NAME = 'Greedo'
4+
SLUG = 'greedo'
55

66
include Badge
77

88
def description
9-
"Given to users who have attended 15 lessons."
9+
'Given to users who have attended 15 lessons.'
1010
end
1111

1212
def notification_bonus_message
13-
"Great work! You are on your way to Force Enlightment."
13+
'Great work! You are on your way to Force Enlightment.'
1414
end
1515

1616
def self.allocate_to_user?(user)
1717
user.attendances.count >= 15
1818
end
1919
end
20-

app/models/badges/han_solo.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
class Badge::HanSolo
22
BADGE_ID = 9
3-
DISPLAY_NAME = "Han Solo"
4-
SLUG = "hansolo"
3+
DISPLAY_NAME = 'Han Solo'
4+
SLUG = 'hansolo'
55

66
include Badge
77

88
def description
9-
"Given to users who have attended 100 lessons."
9+
'Given to users who have attended 100 lessons.'
1010
end
1111

1212
def notification_bonus_message
13-
"Youa are now the coolest person in RailsSchool."
13+
'Youa are now the coolest person in RailsSchool.'
1414
end
1515

1616
def self.allocate_to_user?(user)
1717
user.attendances.count >= 100
1818
end
1919
end
20-

app/models/badges/jabba.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
class Badge::Jabba
22
BADGE_ID = 8
3-
DISPLAY_NAME = "Jabba"
4-
SLUG = "jabba"
3+
DISPLAY_NAME = 'Jabba'
4+
SLUG = 'jabba'
55

66
include Badge
77

88
def description
9-
"Given to users who have attended 50 lessons."
9+
'Given to users who have attended 50 lessons.'
1010
end
1111

1212
def notification_bonus_message
13-
"Great work! You are growing great with knowledge."
13+
'Great work! You are growing great with knowledge.'
1414
end
1515

1616
def self.allocate_to_user?(user)
1717
user.attendances.count >= 50
1818
end
1919
end
20-

app/models/badges/jar_jar_binks.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
class Badge::JarJarBinks
22
BADGE_ID = 4
3-
DISPLAY_NAME = "Jar Jar Binks"
4-
SLUG = "jarjarbinks"
3+
DISPLAY_NAME = 'Jar Jar Binks'
4+
SLUG = 'jarjarbinks'
55

66
include Badge
77

88
def description
9-
"Given to users who have attended one lesson."
9+
'Given to users who have attended one lesson.'
1010
end
1111

1212
def notification_bonus_message
13-
"Welcome to RailsSchool! We hope you enjoyed your first class."
13+
'Welcome to RailsSchool! We hope you enjoyed your first class.'
1414
end
1515

1616
def self.allocate_to_user?(user)
1717
user.attendances.count >= 1
1818
end
1919
end
20-

spec/models/badges/boba_spec.rb renamed to spec/models/badges/boba_fett_spec.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,28 @@
22

33
describe Badge::BobaFett do
44

5-
describe ".allocate_to_user?" do
5+
describe '.allocate_to_user?' do
66
let(:user) { create(:user) }
77

88
subject { Badge::BobaFett.allocate_to_user?(user) }
99

10-
context "user did not attend any classes" do
10+
context 'user did not attend any classes' do
1111
it { should eq(false) }
1212
end
1313

14-
context "user attended less than 35 classes" do
14+
context 'user attended less than 35 classes' do
1515
before { 34.times { create(:attendance, user: user) } }
1616
it { should eq(false) }
1717
end
1818

19-
context "user attended exactly 35 classes" do
19+
context 'user attended exactly 35 classes' do
2020
before { 35.times { create(:attendance, user: user) } }
2121
it { should eq(true) }
2222
end
2323

24-
context "user attended more than 35" do
24+
context 'user attended more than 35' do
2525
before { 36.times { create(:attendance, user: user) } }
2626
it { should eq(true) }
2727
end
2828
end
2929
end
30-

spec/models/badges/ewok_spec.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,28 @@
22

33
describe Badge::Ewok do
44

5-
describe ".allocate_to_user?" do
5+
describe '.allocate_to_user?' do
66
let(:user) { create(:user) }
77

88
subject { Badge::Ewok.allocate_to_user?(user) }
99

10-
context "user did not attend any classes" do
10+
context 'user did not attend any classes' do
1111
it { should eq(false) }
1212
end
1313

14-
context "user attended less than 5 classes" do
14+
context 'user attended less than 5 classes' do
1515
before { 4.times { create(:attendance, user: user) } }
1616
it { should eq(false) }
1717
end
1818

19-
context "user attended exactly 5 classes" do
19+
context 'user attended exactly 5 classes' do
2020
before { 5.times { create(:attendance, user: user) } }
2121
it { should eq(true) }
2222
end
2323

24-
context "user attended more than 5 classes" do
24+
context 'user attended more than 5 classes' do
2525
before { 6.times { create(:attendance, user: user) } }
2626
it { should eq(true) }
2727
end
2828
end
2929
end
30-

spec/models/badges/greedo_spec.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,28 @@
22

33
describe Badge::Greedo do
44

5-
describe ".allocate_to_user?" do
5+
describe '.allocate_to_user?' do
66
let(:user) { create(:user) }
77

88
subject { Badge::Greedo.allocate_to_user?(user) }
99

10-
context "user did not attend any classes" do
10+
context 'user did not attend any classes' do
1111
it { should eq(false) }
1212
end
1313

14-
context "user attended less than 15 classes" do
14+
context 'user attended less than 15 classes' do
1515
before { 14.times { create(:attendance, user: user) } }
1616
it { should eq(false) }
1717
end
1818

19-
context "user attended exactly 15 classes" do
19+
context 'user attended exactly 15 classes' do
2020
before { 15.times { create(:attendance, user: user) } }
2121
it { should eq(true) }
2222
end
2323

24-
context "user attended more than 15 classes" do
24+
context 'user attended more than 15 classes' do
2525
before { 16.times { create(:attendance, user: user) } }
2626
it { should eq(true) }
2727
end
2828
end
2929
end
30-

spec/models/badges/han_solo_spec.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,28 @@
22

33
describe Badge::HanSolo do
44

5-
describe ".allocate_to_user?" do
5+
describe '.allocate_to_user?' do
66
let(:user) { create(:user) }
77

88
subject { Badge::HanSolo.allocate_to_user?(user) }
99

10-
context "user did not attend any classes" do
10+
context 'user did not attend any classes' do
1111
it { should eq(false) }
1212
end
1313

14-
context "user attended less than 100 classes" do
14+
context 'user attended less than 100 classes' do
1515
before { 99.times { create(:attendance, user: user) } }
1616
it { should eq(false) }
1717
end
1818

19-
context "user attended exactly 100 classes" do
19+
context 'user attended exactly 100 classes' do
2020
before { 100.times { create(:attendance, user: user) } }
2121
it { should eq(true) }
2222
end
2323

24-
context "user attended more than 100 classes" do
24+
context 'user attended more than 100 classes' do
2525
before { 101.times { create(:attendance, user: user) } }
2626
it { should eq(true) }
2727
end
2828
end
2929
end
30-

0 commit comments

Comments
 (0)