diff options
author | James Lopez <james@jameslopez.es> | 2016-04-08 15:07:12 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-04-08 15:07:12 +0200 |
commit | 5d642fb7aa666063d5e1761833463bc95241889a (patch) | |
tree | 34803b0241e245b724a0e890fbbf0b122795354f /app/services | |
parent | de6c44e983a788262b72355b85d085a675c9fccc (diff) | |
download | gitlab-ce-5d642fb7aa666063d5e1761833463bc95241889a.tar.gz |
fix rubocop warnings
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/projects/import_export/import_export_reader.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/services/projects/import_export/import_export_reader.rb b/app/services/projects/import_export/import_export_reader.rb index 981f19c0acb..e0617ce851c 100644 --- a/app/services/projects/import_export/import_export_reader.rb +++ b/app/services/projects/import_export/import_export_reader.rb @@ -38,7 +38,8 @@ module Projects def process_include(hash, included_classes_hash = {}) hash.values.flatten.each do |value| - current_key, value = process_current_class(hash, included_classes_hash, value) + current_key = hash.keys.first + value = process_current_class(hash, included_classes_hash, value) if included_classes_hash[current_key] add_class(current_key, included_classes_hash, value) else @@ -50,14 +51,13 @@ module Projects def process_current_class(hash, included_classes_hash, value) value = value.is_a?(Hash) ? process_include(hash, included_classes_hash) : value - current_key = hash.keys.first - only_except_hash = check_only_and_except(current_key) - included_classes_hash[current_key] ||= only_except_hash unless only_except_hash.empty? - return current_key, value + only_except_hash = check_only_and_except(hash.keys.first) + included_classes_hash[hash.keys.first] ||= only_except_hash unless only_except_hash.empty? + value end def add_new_class(current_key, included_classes_hash, value) - new_hash = { :include => value } + new_hash = { include: value } new_hash.merge!(check_only_and_except(value)) included_classes_hash[current_key] = new_hash end @@ -88,4 +88,4 @@ module Projects end end end -end
\ No newline at end of file +end |