From 3baf3dc955dfaad2961bba548dab940b55dfa68e Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Tue, 1 Aug 2017 14:34:11 +0200 Subject: Rename GitLabProjectImporterService and misc fixes First round of review, main changes: - templates.title is human readable, #name will be passed around - GitLabProjectImporterService has been renamed --- lib/gitlab/import_export.rb | 2 +- lib/gitlab/project_template.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/gitlab/import_export.rb b/lib/gitlab/import_export.rb index 9f23d29218b..30b536383f9 100644 --- a/lib/gitlab/import_export.rb +++ b/lib/gitlab/import_export.rb @@ -17,7 +17,7 @@ module Gitlab def import_upload_path(filename:) milliseconds = Process.clock_gettime(Process::CLOCK_REALTIME, :millisecond) - File.join(storage_path, 'uploads', "#{millisecond}-#{filename}") + File.join(storage_path, 'uploads', "#{milliseconds}-#{filename}") end def project_filename diff --git a/lib/gitlab/project_template.rb b/lib/gitlab/project_template.rb index d90ba240fde..cf461adf697 100644 --- a/lib/gitlab/project_template.rb +++ b/lib/gitlab/project_template.rb @@ -24,13 +24,13 @@ module Gitlab name == other.name && title == other.title end - TemplatesTable = [ + TEMPLATES_TABLE = [ ProjectTemplate.new('rails', 'Ruby on Rails') ].freeze class << self def all - TemplatesTable + TEMPLATES_TABLE end def find(name) -- cgit v1.2.1