Skip to content
This repository was archived by the owner on Mar 24, 2020. It is now read-only.

Commit 84da581

Browse files
hwengmcritchlow
authored andcommitted
Fxing rubocop offensive.
1 parent 70514a8 commit 84da581

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

app/controllers/dams_resource_controller.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,13 +210,13 @@ def osf_data
210210
end
211211

212212
def osf_delete
213-
@document = get_single_doc_via_search(1, {:q => "id:#{params[:id]}"} )
213+
@document = get_single_doc_via_search(1, q: "id:#{params[:id]}")
214214
authorize! :show, @document
215215
document = ShareNotify::PushDocument.new("http://library.ucsd.edu/dc/collection/#{params[:id]}", osf_date(@document))
216216
document.title = osf_title(@document)
217217
document.delete
218218
share_upload(document)
219-
redirect_to dams_collection_path(params[:id]), notice: "Your record has been deleted from OSF Share."
219+
redirect_to dams_collection_path(params[:id]), notice: 'Your record has been deleted from OSF Share.'
220220
end
221221

222222
def osf_push
@@ -227,7 +227,7 @@ def osf_push
227227
osf_contributors(@document).each do |contributor|
228228
document.add_contributor(contributor)
229229
end
230-
230+
231231
if document.valid?
232232
share_upload(document)
233233
redirect_to dams_collection_path(params[:id]), notice: "Your record has been pushed to OSF Share."
@@ -241,10 +241,10 @@ def share_upload(document)
241241
@headers = {
242242
'Authorization' => "Bearer #{share_config.fetch('token')}",
243243
'Content-Type' => 'application/vnd.api+json'
244-
}
245-
@route = "#{share_config.fetch('host')}api/v2/normalizeddata/"
244+
}
245+
@route = "#{share_config.fetch('host')}api/v2/normalizeddata/"
246246
@body = ShareNotify::Graph.new(document).to_share_v2.to_json
247-
@response = with_timeout { HTTParty.post(@route, body: @body, headers: @headers)}
247+
@response = with_timeout { HTTParty.post(@route, body: @body, headers: @headers) }
248248
end
249249

250250
def share_config

0 commit comments

Comments
 (0)