Commit 59d0263b authored by Guilherme Garnier's avatar Guilherme Garnier

Fix rubocop warnings in lib

parent 2b075f16
...@@ -63,11 +63,11 @@ module API ...@@ -63,11 +63,11 @@ module API
user_project.build_missing_services user_project.build_missing_services
service_method = "#{underscored_service}_service" service_method = "#{underscored_service}_service"
send_service(service_method) send_service(service_method)
end end
end end
@project_service || not_found!("Service") @project_service || not_found!("Service")
end end
...@@ -149,7 +149,6 @@ module API ...@@ -149,7 +149,6 @@ module API
end end
def attributes_for_keys(keys, custom_params = nil) def attributes_for_keys(keys, custom_params = nil)
params_hash = custom_params || params
attrs = {} attrs = {}
keys.each do |key| keys.each do |key|
if params[key].present? or (params.has_key?(key) and params[key] == false) if params[key].present? or (params.has_key?(key) and params[key] == false)
......
...@@ -47,7 +47,7 @@ class EventFilter ...@@ -47,7 +47,7 @@ class EventFilter
actions << Event::COMMENTED if filter.include? 'comments' actions << Event::COMMENTED if filter.include? 'comments'
events = events.where(action: actions) events.where(action: actions)
end end
def options(key) def options(key)
......
...@@ -12,7 +12,6 @@ module Gitlab ...@@ -12,7 +12,6 @@ module Gitlab
@timestamps = {} @timestamps = {}
date_from = 1.year.ago date_from = 1.year.ago
date_to = Date.today
events = Event.reorder(nil).contributions.where(author_id: user.id). events = Event.reorder(nil).contributions.where(author_id: user.id).
where("created_at > ?", date_from).where(project_id: projects). where("created_at > ?", date_from).where(project_id: projects).
......
...@@ -14,8 +14,6 @@ module Gitlab ...@@ -14,8 +14,6 @@ module Gitlab
lines_arr = ::Gitlab::InlineDiff.processing lines lines_arr = ::Gitlab::InlineDiff.processing lines
lines_arr.each do |line| lines_arr.each do |line|
raw_line = line.dup
next if filename?(line) next if filename?(line)
full_line = html_escape(line.gsub(/\n/, '')) full_line = html_escape(line.gsub(/\n/, ''))
......
...@@ -23,7 +23,7 @@ module Gitlab ...@@ -23,7 +23,7 @@ module Gitlab
import_url: Project::UNKNOWN_IMPORT_URL import_url: Project::UNKNOWN_IMPORT_URL
).execute ).execute
import_data = project.create_import_data( project.create_import_data(
data: { data: {
'repo' => repo.raw_data, 'repo' => repo.raw_data,
'user_map' => user_map, 'user_map' => user_map,
......
...@@ -23,7 +23,7 @@ module Gitlab ...@@ -23,7 +23,7 @@ module Gitlab
import_url: repo.import_url import_url: repo.import_url
).execute ).execute
import_data = project.create_import_data( project.create_import_data(
data: { data: {
"repo" => repo.raw_data, "repo" => repo.raw_data,
"user_map" => user_map "user_map" => user_map
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment