diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-02 19:30:09 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-02 19:30:09 -0800 |
commit | 4f1d1fc51baf396d49f6b159c84e15194706847c (patch) | |
tree | 3b4ff8c22e5eaa4276813d661b37192d3f538994 /app | |
parent | 7dad2663a671be5cc70db63333dfe033984452d0 (diff) | |
download | gitlab-ce-4f1d1fc51baf396d49f6b159c84e15194706847c.tar.gz |
Convert hashes to ruby 1.9 style
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/github_imports_controller.rb | 4 | ||||
-rw-r--r-- | app/helpers/emails_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/merge_requests_helper.rb | 2 | ||||
-rw-r--r-- | app/models/merge_request.rb | 2 | ||||
-rw-r--r-- | app/models/project.rb | 8 |
5 files changed, 9 insertions, 9 deletions
diff --git a/app/controllers/github_imports_controller.rb b/app/controllers/github_imports_controller.rb index 3c5448bc709..b73e3f7ffac 100644 --- a/app/controllers/github_imports_controller.rb +++ b/app/controllers/github_imports_controller.rb @@ -23,7 +23,7 @@ class GithubImportsController < ApplicationController end def jobs - jobs = current_user.created_projects.where(import_type: "github").to_json(:only => [:id, :import_status]) + jobs = current_user.created_projects.where(import_type: "github").to_json(only: [:id, :import_status]) render json: jobs end @@ -58,7 +58,7 @@ class GithubImportsController < ApplicationController def octo_client Octokit.auto_paginate = true - @octo_client ||= Octokit::Client.new(:access_token => current_user.github_access_token) + @octo_client ||= Octokit::Client.new(access_token: current_user.github_access_token) end def github_auth diff --git a/app/helpers/emails_helper.rb b/app/helpers/emails_helper.rb index b336263049c..92cc9c426b8 100644 --- a/app/helpers/emails_helper.rb +++ b/app/helpers/emails_helper.rb @@ -31,7 +31,7 @@ module EmailsHelper end def add_email_highlight_css - Rugments::Themes::Github.render(:scope => '.highlight') + Rugments::Themes::Github.render(scope: '.highlight') end def color_email_diff(diffcontent) diff --git a/app/helpers/merge_requests_helper.rb b/app/helpers/merge_requests_helper.rb index fe6fd5832fc..2c9aeba570a 100644 --- a/app/helpers/merge_requests_helper.rb +++ b/app/helpers/merge_requests_helper.rb @@ -15,7 +15,7 @@ module MergeRequestsHelper end def new_mr_from_push_event(event, target_project) - return :merge_request => { + return merge_request: { source_project_id: event.project.id, target_project_id: target_project.id, source_branch: event.branch_name, diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 715257f905f..ad2e8d7879b 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -76,7 +76,7 @@ class MergeRequest < ActiveRecord::Base merge_request.save end - after_transition :locked => (any - :locked) do |merge_request, transition| + after_transition locked: (any - :locked) do |merge_request, transition| merge_request.locked_at = nil merge_request.save end diff --git a/app/models/project.rb b/app/models/project.rb index f3dddc28adb..f314ed9bd25 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -156,22 +156,22 @@ class Project < ActiveRecord::Base end event :import_finish do - transition :started => :finished + transition started: :finished end event :import_fail do - transition :started => :failed + transition started: :failed end event :import_retry do - transition :failed => :started + transition failed: :started end state :started state :finished state :failed - after_transition any => :started, :do => :add_import_job + after_transition any => :started, do: :add_import_job end class << self |