Skip to content

Commit 8190cb0

Browse files
committed
Update private repo methods
Use the "newer" style of declaring private and make update_repo_info public
1 parent e540621 commit 8190cb0

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

app/models/repo.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,31 +223,29 @@ def self.find_by_full_name(full_name)
223223
Repo.find_by!(full_name: full_name)
224224
end
225225

226-
private
227-
228226
def update_repo_info!
229227
UpdateRepoInfoJob.perform_later(self)
230228
end
231229

232-
def downcase_name
230+
private def downcase_name
233231
self.name.downcase!
234232
self.user_name.downcase!
235233
end
236234

237-
def set_full_name!
235+
private def set_full_name!
238236
if self.full_name && user_name.blank?
239237
self.user_name, self.name = self.full_name.split("/")
240238
else
241239
self.full_name = "#{user_name}/#{name}"
242240
end
243241
end
244242

245-
def strip_whitespaces
243+
private def strip_whitespaces
246244
self.name.strip!
247245
self.user_name.strip!
248246
end
249247

250-
def github_url_exists
248+
private def github_url_exists
251249
if issues_fetcher.error?
252250
errors.add(
253251
:expiration_date,

0 commit comments

Comments
 (0)