diff options
author | Ciro Santilli <ciro.santilli@gmail.com> | 2014-10-19 00:36:00 +0400 |
---|---|---|
committer | Ciro Santilli <ciro.santilli@gmail.com> | 2014-10-19 00:41:39 +0400 |
commit | 290104219652592a221bfe100a7bbbbee69390fb (patch) | |
tree | e5040792e7274c9d3cff49ed6b59cddebc27f845 | |
parent | 3880bb61760ef1f69b0df49148202ff6b4208f01 (diff) |
Replace match with end_with: more readable, faster
-rw-r--r-- | lib/tasks/gitlab/shell.rake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tasks/gitlab/shell.rake b/lib/tasks/gitlab/shell.rake index a8f26a7c029..c3d1aa0125d 100644 --- a/lib/tasks/gitlab/shell.rake +++ b/lib/tasks/gitlab/shell.rake @@ -11,7 +11,7 @@ namespace :gitlab do home_dir = Rails.env.test? ? Rails.root.join('tmp/tests') : Settings.gitlab.user_home gitlab_url = Settings.gitlab.url # gitlab-shell requires a / at the end of the url - gitlab_url += "/" unless gitlab_url.match(/\/$/) + gitlab_url += '/' unless gitlab_url.end_with?('/') repos_path = Gitlab.config.gitlab_shell.repos_path target_dir = Gitlab.config.gitlab_shell.path |