summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-06-13 15:33:28 +0200
committerJames Lopez <james@jameslopez.es>2016-06-13 15:33:28 +0200
commite5cf4cd745514b81e7d12ef36f073823e5cdee96 (patch)
tree296355dc140bb4e87ddd0d506b827d9df45753ce
parent6f0c503397e184d2a68eec8d4285288abc29ce9a (diff)
downloadgitlab-ce-e5cf4cd745514b81e7d12ef36f073823e5cdee96.tar.gz
corrected a few warnings
-rw-r--r--lib/gitlab/import_export/importer.rb2
-rw-r--r--lib/gitlab/import_export/project_tree_restorer.rb2
-rw-r--r--lib/gitlab/import_export/repo_restorer.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/import_export/importer.rb b/lib/gitlab/import_export/importer.rb
index d73ce43b491..8020aab3da9 100644
--- a/lib/gitlab/import_export/importer.rb
+++ b/lib/gitlab/import_export/importer.rb
@@ -7,7 +7,7 @@ module Gitlab
new(*args).import
end
- def initialize(archive_file: , shared:)
+ def initialize(archive_file:, shared:)
@archive_file = archive_file
@shared = shared
end
diff --git a/lib/gitlab/import_export/project_tree_restorer.rb b/lib/gitlab/import_export/project_tree_restorer.rb
index dc1e477a82f..935bc2d7df9 100644
--- a/lib/gitlab/import_export/project_tree_restorer.rb
+++ b/lib/gitlab/import_export/project_tree_restorer.rb
@@ -73,7 +73,7 @@ module Gitlab
relation.values.flatten.each do |sub_relation|
if sub_relation.is_a?(Hash)
- relation_hash = relation_item[sub_relation.keys.first.to_s]
+ relation_hash = relation_item[sub_relation.keys.first.to_s]
sub_relation = sub_relation.keys.first
else
relation_hash = relation_item[sub_relation.to_s]
diff --git a/lib/gitlab/import_export/repo_restorer.rb b/lib/gitlab/import_export/repo_restorer.rb
index d6dcf5dc116..ef4d9c24067 100644
--- a/lib/gitlab/import_export/repo_restorer.rb
+++ b/lib/gitlab/import_export/repo_restorer.rb
@@ -11,7 +11,7 @@ module Gitlab
end
def restore
- return false unless File.exists?(@path_to_bundle) || wiki?
+ return false unless File.exist?(@path_to_bundle) || wiki?
FileUtils.mkdir_p(path_to_repo)