Commit ac525a74 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #1219 from tsigo/ruby19_hashes

Fully embrace Ruby 1.9 hash syntax
parents 1413c23c 42d3295d
class CommitLoad < BaseContext class CommitLoad < BaseContext
def execute def execute
result = { result = {
:commit => nil, commit: nil,
:suppress_diff => false, suppress_diff: false,
:line_notes => [], line_notes: [],
:notes_count => 0, notes_count: 0,
:note => nil note: nil
} }
commit = project.commit(params[:id]) commit = project.commit(params[:id])
......
...@@ -12,12 +12,12 @@ class IssuesBulkUpdateContext < BaseContext ...@@ -12,12 +12,12 @@ class IssuesBulkUpdateContext < BaseContext
opts[:assignee_id] = assignee_id if assignee_id.present? opts[:assignee_id] = assignee_id if assignee_id.present?
opts[:closed] = (status == "closed") if status.present? opts[:closed] = (status == "closed") if status.present?
issues = Issue.where(:id => issues_ids).all issues = Issue.where(id: issues_ids).all
issues = issues.select { |issue| can?(current_user, :modify_issue, issue) } issues = issues.select { |issue| can?(current_user, :modify_issue, issue) }
issues.each { |issue| issue.update_attributes(opts) } issues.each { |issue| issue.update_attributes(opts) }
{ {
:count => issues.count, count: issues.count,
:success => !issues.count.zero? success: !issues.count.zero?
} }
end end
end end
......
...@@ -2,7 +2,7 @@ class Admin::ProjectsController < ApplicationController ...@@ -2,7 +2,7 @@ class Admin::ProjectsController < ApplicationController
layout "admin" layout "admin"
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :authenticate_admin! before_filter :authenticate_admin!
before_filter :admin_project, :only => [:edit, :show, :update, :destroy, :team_update] before_filter :admin_project, only: [:edit, :show, :update, :destroy, :team_update]
def index def index
@admin_projects = Project.scoped @admin_projects = Project.scoped
...@@ -36,7 +36,7 @@ class Admin::ProjectsController < ApplicationController ...@@ -36,7 +36,7 @@ class Admin::ProjectsController < ApplicationController
if @admin_project.save if @admin_project.save
redirect_to [:admin, @admin_project], notice: 'Project was successfully created.' redirect_to [:admin, @admin_project], notice: 'Project was successfully created.'
else else
render :action => "new" render action: "new"
end end
end end
...@@ -50,7 +50,7 @@ class Admin::ProjectsController < ApplicationController ...@@ -50,7 +50,7 @@ class Admin::ProjectsController < ApplicationController
if @admin_project.update_attributes(params[:project]) if @admin_project.update_attributes(params[:project])
redirect_to [:admin, @admin_project], notice: 'Project was successfully updated.' redirect_to [:admin, @admin_project], notice: 'Project was successfully updated.'
else else
render :action => "edit" render action: "edit"
end end
end end
......
...@@ -34,7 +34,7 @@ class Admin::UsersController < ApplicationController ...@@ -34,7 +34,7 @@ class Admin::UsersController < ApplicationController
def new def new
@admin_user = User.new(:projects_limit => Gitlab.config.default_projects_limit) @admin_user = User.new(projects_limit: Gitlab.config.default_projects_limit)
end end
def edit def edit
......
...@@ -11,15 +11,15 @@ class ApplicationController < ActionController::Base ...@@ -11,15 +11,15 @@ class ApplicationController < ActionController::Base
helper_method :abilities, :can? helper_method :abilities, :can?
rescue_from Gitlab::Gitolite::AccessDenied do |exception| rescue_from Gitlab::Gitolite::AccessDenied do |exception|
render "errors/gitolite", :layout => "error" render "errors/gitolite", layout: "error"
end end
rescue_from Encoding::CompatibilityError do |exception| rescue_from Encoding::CompatibilityError do |exception|
render "errors/encoding", :layout => "error", :status => 404 render "errors/encoding", layout: "error", status: 404
end end
rescue_from ActiveRecord::RecordNotFound do |exception| rescue_from ActiveRecord::RecordNotFound do |exception|
render "errors/not_found", :layout => "error", :status => 404 render "errors/not_found", layout: "error", status: 404
end end
layout :layout_by_resource layout :layout_by_resource
...@@ -97,15 +97,15 @@ class ApplicationController < ActionController::Base ...@@ -97,15 +97,15 @@ class ApplicationController < ActionController::Base
end end
def access_denied! def access_denied!
render "errors/access_denied", :layout => "error", :status => 404 render "errors/access_denied", layout: "error", status: 404
end end
def not_found! def not_found!
render "errors/not_found", :layout => "error", :status => 404 render "errors/not_found", layout: "error", status: 404
end end
def git_not_found! def git_not_found!
render "errors/git_not_found", :layout => "error", :status => 404 render "errors/git_not_found", layout: "error", status: 404
end end
def method_missing(method_sym, *arguments, &block) def method_missing(method_sym, *arguments, &block)
...@@ -127,7 +127,7 @@ class ApplicationController < ActionController::Base ...@@ -127,7 +127,7 @@ class ApplicationController < ActionController::Base
end end
def render_404 def render_404
render :file => File.join(Rails.root, "public", "404"), :layout => false, :status => "404" render file: File.join(Rails.root, "public", "404"), layout: false, status: "404"
end end
def require_non_empty_project def require_non_empty_project
......
...@@ -9,7 +9,7 @@ class CommitsController < ApplicationController ...@@ -9,7 +9,7 @@ class CommitsController < ApplicationController
before_filter :authorize_read_project! before_filter :authorize_read_project!
before_filter :authorize_code_access! before_filter :authorize_code_access!
before_filter :require_non_empty_project before_filter :require_non_empty_project
before_filter :load_refs, :only => :index # load @branch, @tag & @ref before_filter :load_refs, only: :index # load @branch, @tag & @ref
before_filter :render_full_content before_filter :render_full_content
def index def index
...@@ -22,7 +22,7 @@ class CommitsController < ApplicationController ...@@ -22,7 +22,7 @@ class CommitsController < ApplicationController
respond_to do |format| respond_to do |format|
format.html # index.html.erb format.html # index.html.erb
format.js format.js
format.atom { render :layout => false } format.atom { render layout: false }
end end
end end
...@@ -61,9 +61,9 @@ class CommitsController < ApplicationController ...@@ -61,9 +61,9 @@ class CommitsController < ApplicationController
send_data( send_data(
@commit.to_patch, @commit.to_patch,
:type => "text/plain", type: "text/plain",
:disposition => 'attachment', disposition: 'attachment',
:filename => (@commit.id.to_s + ".patch") filename: (@commit.id.to_s + ".patch")
) )
end end
end end
...@@ -9,7 +9,7 @@ class DashboardController < ApplicationController ...@@ -9,7 +9,7 @@ class DashboardController < ApplicationController
respond_to do |format| respond_to do |format|
format.html format.html
format.js format.js
format.atom { render :layout => false } format.atom { render layout: false }
end end
end end
...@@ -28,7 +28,7 @@ class DashboardController < ApplicationController ...@@ -28,7 +28,7 @@ class DashboardController < ApplicationController
respond_to do |format| respond_to do |format|
format.html format.html
format.atom { render :layout => false } format.atom { render layout: false }
end end
end end
end end
...@@ -40,7 +40,7 @@ class DeployKeysController < ApplicationController ...@@ -40,7 +40,7 @@ class DeployKeysController < ApplicationController
respond_to do |format| respond_to do |format|
format.html { redirect_to project_deploy_keys_url } format.html { redirect_to project_deploy_keys_url }
format.js { render :nothing => true } format.js { render nothing: true }
end end
end end
end end
...@@ -6,7 +6,7 @@ class HooksController < ApplicationController ...@@ -6,7 +6,7 @@ class HooksController < ApplicationController
# Authorize # Authorize
before_filter :add_project_abilities before_filter :add_project_abilities
before_filter :authorize_read_project! before_filter :authorize_read_project!
before_filter :authorize_admin_project!, :only => [:new, :create, :destroy] before_filter :authorize_admin_project!, only: [:new, :create, :destroy]
respond_to :html respond_to :html
......
...@@ -2,7 +2,7 @@ class IssuesController < ApplicationController ...@@ -2,7 +2,7 @@ class IssuesController < ApplicationController
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :project before_filter :project
before_filter :module_enabled before_filter :module_enabled
before_filter :issue, :only => [:edit, :update, :destroy, :show] before_filter :issue, only: [:edit, :update, :destroy, :show]
helper_method :issues_filter helper_method :issues_filter
layout "project" layout "project"
...@@ -14,13 +14,13 @@ class IssuesController < ApplicationController ...@@ -14,13 +14,13 @@ class IssuesController < ApplicationController
before_filter :authorize_read_issue! before_filter :authorize_read_issue!
# Allow write(create) issue # Allow write(create) issue
before_filter :authorize_write_issue!, :only => [:new, :create] before_filter :authorize_write_issue!, only: [:new, :create]
# Allow modify issue # Allow modify issue
before_filter :authorize_modify_issue!, :only => [:close, :edit, :update] before_filter :authorize_modify_issue!, only: [:close, :edit, :update]
# Allow destroy issue # Allow destroy issue
before_filter :authorize_admin_issue!, :only => [:destroy] before_filter :authorize_admin_issue!, only: [:destroy]
respond_to :js, :html respond_to :js, :html
...@@ -32,7 +32,7 @@ class IssuesController < ApplicationController ...@@ -32,7 +32,7 @@ class IssuesController < ApplicationController
respond_to do |format| respond_to do |format|
format.html # index.html.erb format.html # index.html.erb
format.js format.js
format.atom { render :layout => false } format.atom { render layout: false }
end end
end end
...@@ -46,7 +46,7 @@ class IssuesController < ApplicationController ...@@ -46,7 +46,7 @@ class IssuesController < ApplicationController
end end
def show def show
@note = @project.notes.new(:noteable => @issue) @note = @project.notes.new(noteable: @issue)
respond_to do |format| respond_to do |format|
format.html format.html
...@@ -66,7 +66,7 @@ class IssuesController < ApplicationController ...@@ -66,7 +66,7 @@ class IssuesController < ApplicationController
end end
def update def update
@issue.update_attributes(params[:issue].merge(:author_id_of_changes => current_user.id)) @issue.update_attributes(params[:issue].merge(author_id_of_changes: current_user.id))
respond_to do |format| respond_to do |format|
format.js format.js
...@@ -87,20 +87,20 @@ class IssuesController < ApplicationController ...@@ -87,20 +87,20 @@ class IssuesController < ApplicationController
respond_to do |format| respond_to do |format|
format.html { redirect_to project_issues_path } format.html { redirect_to project_issues_path }
format.js { render :nothing => true } format.js { render nothing: true }
end end
end end
def sort def sort
return render_404 unless can?(current_user, :admin_issue, @project) return render_404 unless can?(current_user, :admin_issue, @project)
@issues = @project.issues.where(:id => params['issue']) @issues = @project.issues.where(id: params['issue'])
@issues.each do |issue| @issues.each do |issue|
issue.position = params['issue'].index(issue.id.to_s) + 1 issue.position = params['issue'].index(issue.id.to_s) + 1
issue.save issue.save
end end
render :nothing => true render nothing: true
end end
def search def search
...@@ -110,12 +110,12 @@ class IssuesController < ApplicationController ...@@ -110,12 +110,12 @@ class IssuesController < ApplicationController
@issues = @issues.where("title LIKE ?", "%#{terms}%") unless terms.blank? @issues = @issues.where("title LIKE ?", "%#{terms}%") unless terms.blank?
@issues = @issues.page(params[:page]).per(100) @issues = @issues.page(params[:page]).per(100)
render :partial => 'issues' render partial: 'issues'
end end
def bulk_update def bulk_update
result = IssuesBulkUpdateContext.new(project, current_user, params).execute result = IssuesBulkUpdateContext.new(project, current_user, params).execute
redirect_to :back, :notice => "#{result[:count]} issues updated" redirect_to :back, notice: "#{result[:count]} issues updated"
end end
protected protected
...@@ -144,8 +144,8 @@ class IssuesController < ApplicationController ...@@ -144,8 +144,8 @@ class IssuesController < ApplicationController
else @project.issues.opened else @project.issues.opened
end end
@issues = @issues.where(:assignee_id => params[:assignee_id]) if params[:assignee_id].present? @issues = @issues.where(assignee_id: params[:assignee_id]) if params[:assignee_id].present?
@issues = @issues.where(:milestone_id => params[:milestone_id]) if params[:milestone_id].present? @issues = @issues.where(milestone_id: params[:milestone_id]) if params[:milestone_id].present?
@issues = @issues.tagged_with(params[:label_name]) if params[:label_name].present? @issues = @issues.tagged_with(params[:label_name]) if params[:label_name].present?
@issues = @issues.includes(:author, :project).order("updated_at") @issues = @issues.includes(:author, :project).order("updated_at")
@issues @issues
......
...@@ -29,7 +29,7 @@ class KeysController < ApplicationController ...@@ -29,7 +29,7 @@ class KeysController < ApplicationController
respond_to do |format| respond_to do |format|
format.html { redirect_to keys_url } format.html { redirect_to keys_url }
format.js { render :nothing => true } format.js { render nothing: true }
end end
end end
end end
...@@ -2,9 +2,9 @@ class MergeRequestsController < ApplicationController ...@@ -2,9 +2,9 @@ class MergeRequestsController < ApplicationController
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :project before_filter :project
before_filter :module_enabled before_filter :module_enabled
before_filter :merge_request, :only => [:edit, :update, :destroy, :show, :commits, :diffs, :automerge, :automerge_check, :raw] before_filter :merge_request, only: [:edit, :update, :destroy, :show, :commits, :diffs, :automerge, :automerge_check, :raw]
before_filter :validates_merge_request, :only => [:show, :diffs, :raw] before_filter :validates_merge_request, only: [:show, :diffs, :raw]
before_filter :define_show_vars, :only => [:show, :diffs] before_filter :define_show_vars, only: [:show, :diffs]
layout "project" layout "project"
# Authorize # Authorize
...@@ -14,13 +14,13 @@ class MergeRequestsController < ApplicationController ...@@ -14,13 +14,13 @@ class MergeRequestsController < ApplicationController
before_filter :authorize_read_merge_request! before_filter :authorize_read_merge_request!
# Allow write(create) merge_request # Allow write(create) merge_request
before_filter :authorize_write_merge_request!, :only => [:new, :create] before_filter :authorize_write_merge_request!, only: [:new, :create]
# Allow modify merge_request # Allow modify merge_request
before_filter :authorize_modify_merge_request!, :only => [:close, :edit, :update, :sort] before_filter :authorize_modify_merge_request!, only: [:close, :edit, :update, :sort]
# Allow destroy merge_request # Allow destroy merge_request
before_filter :authorize_admin_merge_request!, :only => [:destroy] before_filter :authorize_admin_merge_request!, only: [:destroy]
def index def index
...@@ -66,7 +66,7 @@ class MergeRequestsController < ApplicationController ...@@ -66,7 +66,7 @@ class MergeRequestsController < ApplicationController
end end
def update def update
if @merge_request.update_attributes(params[:merge_request].merge(:author_id_of_changes => current_user.id)) if @merge_request.update_attributes(params[:merge_request].merge(author_id_of_changes: current_user.id))
@merge_request.reload_code @merge_request.reload_code
@merge_request.mark_as_unchecked @merge_request.mark_as_unchecked
redirect_to [@project, @merge_request], notice: 'Merge request was successfully updated.' redirect_to [@project, @merge_request], notice: 'Merge request was successfully updated.'
...@@ -79,7 +79,7 @@ class MergeRequestsController < ApplicationController ...@@ -79,7 +79,7 @@ class MergeRequestsController < ApplicationController
if @merge_request.unchecked? if @merge_request.unchecked?
@merge_request.check_if_can_be_merged @merge_request.check_if_can_be_merged
end end
render :json => {:state => @merge_request.human_state} render json: {state: @merge_request.human_state}
end end
def automerge def automerge
...@@ -138,7 +138,7 @@ class MergeRequestsController < ApplicationController ...@@ -138,7 +138,7 @@ class MergeRequestsController < ApplicationController
def define_show_vars def define_show_vars
# Build a note object for comment form # Build a note object for comment form
@note = @project.notes.new(:noteable => @merge_request) @note = @project.notes.new(noteable: @merge_request)
# Get commits from repository # Get commits from repository
# or from cache if already merged # or from cache if already merged
......
...@@ -2,7 +2,7 @@ class MilestonesController < ApplicationController ...@@ -2,7 +2,7 @@ class MilestonesController < ApplicationController
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :project before_filter :project
before_filter :module_enabled before_filter :module_enabled
before_filter :milestone, :only => [:edit, :update, :destroy, :show] before_filter :milestone, only: [:edit, :update, :destroy, :show]
layout "project" layout "project"
# Authorize # Authorize
...@@ -12,7 +12,7 @@ class MilestonesController < ApplicationController ...@@ -12,7 +12,7 @@ class MilestonesController < ApplicationController
before_filter :authorize_read_milestone! before_filter :authorize_read_milestone!
# Allow admin milestone # Allow admin milestone
before_filter :authorize_admin_milestone!, :except => [:index, :show] before_filter :authorize_admin_milestone!, except: [:index, :show]
respond_to :html respond_to :html
...@@ -77,7 +77,7 @@ class MilestonesController < ApplicationController ...@@ -77,7 +77,7 @@ class MilestonesController < ApplicationController
respond_to do |format| respond_to do |format|
format.html { redirect_to project_milestones_path } format.html { redirect_to project_milestones_path }
format.js { render :nothing => true } format.js { render nothing: true }
end end
end end
......
...@@ -5,7 +5,7 @@ class NotesController < ApplicationController ...@@ -5,7 +5,7 @@ class NotesController < ApplicationController
before_filter :add_project_abilities before_filter :add_project_abilities
before_filter :authorize_read_note! before_filter :authorize_read_note!
before_filter :authorize_write_note!, :only => [:create] before_filter :authorize_write_note!, only: [:create]
respond_to :js respond_to :js
...@@ -29,12 +29,12 @@ class NotesController < ApplicationController ...@@ -29,12 +29,12 @@ class NotesController < ApplicationController
@note.destroy @note.destroy
respond_to do |format| respond_to do |format|
format.js { render :nothing => true } format.js { render nothing: true }
end end
end end
def preview def preview
render :text => view_context.markdown(params[:note]) render text: view_context.markdown(params[:note])
end end
protected protected
......
...@@ -26,7 +26,7 @@ class ProfileController < ApplicationController ...@@ -26,7 +26,7 @@ class ProfileController < ApplicationController
flash[:notice] = "Password was successfully updated. Please login with it" flash[:notice] = "Password was successfully updated. Please login with it"
redirect_to new_user_session_path redirect_to new_user_session_path
else else
render :action => "password" render action: "password"
end end
end end
......
require File.join(Rails.root, 'lib', 'graph_commit') require File.join(Rails.root, 'lib', 'graph_commit')
class ProjectsController < ApplicationController class ProjectsController < ApplicationController
before_filter :project, :except => [:index, :new, :create] before_filter :project, except: [:index, :new, :create]
layout :determine_layout layout :determine_layout
# Authorize # Authorize
before_filter :add_project_abilities before_filter :add_project_abilities
before_filter :authorize_read_project!, :except => [:index, :new, :create] before_filter :authorize_read_project!, except: [:index, :new, :create]
before_filter :authorize_admin_project!, :only => [:edit, :update, :destroy] before_filter :authorize_admin_project!, only: [:edit, :update, :destroy]
before_filter :require_non_empty_project, :only => [:blob, :tree, :graph] before_filter :require_non_empty_project, only: [:blob, :tree, :graph]
def new def new
@project = Project.new @project = Project.new
...@@ -35,7 +35,7 @@ class ProjectsController < ApplicationController ...@@ -35,7 +35,7 @@ class ProjectsController < ApplicationController
def update def update
respond_to do |format| respond_to do |format|
if project.update_attributes(params[:project]) if project.update_attributes(params[:project])
format.html { redirect_to edit_project_path(project), :notice => 'Project was successfully updated.' } format.html { redirect_to edit_project_path(project), notice: 'Project was successfully updated.' }
format.js format.js
else else
format.html { render action: "edit" } format.html { render action: "edit" }
......
...@@ -6,7 +6,7 @@ class ProtectedBranchesController < ApplicationController ...@@ -6,7 +6,7 @@ class ProtectedBranchesController < ApplicationController
before_filter :authorize_read_project! before_filter :authorize_read_project!
before_filter :require_non_empty_project before_filter :require_non_empty_project
before_filter :authorize_admin_project!, :only => [:destroy, :create] before_filter :authorize_admin_project!, only: [:destroy, :create]
before_filter :render_full_content before_filter :render_full_content
layout "project" layout "project"
...@@ -26,7 +26,7 @@ class ProtectedBranchesController < ApplicationController ...@@ -26,7 +26,7 @@ class ProtectedBranchesController < ApplicationController
respond_to do |format| respond_to do |format|
format.html { redirect_to project_protected_branches_path } format.html { redirect_to project_protected_branches_path }
format.js { render :nothing => true } format.js { render nothing: true }
end end
end end
end end
...@@ -9,7 +9,7 @@ class RefsController < ApplicationController ...@@ -9,7 +9,7 @@ class RefsController < ApplicationController
before_filter :require_non_empty_project before_filter :require_non_empty_project
before_filter :ref before_filter :ref
before_filter :define_tree_vars, :only => [:tree, :blob, :blame, :logs_tree] before_filter :define_tree_vars, only: [:tree, :blob, :blame, :logs_tree]
before_filter :render_full_content before_filter :render_full_content
layout "project" layout "project"
...@@ -20,7 +20,7 @@ class RefsController < ApplicationController ...@@ -20,7 +20,7 @@ class RefsController < ApplicationController
new_path = if params[:destination] == "tree" new_path = if params[:destination] == "tree"
tree_project_ref_path(@project, params[:ref]) tree_project_ref_path(@project, params[:ref])
else else
project_commits_path(@project, :ref => params[:ref]) project_commits_path(@project, ref: params[:ref])
end end
redirect_to new_path redirect_to new_path
...@@ -53,8 +53,8 @@ class RefsController < ApplicationController ...@@ -53,8 +53,8 @@ class RefsController < ApplicationController
last_commit = @project.commits(@commit.id, file, 1).last last_commit = @project.commits(@commit.id, file, 1).last
last_commit = CommitDecorator.decorate(last_commit) last_commit = CommitDecorator.decorate(last_commit)
{ {
:file_name => content.name, file_name: content.name,
:commit => last_commit commit: last_commit
} }
end end
end end
...@@ -70,9 +70,9 @@ class RefsController < ApplicationController ...@@ -70,9 +70,9 @@ class RefsController < ApplicationController
send_data( send_data(
@tree.data, @tree.data,
:type => mime_type, type: mime_type,
:disposition => 'inline', disposition: 'inline',
:filename => @tree.name filename: @tree.name
) )
else else
head(404) head(404)
......
...@@ -8,8 +8,8 @@ class SearchController < ApplicationController ...@@ -8,8 +8,8 @@ class SearchController < ApplicationController
if query.present? if query.present?
@projects = current_user.projects.search(query).limit(10) @projects = current_user.projects.search(query).limit(10)
@merge_requests = MergeRequest.where(:project_id => current_user.project_ids).search(query).limit(10) @merge_requests = MergeRequest.where(project_id: current_user.project_ids).search(query).limit(10)
@issues = Issue.where(:project_id => current_user.project_ids).search(query).limit(10) @issues = Issue.where(project_id: current_user.project_ids).search(query).limit(10)
end end
end end
end end
class SnippetsController < ApplicationController class SnippetsController < ApplicationController
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :project before_filter :project
before_filter :snippet, :only => [:show, :edit, :destroy, :update, :raw] before_filter :snippet, only: [:show, :edit, :destroy, :update, :raw]
layout "project" layout "project"
# Authorize # Authorize
...@@ -11,13 +11,13 @@ class SnippetsController < ApplicationController ...@@ -11,13 +11,13 @@ class SnippetsController < ApplicationController
before_filter :authorize_read_snippet! before_filter :authorize_read_snippet!
# Allow write(create) snippet # Allow write(create) snippet
before_filter :authorize_write_snippet!, :only => [:new, :create] before_filter :authorize_write_snippet!, only: [:new, :create]
# Allow modify snippet # Allow modify snippet
before_filter :authorize_modify_snippet!, :only => [:edit, :update] before_filter :authorize_modify_snippet!, only: [:edit, :update]
# Allow destroy snippet # Allow destroy snippet
before_filter :authorize_admin_snippet!, :only => [:destroy] before_filter :authorize_admin_snippet!, only: [:destroy]
respond_to :html respond_to :html
...@@ -55,7 +55,7 @@ class SnippetsController < ApplicationController ...@@ -55,7 +55,7 @@ class SnippetsController < ApplicationController
end end
def show def show
@note = @project.notes.new(:noteable => @snippet) @note = @project.notes.new(noteable: @snippet)
render_full_content render_full_content
end end
...@@ -70,9 +70,9 @@ class SnippetsController < ApplicationController ...@@ -70,9 +70,9 @@ class SnippetsController < ApplicationController
def raw def raw
send_data( send_data(
@snippet.content, @snippet.content,
:type => "text/plain", type: "text/plain",
:disposition => 'inline', disposition: 'inline',
:filename => @snippet.file_name filename: @snippet.file_name
) )
end end
......
...@@ -5,7 +5,7 @@ class TeamMembersController < ApplicationController ...@@ -5,7 +5,7 @@ class TeamMembersController < ApplicationController
# Authorize # Authorize
before_filter :add_project_abilities before_filter :add_project_abilities
before_filter :authorize_read_project! before_filter :authorize_read_project!
before_filter :authorize_admin_project!, :except => [:show] before_filter :authorize_admin_project!, except: [:show]
def show def show
@team_member = project.users_projects.find(params[:id]) @team_member = project.users_projects.find(params[:id])
...@@ -41,7 +41,7 @@ class TeamMembersController < ApplicationController ...@@ -41,7 +41,7 @@ class TeamMembersController < ApplicationController
respond_to do |format| respond_to do |format|
format.html { redirect_to team_project_path(@project) } format.html { redirect_to team_project_path(@project) }
format.js { render :nothing => true } format.js { render nothing: true }
end end
end end
end end
...@@ -2,8 +2,8 @@ class WikisController < ApplicationController ...@@ -2,8 +2,8 @@ class WikisController < ApplicationController
before_filter :project before_filter :project
before_filter :add_project_abilities before_filter :add_project_abilities
before_filter :authorize_read_wiki! before_filter :authorize_read_wiki!
before_filter :authorize_write_wiki!, :only => [:edit, :create, :history] before_filter :authorize_write_wiki!, only: [:edit, :create, :history]
before_filter :authorize_admin_wiki!, :only => :destroy before_filter :authorize_admin_wiki!, only: :destroy
layout "project" layout "project"
def pages def pages
...@@ -14,16 +14,16 @@ class WikisController < ApplicationController ...@@ -14,16 +14,16 @@ class WikisController < ApplicationController
if params[:old_page_id] if params[:old_page_id]
@wiki = @project.wikis.find(params[:old_page_id]) @wiki = @project.wikis.find(params[:old_page_id])
else else
@wiki = @project.wikis.where(:slug => params[:id]).order("created_at").last @wiki = @project.wikis.where(slug: params[:id]).order("created_at").last
end end
@note = @project.notes.new(:noteable => @wiki) @note = @project.notes.new(noteable: @wiki)
if @wiki if @wiki
render 'show' render 'show'
else else
if can?(current_user, :write_wiki, @project) if can?(current_user, :write_wiki, @project)
@wiki = @project.wikis.new(:slug => params[:id]) @wiki = @project.wikis.new(slug: params[:id])
render 'edit' render 'edit'
else else
render 'empty' render 'empty'
...@@ -32,7 +32,7 @@ class WikisController < ApplicationController ...@@ -32,7 +32,7 @@ class WikisController < ApplicationController
end end
def edit def edit
@wiki = @project.wikis.where(:slug => params[:id]).order("created_at").last @wiki = @project.wikis.where(slug: params[:id]).order("created_at").last
@wiki = Wiki.regenerate_from @wiki @wiki = Wiki.regenerate_from @wiki
end end
...@@ -50,11 +50,11 @@ class WikisController < ApplicationController ...@@ -50,11 +50,11 @@ class WikisController < ApplicationController
end end
def history def history
@wikis = @project.wikis.where(:slug => params[:id]).order("created_at") @wikis = @project.wikis.where(slug: params[:id]).order("created_at")
end end
def destroy def destroy
@wikis = @project.wikis.where(:slug => params[:id]).delete_all @wikis = @project.wikis.where(slug: params[:id]).delete_all
respond_to do |format| respond_to do |format|
format.html { redirect_to project_wiki_path(@project, :index), notice: "Page was successfully deleted" } format.html { redirect_to project_wiki_path(@project, :index), notice: "Page was successfully deleted" }
......
...@@ -15,7 +15,7 @@ class ApplicationDecorator < Drapper::Base ...@@ -15,7 +15,7 @@ class ApplicationDecorator < Drapper::Base
# #
# def formatted_timestamp(time) # def formatted_timestamp(time)
# h.content_tag :span, time.strftime("%a %m/%d/%y"), # h.content_tag :span, time.strftime("%a %m/%d/%y"),
# :class => 'timestamp' # class: 'timestamp'
# end # end
# #
# def created_at # def created_at
......
...@@ -19,7 +19,7 @@ class EventDecorator < ApplicationDecorator ...@@ -19,7 +19,7 @@ class EventDecorator < ApplicationDecorator
elsif self.merge_request? elsif self.merge_request?
h.project_merge_request_url(self.project, self.merge_request) h.project_merge_request_url(self.project, self.merge_request)
elsif self.push? elsif self.push?
h.project_commits_url(self.project, :ref => self.ref_name) h.project_commits_url(self.project, ref: self.ref_name)
end end
end end
end end
...@@ -8,14 +8,14 @@ class TreeDecorator < ApplicationDecorator ...@@ -8,14 +8,14 @@ class TreeDecorator < ApplicationDecorator
#parts = parts[0...-1] if is_blob? #parts = parts[0...-1] if is_blob?
yield(h.link_to("..", "#", :remote => :true)) if parts.count > max_links yield(h.link_to("..", "#", remote: :true)) if parts.count > max_links
parts.each do |part| parts.each do |part|
part_path = File.join(part_path, part) unless part_path.empty? part_path = File.join(part_path, part) unless part_path.empty?
part_path = part if part_path.empty? part_path = part if part_path.empty?
next unless parts.last(2).include?(part) if parts.count > max_links next unless parts.last(2).include?(part) if parts.count > max_links
yield(h.link_to(h.truncate(part, :length => 40), h.tree_file_project_ref_path(project, ref, :path => part_path), :remote => :true)) yield(h.link_to(h.truncate(part, length: 40), h.tree_file_project_ref_path(project, ref, path: part_path), remote: :true))
end end
end end
end end
...@@ -30,7 +30,7 @@ class TreeDecorator < ApplicationDecorator ...@@ -30,7 +30,7 @@ class TreeDecorator < ApplicationDecorator
end end
def history_path def history_path
h.project_commits_path(project, :path => path, :ref => ref) h.project_commits_path(project, path: path, ref: ref)
end end
def mb_size def mb_size
......
...@@ -43,23 +43,23 @@ module ApplicationHelper ...@@ -43,23 +43,23 @@ module ApplicationHelper
end end
def search_autocomplete_source def search_autocomplete_source
projects = current_user.projects.map{ |p| { :label => p.name, :url => project_path(p) } } projects = current_user.projects.map{ |p| { label: p.name, url: project_path(p) } }
default_nav = [ default_nav = [
{ :label => "Profile", :url => profile_path }, { label: "Profile", url: profile_path },
{ :label => "Keys", :url => keys_path }, { label: "Keys", url: keys_path },
{ :label => "Dashboard", :url => root_path }, { label: "Dashboard", url: root_path },
{ :label => "Admin", :url => admin_root_path } { label: "Admin", url: admin_root_path }
] ]
project_nav = [] project_nav = []
if @project && !@project.new_record? if @project && !@project.new_record?
project_nav = [ project_nav = [
{ :label => "#{@project.name} / Issues", :url => project_issues_path(@project) }, { label: "#{@project.name} / Issues", url: project_issues_path(@project) },
{ :label => "#{@project.name} / Wall", :url => wall_project_path(@project) }, { label: "#{@project.name} / Wall", url: wall_project_path(@project) },
{ :label => "#{@project.name} / Tree", :url => tree_project_ref_path(@project, @project.root_ref) }, { label: "#{@project.name} / Tree", url: tree_project_ref_path(@project, @project.root_ref) },
{ :label => "#{@project.name} / Commits", :url => project_commits_path(@project) }, { label: "#{@project.name} / Commits", url: project_commits_path(@project) },
{ :label => "#{@project.name} / Team", :url => team_project_path(@project) } { label: "#{@project.name} / Team", url: team_project_path(@project) }
] ]
end end
...@@ -89,7 +89,7 @@ module ApplicationHelper ...@@ -89,7 +89,7 @@ module ApplicationHelper
when :wall; wall_tab? when :wall; wall_tab?
when :wiki; controller.controller_name == "wikis" when :wiki; controller.controller_name == "wikis"
when :issues; issues_tab? when :issues; issues_tab?
when :network; current_page?(:controller => "projects", :action => "graph", :id => @project) when :network; current_page?(controller: "projects", action: "graph", id: @project)
when :merge_requests; controller.controller_name == "merge_requests" when :merge_requests; controller.controller_name == "merge_requests"
# Dashboard Area # Dashboard Area
...@@ -100,10 +100,10 @@ module ApplicationHelper ...@@ -100,10 +100,10 @@ module ApplicationHelper
when :root; current_page?(dashboard_path) || current_page?(root_path) when :root; current_page?(dashboard_path) || current_page?(root_path)
# Profile Area # Profile Area
when :profile; current_page?(:controller => "profile", :action => :show) when :profile; current_page?(controller: "profile", action: :show)
when :password; current_page?(:controller => "profile", :action => :password) when :password; current_page?(controller: "profile", action: :password)
when :token; current_page?(:controller => "profile", :action => :token) when :token; current_page?(controller: "profile", action: :token)
when :design; current_page?(:controller => "profile", :action => :design) when :design; current_page?(controller: "profile", action: :design)
when :ssh_keys; controller.controller_name == "keys" when :ssh_keys; controller.controller_name == "keys"
# Admin Area # Admin Area
......
...@@ -28,32 +28,32 @@ module GitlabMarkdownHelper ...@@ -28,32 +28,32 @@ module GitlabMarkdownHelper
# team member: @foo # team member: @foo
when /^@/ when /^@/
user = @project.users.where(:name => user_name).first user = @project.users.where(name: user_name).first
member = @project.users_projects.where(:user_id => user).first if user member = @project.users_projects.where(user_id: user).first if user
link_to("@#{user_name}", project_team_member_path(@project, member), html_options.merge(:class => "gfm gfm-team_member #{html_options[:class]}")) if member link_to("@#{user_name}", project_team_member_path(@project, member), html_options.merge(class: "gfm gfm-team_member #{html_options[:class]}")) if member
# issue: #123 # issue: #123
when /^#/ when /^#/
# avoid HTML entities # avoid HTML entities
unless prefix.try(:end_with?, "&") && suffix.try(:start_with?, ";") unless prefix.try(:end_with?, "&") && suffix.try(:start_with?, ";")
issue = @project.issues.where(:id => issue_id).first issue = @project.issues.where(id: issue_id).first
link_to("##{issue_id}", project_issue_path(@project, issue), html_options.merge(:title => "Issue: #{issue.title}", :class => "gfm gfm-issue #{html_options[:class]}")) if issue link_to("##{issue_id}", project_issue_path(@project, issue), html_options.merge(title: "Issue: #{issue.title}", class: "gfm gfm-issue #{html_options[:class]}")) if issue
end end
# merge request: !123 # merge request: !123
when /^!/ when /^!/
merge_request = @project.merge_requests.where(:id => merge_request_id).first merge_request = @project.merge_requests.where(id: merge_request_id).first
link_to("!#{merge_request_id}", project_merge_request_path(@project, merge_request), html_options.merge(:title => "Merge Request: #{merge_request.title}", :class => "gfm gfm-merge_request #{html_options[:class]}")) if merge_request link_to("!#{merge_request_id}", project_merge_request_path(@project, merge_request), html_options.merge(title: "Merge Request: #{merge_request.title}", class: "gfm gfm-merge_request #{html_options[:class]}")) if merge_request
# snippet: $123 # snippet: $123
when /^\$/ when /^\$/
snippet = @project.snippets.where(:id => snippet_id).first snippet = @project.snippets.where(id: snippet_id).first
link_to("$#{snippet_id}", project_snippet_path(@project, snippet), html_options.merge(:title => "Snippet: #{snippet.title}", :class => "gfm gfm-snippet #{html_options[:class]}")) if snippet link_to("$#{snippet_id}", project_snippet_path(@project, snippet), html_options.merge(title: "Snippet: #{snippet.title}", class: "gfm gfm-snippet #{html_options[:class]}")) if snippet
# commit: 123456... # commit: 123456...
when /^\h/ when /^\h/
commit = @project.commit(commit_id) commit = @project.commit(commit_id)
link_to(commit_id, project_commit_path(@project, :id => commit.id), html_options.merge(:title => "Commit: #{commit.author_name} - #{CommitDecorator.new(commit).title}", :class => "gfm gfm-commit #{html_options[:class]}")) if commit link_to(commit_id, project_commit_path(@project, id: commit.id), html_options.merge(title: "Commit: #{commit.author_name} - #{CommitDecorator.new(commit).title}", class: "gfm gfm-commit #{html_options[:class]}")) if commit
end # case end # case
......
...@@ -9,7 +9,7 @@ module IssuesHelper ...@@ -9,7 +9,7 @@ module IssuesHelper
tm = project.team_member_by_id(issue.assignee_id) tm = project.team_member_by_id(issue.assignee_id)
if tm if tm
link_to issue.assignee_name, project_team_member_path(project, tm), :class => "author_link" link_to issue.assignee_name, project_team_member_path(project, tm), class: "author_link"
else else
issue.assignee_name issue.assignee_name
end end
...@@ -20,7 +20,7 @@ module IssuesHelper ...@@ -20,7 +20,7 @@ module IssuesHelper
tm = project.team_member_by_id(issue.author_id) tm = project.team_member_by_id(issue.author_id)
if tm if tm
link_to issue.author_name, project_team_member_path(project, tm), :class => "author_link" link_to issue.author_name, project_team_member_path(project, tm), class: "author_link"
else else
issue.author_name issue.author_name
end end
......
...@@ -4,7 +4,7 @@ module MergeRequestsHelper ...@@ -4,7 +4,7 @@ module MergeRequestsHelper
tm = project.team_member_by_id(merge_request.assignee_id) tm = project.team_member_by_id(merge_request.assignee_id)
if tm if tm
link_to merge_request.assignee_name, project_team_member_path(project, tm), :class => "author_link" link_to merge_request.assignee_name, project_team_member_path(project, tm), class: "author_link"
else else
merge_request.assignee_name merge_request.assignee_name
end end
...@@ -15,7 +15,7 @@ module MergeRequestsHelper ...@@ -15,7 +15,7 @@ module MergeRequestsHelper
tm = project.team_member_by_id(merge_request.author_id) tm = project.team_member_by_id(merge_request.author_id)
if tm if tm
link_to merge_request.author_name, project_team_member_path(project, tm), :class => "author_link" link_to merge_request.author_name, project_team_member_path(project, tm), class: "author_link"
else else
merge_request.author_name merge_request.author_name
end end
...@@ -24,10 +24,10 @@ module MergeRequestsHelper ...@@ -24,10 +24,10 @@ module MergeRequestsHelper
def new_mr_path_from_push_event(event) def new_mr_path_from_push_event(event)
new_project_merge_request_path( new_project_merge_request_path(
event.project, event.project,
:merge_request => { merge_request: {
:source_branch => event.branch_name, source_branch: event.branch_name,
:target_branch => event.project.root_ref, target_branch: event.project.root_ref,
:title => event.branch_name.titleize title: event.branch_name.titleize
} }
) )
end end
......
...@@ -4,12 +4,12 @@ module TabHelper ...@@ -4,12 +4,12 @@ module TabHelper
end end
def wall_tab? def wall_tab?
current_page?(:controller => "projects", :action => "wall", :id => @project) current_page?(controller: "projects", action: "wall", id: @project)
end end
def project_tab_class def project_tab_class
[:show, :files, :team, :edit, :update].each do |action| [:show, :files, :team, :edit, :update].each do |action|
return "current" if current_page?(:controller => "projects", :action => action, :id => @project) return "current" if current_page?(controller: "projects", action: action, id: @project)
end end
if ['snippets', 'hooks', 'deploy_keys', 'team_members'].include? controller.controller_name if ['snippets', 'hooks', 'deploy_keys', 'team_members'].include? controller.controller_name
......
...@@ -12,20 +12,20 @@ class Notify < ActionMailer::Base ...@@ -12,20 +12,20 @@ class Notify < ActionMailer::Base
def new_user_email(user_id, password) def new_user_email(user_id, password)
@user = User.find(user_id) @user = User.find(user_id)
@password = password @password = password
mail(:to => @user.email, :subject => "gitlab | Account was created for you") mail(to: @user.email, subject: "gitlab | Account was created for you")
end end
def new_issue_email(issue_id) def new_issue_email(issue_id)
@issue = Issue.find(issue_id) @issue = Issue.find(issue_id)
@project = @issue.project @project = @issue.project
mail(:to => @issue.assignee_email, :subject => "gitlab | new issue ##{@issue.id} | #{@issue.title} | #{@project.name}") mail(to: @issue.assignee_email, subject: "gitlab | new issue ##{@issue.id} | #{@issue.title} | #{@project.name}")
end end
def note_wall_email(recipient_id, note_id) def note_wall_email(recipient_id, note_id)
recipient = User.find(recipient_id) recipient = User.find(recipient_id)
@note = Note.find(note_id) @note = Note.find(note_id)
@project = @note.project @project = @note.project
mail(:to => recipient.email, :subject => "gitlab | #{@project.name}") mail(to: recipient.email, subject: "gitlab | #{@project.name}")
end end
def note_commit_email(recipient_id, note_id) def note_commit_email(recipient_id, note_id)
...@@ -34,7 +34,7 @@ class Notify < ActionMailer::Base ...@@ -34,7 +34,7 @@ class Notify < ActionMailer::Base
@commit = @note.target @commit = @note.target
@commit = CommitDecorator.decorate(@commit) @commit = CommitDecorator.decorate(@commit)
@project = @note.project @project = @note.project
mail(:to => recipient.email, :subject => "gitlab | note for commit #{@commit.short_id} | #{@commit.title} | #{@project.name}") mail(to: recipient.email, subject: "gitlab | note for commit #{@commit.short_id} | #{@commit.title} | #{@project.name}")
end end
def note_merge_request_email(recipient_id, note_id) def note_merge_request_email(recipient_id, note_id)
...@@ -42,7 +42,7 @@ class Notify < ActionMailer::Base ...@@ -42,7 +42,7 @@ class Notify < ActionMailer::Base
@note = Note.find(note_id) @note = Note.find(note_id)
@merge_request = @note.noteable @merge_request = @note.noteable
@project = @note.project @project = @note.project
mail(:to => recipient.email, :subject => "gitlab | note for merge request !#{@merge_request.id} | #{@project.name}") mail(to: recipient.email, subject: "gitlab | note for merge request !#{@merge_request.id} | #{@project.name}")
end end
def note_issue_email(recipient_id, note_id) def note_issue_email(recipient_id, note_id)
...@@ -50,7 +50,7 @@ class Notify < ActionMailer::Base ...@@ -50,7 +50,7 @@ class Notify < ActionMailer::Base
@note = Note.find(note_id) @note = Note.find(note_id)
@issue = @note.noteable @issue = @note.noteable
@project = @note.project @project = @note.project
mail(:to => recipient.email, :subject => "gitlab | note for issue ##{@issue.id} | #{@project.name}") mail(to: recipient.email, subject: "gitlab | note for issue ##{@issue.id} | #{@project.name}")
end end
def note_wiki_email(recipient_id, note_id) def note_wiki_email(recipient_id, note_id)
...@@ -58,13 +58,13 @@ class Notify < ActionMailer::Base ...@@ -58,13 +58,13 @@ class Notify < ActionMailer::Base
@note = Note.find(note_id) @note = Note.find(note_id)
@wiki = @note.noteable @wiki = @note.noteable
@project = @note.project @project = @note.project
mail(:to => recipient.email, :subject => "gitlab | note for wiki | #{@project.name}") mail(to: recipient.email, subject: "gitlab | note for wiki | #{@project.name}")
end end
def new_merge_request_email(merge_request_id) def new_merge_request_email(merge_request_id)
@merge_request = MergeRequest.find(merge_request_id) @merge_request = MergeRequest.find(merge_request_id)
@project = @merge_request.project @project = @merge_request.project
mail(:to => @merge_request.assignee_email, :subject => "gitlab | new merge request !#{@merge_request.id} | #{@merge_request.title} | #{@project.name}") mail(to: @merge_request.assignee_email, subject: "gitlab | new merge request !#{@merge_request.id} | #{@merge_request.title} | #{@project.name}")
end end
def reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_id) def reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_id)
...@@ -72,7 +72,7 @@ class Notify < ActionMailer::Base ...@@ -72,7 +72,7 @@ class Notify < ActionMailer::Base
@merge_request = MergeRequest.find(merge_request_id) @merge_request = MergeRequest.find(merge_request_id)
@previous_assignee ||= User.find(previous_assignee_id) @previous_assignee ||= User.find(previous_assignee_id)
@project = @merge_request.project @project = @merge_request.project
mail(:to => recipient.email, :subject => "gitlab | changed merge request !#{@merge_request.id} | #{@merge_request.title} | #{@project.name}") mail(to: recipient.email, subject: "gitlab | changed merge request !#{@merge_request.id} | #{@merge_request.title} | #{@project.name}")
end end
def reassigned_issue_email(recipient_id, issue_id, previous_assignee_id) def reassigned_issue_email(recipient_id, issue_id, previous_assignee_id)
...@@ -80,6 +80,6 @@ class Notify < ActionMailer::Base ...@@ -80,6 +80,6 @@ class Notify < ActionMailer::Base
@issue = Issue.find(issue_id) @issue = Issue.find(issue_id)
@previous_assignee ||= User.find(previous_assignee_id) @previous_assignee ||= User.find(previous_assignee_id)
@project = @issue.project @project = @issue.project
mail(:to => recipient.email, :subject => "gitlab | changed issue ##{@issue.id} | #{@issue.title} | #{@project.name}") mail(to: recipient.email, subject: "gitlab | changed issue ##{@issue.id} | #{@issue.title} | #{@project.name}")
end end
end end
...@@ -20,7 +20,7 @@ class Commit ...@@ -20,7 +20,7 @@ class Commit
:tree, :tree,
:id, :id,
:to_patch, :to_patch,
:to => :commit to: :commit
class << self class << self
...@@ -57,7 +57,7 @@ class Commit ...@@ -57,7 +57,7 @@ class Commit
def commits_since(repo, date) def commits_since(repo, date)
commits = repo.heads.map do |h| commits = repo.heads.map do |h|
repo.log(h.name, nil, :since => date).each { |c| Commit.new(c, h) } repo.log(h.name, nil, since: date).each { |c| Commit.new(c, h) }
end.flatten.uniq { |c| c.id } end.flatten.uniq { |c| c.id }
commits.sort! do |x, y| commits.sort! do |x, y|
...@@ -69,7 +69,7 @@ class Commit ...@@ -69,7 +69,7 @@ class Commit
def commits(repo, ref, path = nil, limit = nil, offset = nil) def commits(repo, ref, path = nil, limit = nil, offset = nil)
if path if path
repo.log(ref, path, :max_count => limit, :skip => offset) repo.log(ref, path, max_count: limit, skip: offset)
elsif limit && offset elsif limit && offset
repo.commits(ref, limit, offset) repo.commits(ref, limit, offset)
else else
...@@ -86,9 +86,9 @@ class Commit ...@@ -86,9 +86,9 @@ class Commit
last = project.commit(from.try(:strip)) last = project.commit(from.try(:strip))
result = { result = {
:commits => [], commits: [],
:diffs => [], diffs: [],
:commit => nil commit: nil
} }
if first && last if first && last
......
...@@ -12,13 +12,13 @@ class Event < ActiveRecord::Base ...@@ -12,13 +12,13 @@ class Event < ActiveRecord::Base
Merged = 7 Merged = 7
belongs_to :project belongs_to :project
belongs_to :target, :polymorphic => true belongs_to :target, polymorphic: true
# For Hash only # For Hash only
serialize :data serialize :data
scope :recent, order("created_at DESC") scope :recent, order("created_at DESC")
scope :code_push, where(:action => Pushed) scope :code_push, where(action: Pushed)
def self.determine_action(record) def self.determine_action(record)
if [Issue, MergeRequest].include? record.class if [Issue, MergeRequest].include? record.class
...@@ -29,7 +29,7 @@ class Event < ActiveRecord::Base ...@@ -29,7 +29,7 @@ class Event < ActiveRecord::Base
end end
def self.recent_for_user user def self.recent_for_user user
where(:project_id => user.projects.map(&:id)).recent where(project_id: user.projects.map(&:id)).recent
end end
# Next events currently enabled for system # Next events currently enabled for system
...@@ -106,9 +106,9 @@ class Event < ActiveRecord::Base ...@@ -106,9 +106,9 @@ class Event < ActiveRecord::Base
end end
end end
delegate :name, :email, :to => :author, :prefix => true, :allow_nil => true delegate :name, :email, to: :author, prefix: true, allow_nil: true
delegate :title, :to => :issue, :prefix => true, :allow_nil => true delegate :title, to: :issue, prefix: true, allow_nil: true
delegate :title, :to => :merge_request, :prefix => true, :allow_nil => true delegate :title, to: :merge_request, prefix: true, allow_nil: true
end end
# == Schema Information # == Schema Information
# #
......
...@@ -7,7 +7,7 @@ class Issue < ActiveRecord::Base ...@@ -7,7 +7,7 @@ class Issue < ActiveRecord::Base
belongs_to :milestone belongs_to :milestone
validates :description, validates :description,
:length => { :within => 0..2000 } length: { within: 0..2000 }
acts_as_list acts_as_list
......
...@@ -6,16 +6,16 @@ class Key < ActiveRecord::Base ...@@ -6,16 +6,16 @@ class Key < ActiveRecord::Base
belongs_to :project belongs_to :project
validates :title, validates :title,
:presence => true, presence: true,
:length => { :within => 0..255 } length: { within: 0..255 }
validates :key, validates :key,
:presence => true, presence: true,
:length => { :within => 0..5000 } length: { within: 0..5000 }
before_save :set_identifier before_save :set_identifier
before_validation :strip_white_space before_validation :strip_white_space
delegate :name, :email, :to => :user, :prefix => true delegate :name, :email, to: :user, prefix: true
validate :unique_key validate :unique_key
def strip_white_space def strip_white_space
...@@ -23,7 +23,7 @@ class Key < ActiveRecord::Base ...@@ -23,7 +23,7 @@ class Key < ActiveRecord::Base
end end
def unique_key def unique_key
query = Key.where(:key => key) query = Key.where(key: key)
query = query.where('(project_id IS NULL OR project_id = ?)', project_id) if project_id query = query.where('(project_id IS NULL OR project_id = ?)', project_id) if project_id
if (query.count > 0) if (query.count > 0)
errors.add :key, 'already exist.' errors.add :key, 'already exist.'
......
...@@ -20,7 +20,7 @@ class MergeRequest < ActiveRecord::Base ...@@ -20,7 +20,7 @@ class MergeRequest < ActiveRecord::Base
validate :validate_branches validate :validate_branches
def self.find_all_by_branch(branch_name) def self.find_all_by_branch(branch_name)
where("source_branch like :branch or target_branch like :branch", :branch => branch_name) where("source_branch like :branch or target_branch like :branch", branch: branch_name)
end end
def human_state def human_state
...@@ -48,7 +48,7 @@ class MergeRequest < ActiveRecord::Base ...@@ -48,7 +48,7 @@ class MergeRequest < ActiveRecord::Base
end end
def mark_as_unchecked def mark_as_unchecked
self.update_attributes(:state => UNCHECKED) self.update_attributes(state: UNCHECKED)
end end
def can_be_merged? def can_be_merged?
...@@ -101,11 +101,11 @@ class MergeRequest < ActiveRecord::Base ...@@ -101,11 +101,11 @@ class MergeRequest < ActiveRecord::Base
end end
def merge_event def merge_event
self.project.events.where(:target_id => self.id, :target_type => "MergeRequest", :action => Event::Merged).last self.project.events.where(target_id: self.id, target_type: "MergeRequest", action: Event::Merged).last
end end
def closed_event def closed_event
self.project.events.where(:target_id => self.id, :target_type => "MergeRequest", :action => Event::Closed).last self.project.events.where(target_id: self.id, target_type: "MergeRequest", action: Event::Closed).last
end end
def commits def commits
...@@ -128,7 +128,7 @@ class MergeRequest < ActiveRecord::Base ...@@ -128,7 +128,7 @@ class MergeRequest < ActiveRecord::Base
end end
def mark_as_unmergable def mark_as_unmergable
self.update_attributes :state => CANNOT_BE_MERGED self.update_attributes state: CANNOT_BE_MERGED
end end
def reloaded_commits def reloaded_commits
...@@ -150,11 +150,11 @@ class MergeRequest < ActiveRecord::Base ...@@ -150,11 +150,11 @@ class MergeRequest < ActiveRecord::Base
def merge!(user_id) def merge!(user_id)
self.mark_as_merged! self.mark_as_merged!
Event.create( Event.create(
:project => self.project, project: self.project,
:action => Event::Merged, action: Event::Merged,
:target_id => self.id, target_id: self.id,
:target_type => "MergeRequest", target_type: "MergeRequest",
:author_id => user_id author_id: user_id
) )
end end
......
...@@ -24,7 +24,7 @@ class Milestone < ActiveRecord::Base ...@@ -24,7 +24,7 @@ class Milestone < ActiveRecord::Base
end end
def participants def participants
User.where(:id => issues.map(&:assignee_id)) User.where(id: issues.map(&:assignee_id))
end end
def percent_complete def percent_complete
......
...@@ -3,18 +3,18 @@ require 'file_size_validator' ...@@ -3,18 +3,18 @@ require 'file_size_validator'
class Note < ActiveRecord::Base class Note < ActiveRecord::Base
belongs_to :project belongs_to :project
belongs_to :noteable, :polymorphic => true belongs_to :noteable, polymorphic: true
belongs_to :author, belongs_to :author,
:class_name => "User" class_name: "User"
delegate :name, delegate :name,
:to => :project, to: :project,
:prefix => true prefix: true
delegate :name, delegate :name,
:email, :email,
:to => :author, to: :author,
:prefix => true prefix: true
attr_protected :author, :author_id attr_protected :author, :author_id
attr_accessor :notify attr_accessor :notify
...@@ -23,19 +23,19 @@ class Note < ActiveRecord::Base ...@@ -23,19 +23,19 @@ class Note < ActiveRecord::Base
validates_presence_of :project validates_presence_of :project
validates :note, validates :note,
:presence => true, presence: true,
:length => { :within => 0..5000 } length: { within: 0..5000 }
validates :attachment, validates :attachment,
:file_size => { file_size: {
:maximum => 10.megabytes.to_i maximum: 10.megabytes.to_i
} }
scope :common, where(:noteable_id => nil) scope :common, where(noteable_id: nil)
scope :today, where("created_at >= :date", :date => Date.today) scope :today, where("created_at >= :date", date: Date.today)
scope :last_week, where("created_at >= :date", :date => (Date.today - 7.days)) scope :last_week, where("created_at >= :date", date: (Date.today - 7.days))
scope :since, lambda { |day| where("created_at >= :date", :date => (day)) } scope :since, lambda { |day| where("created_at >= :date", date: (day)) }
scope :fresh, order("created_at DESC") scope :fresh, order("created_at DESC")
scope :inc_author_project, includes(:project, :author) scope :inc_author_project, includes(:project, :author)
scope :inc_author, includes(:author) scope :inc_author, includes(:author)
...@@ -43,11 +43,11 @@ class Note < ActiveRecord::Base ...@@ -43,11 +43,11 @@ class Note < ActiveRecord::Base
mount_uploader :attachment, AttachmentUploader mount_uploader :attachment, AttachmentUploader
def self.create_status_change_note(noteable, author, status) def self.create_status_change_note(noteable, author, status)
create({ :noteable => noteable, create({ noteable: noteable,
:project => noteable.project, project: noteable.project,
:author => author, author: author,
:note => "_Status changed to #{status}_" }, note: "_Status changed to #{status}_" },
:without_protection => true) without_protection: true)
end end
def notify def notify
......
...@@ -9,19 +9,19 @@ class Project < ActiveRecord::Base ...@@ -9,19 +9,19 @@ class Project < ActiveRecord::Base
# #
# Relations # Relations
# #
belongs_to :owner, :class_name => "User" belongs_to :owner, class_name: "User"
has_many :users, :through => :users_projects has_many :users, through: :users_projects
has_many :events, :dependent => :destroy has_many :events, dependent: :destroy
has_many :merge_requests, :dependent => :destroy has_many :merge_requests, dependent: :destroy
has_many :issues, :dependent => :destroy, :order => "closed, created_at DESC" has_many :issues, dependent: :destroy, order: "closed, created_at DESC"
has_many :milestones, :dependent => :destroy has_many :milestones, dependent: :destroy
has_many :users_projects, :dependent => :destroy has_many :users_projects, dependent: :destroy
has_many :notes, :dependent => :destroy has_many :notes, dependent: :destroy
has_many :snippets, :dependent => :destroy has_many :snippets, dependent: :destroy
has_many :deploy_keys, :dependent => :destroy, :foreign_key => "project_id", :class_name => "Key" has_many :deploy_keys, dependent: :destroy, foreign_key: "project_id", class_name: "Key"
has_many :hooks, :dependent => :destroy, :class_name => "ProjectHook" has_many :hooks, dependent: :destroy, class_name: "ProjectHook"
has_many :wikis, :dependent => :destroy has_many :wikis, dependent: :destroy
has_many :protected_branches, :dependent => :destroy has_many :protected_branches, dependent: :destroy
attr_accessor :error_code attr_accessor :error_code
...@@ -33,15 +33,15 @@ class Project < ActiveRecord::Base ...@@ -33,15 +33,15 @@ class Project < ActiveRecord::Base
# #
# Scopes # Scopes
# #
scope :public_only, where(:private_flag => false) scope :public_only, where(private_flag: false)
scope :without_user, lambda { |user| where("id not in (:ids)", :ids => user.projects.map(&:id) ) } scope :without_user, lambda { |user| where("id not in (:ids)", ids: user.projects.map(&:id) ) }
def self.active def self.active
joins(:issues, :notes, :merge_requests).order("issues.created_at, notes.created_at, merge_requests.created_at DESC") joins(:issues, :notes, :merge_requests).order("issues.created_at, notes.created_at, merge_requests.created_at DESC")
end end
def self.search query def self.search query
where("name like :query or code like :query or path like :query", :query => "%#{query}%") where("name like :query or code like :query or path like :query", query: "%#{query}%")
end end
def self.create_by_user(params, user) def self.create_by_user(params, user)
...@@ -53,7 +53,7 @@ class Project < ActiveRecord::Base ...@@ -53,7 +53,7 @@ class Project < ActiveRecord::Base
project.save! project.save!
# Add user as project master # Add user as project master
project.users_projects.create!(:project_access => UsersProject::MASTER, :user => user) project.users_projects.create!(project_access: UsersProject::MASTER, user: user)
# when project saved no team member exist so # when project saved no team member exist so
# project repository should be updated after first user add # project repository should be updated after first user add
...@@ -82,28 +82,28 @@ class Project < ActiveRecord::Base ...@@ -82,28 +82,28 @@ class Project < ActiveRecord::Base
# Validations # Validations
# #
validates :name, validates :name,
:uniqueness => true, uniqueness: true,
:presence => true, presence: true,
:length => { :within => 0..255 } length: { within: 0..255 }
validates :path, validates :path,
:uniqueness => true, uniqueness: true,
:presence => true, presence: true,
:format => { :with => /^[a-zA-Z][a-zA-Z0-9_\-\.]*$/, format: { with: /^[a-zA-Z][a-zA-Z0-9_\-\.]*$/,
:message => "only letters, digits & '_' '-' '.' allowed. Letter should be first" }, message: "only letters, digits & '_' '-' '.' allowed. Letter should be first" },
:length => { :within => 0..255 } length: { within: 0..255 }
validates :description, validates :description,
:length => { :within => 0..2000 } length: { within: 0..2000 }
validates :code, validates :code,
:presence => true, presence: true,
:uniqueness => true, uniqueness: true,
:format => { :with => /^[a-zA-Z][a-zA-Z0-9_\-\.]*$/, format: { with: /^[a-zA-Z][a-zA-Z0-9_\-\.]*$/,
:message => "only letters, digits & '_' '-' '.' allowed. Letter should be first" }, message: "only letters, digits & '_' '-' '.' allowed. Letter should be first" },
:length => { :within => 1..255 } length: { within: 1..255 }
validates :owner, :presence => true validates :owner, presence: true
validate :check_limit validate :check_limit
validate :repo_name validate :repo_name
...@@ -134,19 +134,19 @@ class Project < ActiveRecord::Base ...@@ -134,19 +134,19 @@ class Project < ActiveRecord::Base
end end
def common_notes def common_notes
notes.where(:noteable_type => ["", nil]).inc_author_project notes.where(noteable_type: ["", nil]).inc_author_project
end end
def build_commit_note(commit) def build_commit_note(commit)
notes.new(:noteable_id => commit.id, :noteable_type => "Commit") notes.new(noteable_id: commit.id, noteable_type: "Commit")
end end
def commit_notes(commit) def commit_notes(commit)
notes.where(:noteable_id => commit.id, :noteable_type => "Commit", :line_code => nil) notes.where(noteable_id: commit.id, noteable_type: "Commit", line_code: nil)
end end
def commit_line_notes(commit) def commit_line_notes(commit)
notes.where(:noteable_id => commit.id, :noteable_type => "Commit").where("line_code is not null") notes.where(noteable_id: commit.id, noteable_type: "Commit").where("line_code is not null")
end end
def public? def public?
......
...@@ -2,29 +2,29 @@ class Snippet < ActiveRecord::Base ...@@ -2,29 +2,29 @@ class Snippet < ActiveRecord::Base
include Linguist::BlobHelper include Linguist::BlobHelper
belongs_to :project belongs_to :project
belongs_to :author, :class_name => "User" belongs_to :author, class_name: "User"
has_many :notes, :as => :noteable, :dependent => :destroy has_many :notes, as: :noteable, dependent: :destroy
delegate :name, delegate :name,
:email, :email,
:to => :author, to: :author,
:prefix => true prefix: true
attr_protected :author, :author_id, :project, :project_id attr_protected :author, :author_id, :project, :project_id
validates_presence_of :project_id validates_presence_of :project_id
validates_presence_of :author_id validates_presence_of :author_id
validates :title, validates :title,
:presence => true, presence: true,
:length => { :within => 0..255 } length: { within: 0..255 }
validates :file_name, validates :file_name,
:presence => true, presence: true,
:length => { :within => 0..255 } length: { within: 0..255 }
validates :content, validates :content,
:presence => true, presence: true,
:length => { :within => 0..10000 } length: { within: 0..10000 }
scope :fresh, order("created_at DESC") scope :fresh, order("created_at DESC")
scope :non_expired, where(["expires_at IS NULL OR expires_at > ?", Time.current]) scope :non_expired, where(["expires_at IS NULL OR expires_at > ?", Time.current])
......
...@@ -11,7 +11,7 @@ class Tree ...@@ -11,7 +11,7 @@ class Tree
:size, :size,
:text?, :text?,
:colorize, :colorize,
:to => :tree to: :tree
def initialize(raw_tree, project, ref = nil, path = nil) def initialize(raw_tree, project, ref = nil, path = nil)
@project, @ref, @path = project, ref, path, @project, @ref, @path = project, ref, path,
......
...@@ -11,58 +11,58 @@ class User < ActiveRecord::Base ...@@ -11,58 +11,58 @@ class User < ActiveRecord::Base
attr_accessor :force_random_password attr_accessor :force_random_password
has_many :users_projects, :dependent => :destroy has_many :users_projects, dependent: :destroy
has_many :projects, :through => :users_projects has_many :projects, through: :users_projects
has_many :my_own_projects, :class_name => "Project", :foreign_key => :owner_id has_many :my_own_projects, class_name: "Project", foreign_key: :owner_id
has_many :keys, :dependent => :destroy has_many :keys, dependent: :destroy
has_many :events, has_many :events,
:class_name => "Event", class_name: "Event",
:foreign_key => :author_id, foreign_key: :author_id,
:dependent => :destroy dependent: :destroy
has_many :recent_events, has_many :recent_events,
:class_name => "Event", class_name: "Event",
:foreign_key => :author_id, foreign_key: :author_id,
:order => "id DESC" order: "id DESC"
has_many :issues, has_many :issues,
:foreign_key => :author_id, foreign_key: :author_id,
:dependent => :destroy dependent: :destroy
has_many :notes, has_many :notes,
:foreign_key => :author_id, foreign_key: :author_id,
:dependent => :destroy dependent: :destroy
has_many :assigned_issues, has_many :assigned_issues,
:class_name => "Issue", class_name: "Issue",
:foreign_key => :assignee_id, foreign_key: :assignee_id,
:dependent => :destroy dependent: :destroy
has_many :merge_requests, has_many :merge_requests,
:foreign_key => :author_id, foreign_key: :author_id,
:dependent => :destroy dependent: :destroy
has_many :assigned_merge_requests, has_many :assigned_merge_requests,
:class_name => "MergeRequest", class_name: "MergeRequest",
:foreign_key => :assignee_id, foreign_key: :assignee_id,
:dependent => :destroy dependent: :destroy
validates :projects_limit, validates :projects_limit,
:presence => true, presence: true,
:numericality => {:greater_than_or_equal_to => 0} numericality: {greater_than_or_equal_to: 0}
validates :bio, :length => { :within => 0..255 } validates :bio, length: { within: 0..255 }
before_save :ensure_authentication_token before_save :ensure_authentication_token
alias_attribute :private_token, :authentication_token alias_attribute :private_token, :authentication_token
scope :not_in_project, lambda { |project| where("id not in (:ids)", :ids => project.users.map(&:id) ) } scope :not_in_project, lambda { |project| where("id not in (:ids)", ids: project.users.map(&:id) ) }
scope :admins, where(:admin => true) scope :admins, where(admin: true)
scope :blocked, where(:blocked => true) scope :blocked, where(blocked: true)
scope :active, where(:blocked => false) scope :active, where(blocked: false)
before_validation :generate_password, :on => :create before_validation :generate_password, on: :create
def generate_password def generate_password
if self.force_random_password if self.force_random_password
...@@ -94,17 +94,17 @@ class User < ActiveRecord::Base ...@@ -94,17 +94,17 @@ class User < ActiveRecord::Base
else else
password = Devise.friendly_token[0, 8].downcase password = Devise.friendly_token[0, 8].downcase
@user = User.create( @user = User.create(
:name => name, name: name,
:email => email, email: email,
:password => password, password: password,
:password_confirmation => password, password_confirmation: password,
:projects_limit => Gitlab.config.default_projects_limit projects_limit: Gitlab.config.default_projects_limit
) )
end end
end end
def self.search query def self.search query
where("name like :query or email like :query", :query => "%#{query}%") where("name like :query or email like :query", query: "%#{query}%")
end end
end end
# == Schema Information # == Schema Information
......
...@@ -12,18 +12,18 @@ class UsersProject < ActiveRecord::Base ...@@ -12,18 +12,18 @@ class UsersProject < ActiveRecord::Base
after_save :update_repository after_save :update_repository
after_destroy :update_repository after_destroy :update_repository
validates_uniqueness_of :user_id, :scope => [:project_id] validates_uniqueness_of :user_id, scope: [:project_id]
validates_presence_of :user_id validates_presence_of :user_id
validates_presence_of :project_id validates_presence_of :project_id
delegate :name, :email, :to => :user, :prefix => true delegate :name, :email, to: :user, prefix: true
def self.bulk_import(project, user_ids, project_access) def self.bulk_import(project, user_ids, project_access)
UsersProject.transaction do UsersProject.transaction do
user_ids.each do |user_id| user_ids.each do |user_id|
users_project = UsersProject.new( users_project = UsersProject.new(
:project_access => project_access, project_access: project_access,
:user_id => user_id user_id: user_id
) )
users_project.project = project users_project.project = project
users_project.save users_project.save
...@@ -35,7 +35,7 @@ class UsersProject < ActiveRecord::Base ...@@ -35,7 +35,7 @@ class UsersProject < ActiveRecord::Base
UsersProject.transaction do UsersProject.transaction do
project_ids.each do |project_id| project_ids.each do |project_id|
users_project = UsersProject.new( users_project = UsersProject.new(
:project_access => project_access, project_access: project_access,
) )
users_project.project_id = project_id users_project.project_id = project_id
users_project.user_id = user.id users_project.user_id = user.id
......
class Wiki < ActiveRecord::Base class Wiki < ActiveRecord::Base
belongs_to :project belongs_to :project
belongs_to :user belongs_to :user
has_many :notes, :as => :noteable, :dependent => :destroy has_many :notes, as: :noteable, dependent: :destroy
validates :content, :title, :user_id, :presence => true validates :content, :title, :user_id, presence: true
validates :title, :length => 1..250 validates :title, length: 1..250
before_update :set_slug before_update :set_slug
......
...@@ -3,22 +3,22 @@ class ActivityObserver < ActiveRecord::Observer ...@@ -3,22 +3,22 @@ class ActivityObserver < ActiveRecord::Observer
def after_create(record) def after_create(record)
Event.create( Event.create(
:project => record.project, project: record.project,
:target_id => record.id, target_id: record.id,
:target_type => record.class.name, target_type: record.class.name,
:action => Event.determine_action(record), action: Event.determine_action(record),
:author_id => record.author_id author_id: record.author_id
) )
end end
def after_save(record) def after_save(record)
if record.changed.include?("closed") if record.changed.include?("closed")
Event.create( Event.create(
:project => record.project, project: record.project,
:target_id => record.id, target_id: record.id,
:target_type => record.class.name, target_type: record.class.name,
:action => (record.closed ? Event::Closed : Event::Reopened), action: (record.closed ? Event::Closed : Event::Reopened),
:author_id => record.author_id_of_changes author_id: record.author_id_of_changes
) )
end end
end end
......
...@@ -71,7 +71,7 @@ class MailerObserver < ActiveRecord::Observer ...@@ -71,7 +71,7 @@ class MailerObserver < ActiveRecord::Observer
# Create comment about status changed # Create comment about status changed
if target.closed_changed? if target.closed_changed?
note = Note.new(:noteable => target, :project => target.project) note = Note.new(noteable: target, project: target.project)
note.author = current_user note.author = current_user
note.note = "_Status changed to #{target.closed ? 'closed' : 'reopened'}_" note.note = "_Status changed to #{target.closed ? 'closed' : 'reopened'}_"
note.save() note.save()
......
...@@ -24,7 +24,7 @@ module Account ...@@ -24,7 +24,7 @@ module Account
end end
def cared_merge_requests def cared_merge_requests
MergeRequest.where("author_id = :id or assignee_id = :id", :id => self.id).opened MergeRequest.where("author_id = :id or assignee_id = :id", id: self.id).opened
end end
def project_ids def project_ids
...@@ -50,7 +50,7 @@ module Account ...@@ -50,7 +50,7 @@ module Account
def recent_push project_id = nil def recent_push project_id = nil
# Get push events not earlier than 2 hours ago # Get push events not earlier than 2 hours ago
events = recent_events.code_push.where("created_at > ?", Time.now - 2.hours) events = recent_events.code_push.where("created_at > ?", Time.now - 2.hours)
events = events.where(:project_id => project_id) if project_id events = events.where(project_id: project_id) if project_id
# Take only latest one # Take only latest one
events = events.recent.limit(1).first events = events.recent.limit(1).first
......
...@@ -3,56 +3,56 @@ module Authority ...@@ -3,56 +3,56 @@ module Authority
# Should be rewrited for new access rights # Should be rewrited for new access rights
def add_access(user, *access) def add_access(user, *access)
access = if access.include?(:admin) access = if access.include?(:admin)
{ :project_access => UsersProject::MASTER } { project_access: UsersProject::MASTER }
elsif access.include?(:write) elsif access.include?(:write)
{ :project_access => UsersProject::DEVELOPER } { project_access: UsersProject::DEVELOPER }
else else
{ :project_access => UsersProject::REPORTER } { project_access: UsersProject::REPORTER }
end end
opts = { :user => user } opts = { user: user }
opts.merge!(access) opts.merge!(access)
users_projects.create(opts) users_projects.create(opts)
end end
def reset_access(user) def reset_access(user)
users_projects.where(:project_id => self.id, :user_id => user.id).destroy if self.id users_projects.where(project_id: self.id, user_id: user.id).destroy if self.id
end end
def repository_readers def repository_readers
keys = Key.joins({:user => :users_projects}). keys = Key.joins({user: :users_projects}).
where("users_projects.project_id = ? AND users_projects.project_access = ?", id, UsersProject::REPORTER) where("users_projects.project_id = ? AND users_projects.project_access = ?", id, UsersProject::REPORTER)
keys.map(&:identifier) + deploy_keys.map(&:identifier) keys.map(&:identifier) + deploy_keys.map(&:identifier)
end end
def repository_writers def repository_writers
keys = Key.joins({:user => :users_projects}). keys = Key.joins({user: :users_projects}).
where("users_projects.project_id = ? AND users_projects.project_access = ?", id, UsersProject::DEVELOPER) where("users_projects.project_id = ? AND users_projects.project_access = ?", id, UsersProject::DEVELOPER)
keys.map(&:identifier) keys.map(&:identifier)
end end
def repository_masters def repository_masters
keys = Key.joins({:user => :users_projects}). keys = Key.joins({user: :users_projects}).
where("users_projects.project_id = ? AND users_projects.project_access = ?", id, UsersProject::MASTER) where("users_projects.project_id = ? AND users_projects.project_access = ?", id, UsersProject::MASTER)
keys.map(&:identifier) keys.map(&:identifier)
end end
def allow_read_for?(user) def allow_read_for?(user)
!users_projects.where(:user_id => user.id).empty? !users_projects.where(user_id: user.id).empty?
end end
def guest_access_for?(user) def guest_access_for?(user)
!users_projects.where(:user_id => user.id).empty? !users_projects.where(user_id: user.id).empty?
end end
def report_access_for?(user) def report_access_for?(user)
!users_projects.where(:user_id => user.id, :project_access => [UsersProject::REPORTER, UsersProject::DEVELOPER, UsersProject::MASTER]).empty? !users_projects.where(user_id: user.id, project_access: [UsersProject::REPORTER, UsersProject::DEVELOPER, UsersProject::MASTER]).empty?
end end
def dev_access_for?(user) def dev_access_for?(user)
!users_projects.where(:user_id => user.id, :project_access => [UsersProject::DEVELOPER, UsersProject::MASTER]).empty? !users_projects.where(user_id: user.id, project_access: [UsersProject::DEVELOPER, UsersProject::MASTER]).empty?
end end
def master_access_for?(user) def master_access_for?(user)
!users_projects.where(:user_id => user.id, :project_access => [UsersProject::MASTER]).empty? || owner_id == user.id !users_projects.where(user_id: user.id, project_access: [UsersProject::MASTER]).empty? || owner_id == user.id
end end
end end
...@@ -6,39 +6,39 @@ module IssueCommonality ...@@ -6,39 +6,39 @@ module IssueCommonality
attr_protected :author, :author_id, :project, :project_id attr_protected :author, :author_id, :project, :project_id
belongs_to :project belongs_to :project
belongs_to :author, :class_name => "User" belongs_to :author, class_name: "User"
belongs_to :assignee, :class_name => "User" belongs_to :assignee, class_name: "User"
has_many :notes, :as => :noteable, :dependent => :destroy has_many :notes, as: :noteable, dependent: :destroy
validates_presence_of :project_id validates_presence_of :project_id
validates_presence_of :author_id validates_presence_of :author_id
validates :title, validates :title,
:presence => true, presence: true,
:length => { :within => 0..255 } length: { within: 0..255 }
scope :opened, where(:closed => false) scope :opened, where(closed: false)
scope :closed, where(:closed => true) scope :closed, where(closed: true)
scope :assigned, lambda { |u| where(:assignee_id => u.id)} scope :assigned, lambda { |u| where(assignee_id: u.id)}
delegate :name, delegate :name,
:email, :email,
:to => :author, to: :author,
:prefix => true prefix: true
delegate :name, delegate :name,
:email, :email,
:to => :assignee, to: :assignee,
:allow_nil => true, allow_nil: true,
:prefix => true prefix: true
attr_accessor :author_id_of_changes attr_accessor :author_id_of_changes
end end
module ClassMethods module ClassMethods
def search(query) def search(query)
where("title like :query", :query => "%#{query}%") where("title like :query", query: "%#{query}%")
end end
end end
......
...@@ -3,10 +3,10 @@ module ProjectPush ...@@ -3,10 +3,10 @@ module ProjectPush
data = post_receive_data(oldrev, newrev, ref, user) data = post_receive_data(oldrev, newrev, ref, user)
Event.create( Event.create(
:project => self, project: self,
:action => Event::Pushed, action: Event::Pushed,
:data => data, data: data,
:author_id => data[:user_id] author_id: data[:user_id]
) )
end end
...@@ -20,7 +20,7 @@ module ProjectPush ...@@ -20,7 +20,7 @@ module ProjectPush
mrs.each { |merge_request| merge_request.reload_code; merge_request.mark_as_unchecked } mrs.each { |merge_request| merge_request.reload_code; merge_request.mark_as_unchecked }
# Close merge requests # Close merge requests
mrs = self.merge_requests.opened.where(:target_branch => branch_name).all mrs = self.merge_requests.opened.where(target_branch: branch_name).all
mrs = mrs.select(&:last_commit).select { |mr| c_ids.include?(mr.last_commit.id) } mrs = mrs.select(&:last_commit).select { |mr| c_ids.include?(mr.last_commit.id) }
mrs.each { |merge_request| merge_request.merge!(user.id) } mrs.each { |merge_request| merge_request.merge!(user.id) }
......
...@@ -9,7 +9,7 @@ module SshKey ...@@ -9,7 +9,7 @@ module SshKey
def repository_delete_key def repository_delete_key
Gitlab::GitHost.system.new.configure do |c| Gitlab::GitHost.system.new.configure do |c|
#delete key file is there is no identically deploy keys #delete key file is there is no identically deploy keys
if !is_deploy_key || Key.where(:identifier => identifier).count() == 0 if !is_deploy_key || Key.where(identifier: identifier).count() == 0
c.delete_key(identifier) c.delete_key(identifier)
end end
c.update_projects(projects) c.update_projects(projects)
......
...@@ -25,8 +25,8 @@ module Team ...@@ -25,8 +25,8 @@ module Team
# with passed access role by user id # with passed access role by user id
def add_user_id_to_team(user_id, access_role) def add_user_id_to_team(user_id, access_role)
users_projects.create( users_projects.create(
:user_id => user_id, user_id: user_id,
:project_access => access_role project_access: access_role
) )
end end
......
...@@ -23,7 +23,7 @@ class AttachmentUploader < CarrierWave::Uploader::Base ...@@ -23,7 +23,7 @@ class AttachmentUploader < CarrierWave::Uploader::Base
# end # end
# Process files as they are uploaded: # Process files as they are uploaded:
# process :scale => [200, 300] # process scale: [200, 300]
# #
# def scale(width, height) # def scale(width, height)
# # do something # # do something
...@@ -31,7 +31,7 @@ class AttachmentUploader < CarrierWave::Uploader::Base ...@@ -31,7 +31,7 @@ class AttachmentUploader < CarrierWave::Uploader::Base
# Create different versions of your uploaded files: # Create different versions of your uploaded files:
# version :thumb do # version :thumb do
# process :scale => [50, 50] # process scale: [50, 50]
# end # end
# Add a white list of extensions which are allowed to be uploaded. # Add a white list of extensions which are allowed to be uploaded.
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
Resque Workers Resque Workers
.data.padded .data.padded
= link_to admin_resque_path do = link_to admin_resque_path do
%h1{:class => @workers.present? ? "cgreen" : "cred"} %h1{class: @workers.present? ? "cgreen" : "cred"}
= @workers.count = @workers.count
%hr %hr
%p %p
%strong{:class => @pending_jobs > 0 ? "cred" : "cgreen"} %strong{class: @pending_jobs > 0 ? "cred" : "cgreen"}
#{@pending_jobs} post receive jobs waiting #{@pending_jobs} post receive jobs waiting
.span4 .span4
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
= link_to admin_projects_path do = link_to admin_projects_path do
%h1= Project.count %h1= Project.count
%hr %hr
= link_to 'New Project', new_admin_project_path, :class => "btn small" = link_to 'New Project', new_admin_project_path, class: "btn small"
.span4 .span4
.ui-box .ui-box
%h5 Users %h5 Users
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
= link_to admin_users_path do = link_to admin_users_path do
%h1= User.count %h1= User.count
%hr %hr
= link_to 'New User', new_admin_user_path, :class => "btn small" = link_to 'New User', new_admin_user_path, class: "btn small"
.row .row
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
Post receive hooks for binding events. Post receive hooks for binding events.
%br %br
Read more about system hooks Read more about system hooks
%strong #{link_to "here", help_system_hooks_path, :class => "vlink"} %strong #{link_to "here", help_system_hooks_path, class: "vlink"}
= form_for @hook, :as => :hook, :url => admin_hooks_path do |f| = form_for @hook, as: :hook, url: admin_hooks_path do |f|
-if @hook.errors.any? -if @hook.errors.any?
.alert-message.block-message.error .alert-message.block-message.error
- @hook.errors.full_messages.each do |msg| - @hook.errors.full_messages.each do |msg|
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
.clearfix .clearfix
= f.label :url, "URL:" = f.label :url, "URL:"
.input .input
= f.text_field :url, :class => "text_field xxlarge" = f.text_field :url, class: "text_field xxlarge"
&nbsp; &nbsp;
= f.submit "Add System Hook", :class => "btn primary" = f.submit "Add System Hook", class: "btn primary"
%hr %hr
-if @hooks.any? -if @hooks.any?
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
%td %td
= link_to admin_hook_path(hook) do = link_to admin_hook_path(hook) do
%strong= hook.url %strong= hook.url
= link_to 'Test Hook', admin_hook_test_path(hook), :class => "btn small right" = link_to 'Test Hook', admin_hook_test_path(hook), class: "btn small right"
%td POST %td POST
%td %td
= link_to 'Remove', admin_hook_path(hook), :confirm => 'Are you sure?', :method => :delete, :class => "danger btn small right" = link_to 'Remove', admin_hook_path(hook), confirm: 'Are you sure?', method: :delete, class: "danger btn small right"
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
= f.label :name do = f.label :name do
Project name is Project name is
.input .input
= f.text_field :name, :placeholder => "Example Project", :class => "xxlarge" = f.text_field :name, placeholder: "Example Project", class: "xxlarge"
= f.submit project.new_record? ? 'Create project' : 'Save Project', :class => "btn primary" = f.submit project.new_record? ? 'Create project' : 'Save Project', class: "btn primary"
%hr %hr
.alert.alert-info .alert.alert-info
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
.input .input
.input-prepend .input-prepend
%span.add-on= Gitlab.config.ssh_path %span.add-on= Gitlab.config.ssh_path
= f.text_field :path, :placeholder => "example_project", :disabled => !!project.id = f.text_field :path, placeholder: "example_project", disabled: !!project.id
%span.add-on= ".git" %span.add-on= ".git"
.clearfix .clearfix
= f.label :code do = f.label :code do
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
.input .input
.input-prepend .input-prepend
%span.add-on= web_app_url %span.add-on= web_app_url
= f.text_field :code, :placeholder => "example" = f.text_field :code, placeholder: "example"
- unless project.new_record? - unless project.new_record?
.clearfix .clearfix
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
- if project.repo_exists? - if project.repo_exists?
.clearfix .clearfix
= f.label :default_branch, "Default Branch" = f.label :default_branch, "Default Branch"
.input= f.select(:default_branch, project.heads.map(&:name), {}, :style => "width:210px;") .input= f.select(:default_branch, project.heads.map(&:name), {}, style: "width:210px;")
- unless project.new_record? - unless project.new_record?
.alert.alert-info .alert.alert-info
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
- unless project.new_record? - unless project.new_record?
.actions .actions
= f.submit 'Save Project', :class => "btn primary" = f.submit 'Save Project', class: "btn primary"
......
%h3.page_title #{@admin_project.name} &rarr; Edit project %h3.page_title #{@admin_project.name} &rarr; Edit project
%hr %hr
= render 'form', :project => @admin_project = render 'form', project: @admin_project
%h3 %h3
Projects Projects
= link_to 'New Project', new_admin_project_path, :class => "btn small right" = link_to 'New Project', new_admin_project_path, class: "btn small right"
%br %br
= form_tag admin_projects_path, :method => :get do = form_tag admin_projects_path, method: :get do
= text_field_tag :name, params[:name], :class => "xlarge" = text_field_tag :name, params[:name], class: "xlarge"
= submit_tag "Search", :class => "btn submit primary" = submit_tag "Search", class: "btn submit primary"
%table.admin-table %table.admin-table
%thead %thead
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
%td= link_to project.name, [:admin, project] %td= link_to project.name, [:admin, project]
%td= project.path %td= project.path
%td= project.users_projects.count %td= project.users_projects.count
%td= check_box_tag :post_receive_file, 1, project.has_post_receive_file?, :disabled => true %td= check_box_tag :post_receive_file, 1, project.has_post_receive_file?, disabled: true
%td= last_commit(project) %td= last_commit(project)
%td= link_to 'Edit', edit_admin_project_path(project), :id => "edit_#{dom_id(project)}", :class => "btn small" %td= link_to 'Edit', edit_admin_project_path(project), id: "edit_#{dom_id(project)}", class: "btn small"
%td.bgred= link_to 'Destroy', [:admin, project], :confirm => "REMOVE #{project.name}? Are you sure?", :method => :delete, :class => "btn small danger" %td.bgred= link_to 'Destroy', [:admin, project], confirm: "REMOVE #{project.name}? Are you sure?", method: :delete, class: "btn small danger"
= paginate @admin_projects, :theme => "admin" = paginate @admin_projects, theme: "admin"
%h3.page_title New project %h3.page_title New project
%hr %hr
= render 'form', :project => @admin_project = render 'form', project: @admin_project
%h3 %h3
= @admin_project.name = @admin_project.name
= link_to 'Edit', edit_admin_project_path(@admin_project), :class => "btn right small" = link_to 'Edit', edit_admin_project_path(@admin_project), class: "btn right small"
%br %br
%table.zebra-striped.table-bordered %table.zebra-striped.table-bordered
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
%b %b
Post Receive File: Post Receive File:
%td %td
= check_box_tag :post_receive_file, 1, @admin_project.has_post_receive_file?, :disabled => true = check_box_tag :post_receive_file, 1, @admin_project.has_post_receive_file?, disabled: true
%br %br
%h3 %h3
Team Team
...@@ -52,14 +52,14 @@ ...@@ -52,14 +52,14 @@
%tr %tr
%td %td
= link_to tm.user_name, admin_user_path(tm.user) = link_to tm.user_name, admin_user_path(tm.user)
%td= select_tag :tm_project_access, options_for_select(Project.access_options, tm.project_access), :class => "medium project-access-select", :disabled => :disabled %td= select_tag :tm_project_access, options_for_select(Project.access_options, tm.project_access), class: "medium project-access-select", disabled: :disabled
%td= link_to 'Edit Access', edit_admin_team_member_path(tm), :class => "btn small" %td= link_to 'Edit Access', edit_admin_team_member_path(tm), class: "btn small"
%td= link_to 'Remove from team', admin_team_member_path(tm), :confirm => 'Are you sure?', :method => :delete, :class => "btn danger small" %td= link_to 'Remove from team', admin_team_member_path(tm), confirm: 'Are you sure?', method: :delete, class: "btn danger small"
%br %br
%h3 Add new team member %h3 Add new team member
%br %br
= form_tag team_update_admin_project_path(@admin_project), :class => "bulk_import", :method => :put do = form_tag team_update_admin_project_path(@admin_project), class: "bulk_import", method: :put do
%table.zebra-striped.table-bordered %table.zebra-striped.table-bordered
%thead %thead
%tr %tr
...@@ -67,14 +67,14 @@ ...@@ -67,14 +67,14 @@
%th Project Access: %th Project Access:
%tr %tr
%td= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name), :multiple => true %td= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name), multiple: true
%td= select_tag :project_access, options_for_select(Project.access_options), :class => "project-access-select" %td= select_tag :project_access, options_for_select(Project.access_options), class: "project-access-select"
%tr %tr
%td= submit_tag 'Add', :class => "btn primary" %td= submit_tag 'Add', class: "btn primary"
%td %td
Read more about project permissions Read more about project permissions
%strong= link_to "here", help_permissions_path, :class => "vlink" %strong= link_to "here", help_permissions_path, class: "vlink"
:css :css
form select { form select {
......
%h3 Resque %h3 Resque
%iframe{:src => "/info/resque", :width => 1168, :height => 600, :style => "border: none"} %iframe{src: "/info/resque", width: 1168, height: 600, style: "border: none"}
\ No newline at end of file \ No newline at end of file
= form_for @admin_team_member, :as => :team_member, :url => admin_team_member_path(@admin_team_member) do |f| = form_for @admin_team_member, as: :team_member, url: admin_team_member_path(@admin_team_member) do |f|
-if @admin_team_member.errors.any? -if @admin_team_member.errors.any?
.alert-message.block-message.error .alert-message.block-message.error
%ul %ul
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
.clearfix .clearfix
%label Project Access: %label Project Access:
.input .input
= f.select :project_access, options_for_select(Project.access_options, @admin_team_member.project_access), {}, :class => "project-access-select" = f.select :project_access, options_for_select(Project.access_options, @admin_team_member.project_access), {}, class: "project-access-select"
%br %br
.actions .actions
= f.submit 'Save', :class => "btn primary" = f.submit 'Save', class: "btn primary"
= link_to 'Cancel', :back, :class => "btn" = link_to 'Cancel', :back, class: "btn"
:css :css
form select { form select {
......
...@@ -22,17 +22,17 @@ ...@@ -22,17 +22,17 @@
-if f.object.new_record? -if f.object.new_record?
.clearfix .clearfix
= f.label :admin, :class => "checkbox" do = f.label :admin, class: "checkbox" do
= f.check_box :force_random_password, {}, true, nil = f.check_box :force_random_password, {}, true, nil
%span Generate random password %span Generate random password
%div.password-fields %div.password-fields
.clearfix .clearfix
= f.label :password = f.label :password
.input= f.password_field :password, :disabled => f.object.force_random_password .input= f.password_field :password, disabled: f.object.force_random_password
.clearfix .clearfix
= f.label :password_confirmation = f.label :password_confirmation
.input= f.password_field :password_confirmation, :disabled => f.object.force_random_password .input= f.password_field :password_confirmation, disabled: f.object.force_random_password
%hr %hr
.clearfix .clearfix
= f.label :skype = f.label :skype
...@@ -46,27 +46,27 @@ ...@@ -46,27 +46,27 @@
.span6 .span6
.clearfix .clearfix
= f.label :projects_limit = f.label :projects_limit
.input= f.text_field :projects_limit, :class => "small_input" .input= f.text_field :projects_limit, class: "small_input"
.alert .alert
.clearfix .clearfix
%p Make the user a GitLab administrator. %p Make the user a GitLab administrator.
= f.label :admin, :class => "checkbox" do = f.label :admin, class: "checkbox" do
= f.check_box :admin = f.check_box :admin
%span Administrator %span Administrator
- unless @admin_user.new_record? - unless @admin_user.new_record?
.alert.alert-error .alert.alert-error
- if @admin_user.blocked - if @admin_user.blocked
%span %span
= link_to 'Unblock', unblock_admin_user_path(@admin_user), :method => :put, :class => "btn small" = link_to 'Unblock', unblock_admin_user_path(@admin_user), method: :put, class: "btn small"
This user is blocked and is not able to login to GitLab This user is blocked and is not able to login to GitLab
- else - else
%span %span
= link_to 'Block', block_admin_user_path(@admin_user), :confirm => 'USER WILL BE BLOCKED! Are you sure?', :method => :put, :class => "btn small danger" = link_to 'Block', block_admin_user_path(@admin_user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn small danger"
Blocked users will be removed from all projects &amp; will not be able to login to GitLab. Blocked users will be removed from all projects &amp; will not be able to login to GitLab.
.actions .actions
= f.submit 'Save', :class => "btn primary" = f.submit 'Save', class: "btn primary"
- if @admin_user.new_record? - if @admin_user.new_record?
= link_to 'Cancel', admin_users_path, :class => "btn" = link_to 'Cancel', admin_users_path, class: "btn"
- else - else
= link_to 'Cancel', admin_user_path(@admin_user), :class => "btn" = link_to 'Cancel', admin_user_path(@admin_user), class: "btn"
%h3 %h3
Users Users
= link_to 'New User', new_admin_user_path, :class => "btn small right" = link_to 'New User', new_admin_user_path, class: "btn small right"
%br %br
= form_tag admin_users_path, :method => :get do = form_tag admin_users_path, method: :get do
= text_field_tag :name, params[:name], :class => "xlarge" = text_field_tag :name, params[:name], class: "xlarge"
= submit_tag "Search", :class => "btn submit primary" = submit_tag "Search", class: "btn submit primary"
%ul.nav.nav-pills %ul.nav.nav-pills
%li{:class => "#{'active' unless params[:filter]}"} %li{class: "#{'active' unless params[:filter]}"}
= link_to "Active", admin_users_path = link_to "Active", admin_users_path
%li{:class => "#{'active' if params[:filter] == "admins"}"} %li{class: "#{'active' if params[:filter] == "admins"}"}
= link_to admin_users_path(:filter => "admins") do = link_to admin_users_path(filter: "admins") do
Admins Admins
%li{:class => "#{'active' if params[:filter] == "blocked"}"} %li{class: "#{'active' if params[:filter] == "blocked"}"}
= link_to admin_users_path(:filter => "blocked") do = link_to admin_users_path(filter: "blocked") do
Blocked Blocked
%li{:class => "#{'active' if params[:filter] == "wop"}"} %li{class: "#{'active' if params[:filter] == "wop"}"}
= link_to admin_users_path(:filter => "wop") do = link_to admin_users_path(filter: "wop") do
Without projects Without projects
%table.admin-table %table.admin-table
...@@ -31,16 +31,16 @@ ...@@ -31,16 +31,16 @@
- @admin_users.each do |user| - @admin_users.each do |user|
%tr %tr
%td= check_box_tag "admin", 1, user.admin, :disabled => :disabled %td= check_box_tag "admin", 1, user.admin, disabled: :disabled
%td= link_to user.name, [:admin, user] %td= link_to user.name, [:admin, user]
%td= user.email %td= user.email
%td= user.users_projects.count %td= user.users_projects.count
%td= link_to 'Edit', edit_admin_user_path(user), :id => "edit_#{dom_id(user)}", :class => "btn small" %td= link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: "btn small"
%td %td
- if user.blocked - if user.blocked
= link_to 'Unblock', unblock_admin_user_path(user), :method => :put, :class => "btn small success" = link_to 'Unblock', unblock_admin_user_path(user), method: :put, class: "btn small success"
- else - else
= link_to 'Block', block_admin_user_path(user), :confirm => 'USER WILL BE BLOCKED! Are you sure?', :method => :put, :class => "btn small danger" = link_to 'Block', block_admin_user_path(user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn small danger"
%td.bgred= link_to 'Destroy', [:admin, user], :confirm => "USER #{user.name} WILL BE REMOVED! Are you sure?", :method => :delete, :class => "btn small danger" %td.bgred= link_to 'Destroy', [:admin, user], confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?", method: :delete, class: "btn small danger"
= paginate @admin_users, :theme => "admin" = paginate @admin_users, theme: "admin"
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
%small Blocked %small Blocked
- if @admin_user.admin - if @admin_user.admin
%small Administrator %small Administrator
= link_to 'Edit', edit_admin_user_path(@admin_user), :class => "btn small right" = link_to 'Edit', edit_admin_user_path(@admin_user), class: "btn small right"
%br %br
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
%td %td
%b %b
Admin: Admin:
%td= check_box_tag "admin", 1, @admin_user.admin, :disabled => :disabled %td= check_box_tag "admin", 1, @admin_user.admin, disabled: :disabled
%tr %tr
%td %td
%b %b
Blocked: Blocked:
%td= check_box_tag "blocked", 1, @admin_user.blocked, :disabled => :disabled %td= check_box_tag "blocked", 1, @admin_user.blocked, disabled: :disabled
%tr %tr
%td %td
%b %b
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
%br %br
%h3 Add User to Projects %h3 Add User to Projects
%br %br
= form_tag team_update_admin_user_path(@admin_user), :class => "bulk_import", :method => :put do = form_tag team_update_admin_user_path(@admin_user), class: "bulk_import", method: :put do
%table.table-bordered %table.table-bordered
%thead %thead
%tr %tr
...@@ -64,14 +64,14 @@ ...@@ -64,14 +64,14 @@
%th Project Access: %th Project Access:
%tr %tr
%td= select_tag :project_ids, options_from_collection_for_select(@projects , :id, :name), :multiple => true %td= select_tag :project_ids, options_from_collection_for_select(@projects , :id, :name), multiple: true
%td= select_tag :project_access, options_for_select(Project.access_options), :class => "project-access-select" %td= select_tag :project_access, options_for_select(Project.access_options), class: "project-access-select"
%tr %tr
%td= submit_tag 'Add', :class => "btn primary" %td= submit_tag 'Add', class: "btn primary"
%td %td
Read more about project permissions Read more about project permissions
%strong= link_to "here", help_permissions_path, :class => "vlink" %strong= link_to "here", help_permissions_path, class: "vlink"
%br %br
- if @admin_user.projects.present? - if @admin_user.projects.present?
...@@ -90,9 +90,9 @@ ...@@ -90,9 +90,9 @@
- project = tm.project - project = tm.project
%tr %tr
%td= link_to project.name, admin_project_path(project) %td= link_to project.name, admin_project_path(project)
%td= select_tag :tm_project_access, options_for_select(Project.access_options, tm.project_access), :class => "medium project-access-select", :disabled => :disabled %td= select_tag :tm_project_access, options_for_select(Project.access_options, tm.project_access), class: "medium project-access-select", disabled: :disabled
%td= link_to 'Edit Access', edit_admin_team_member_path(tm), :class => "btn small" %td= link_to 'Edit Access', edit_admin_team_member_path(tm), class: "btn small"
%td= link_to 'Remove from team', admin_team_member_path(tm), :confirm => 'Are you sure?', :method => :delete, :class => "btn small danger" %td= link_to 'Remove from team', admin_team_member_path(tm), confirm: 'Are you sure?', method: :delete, class: "btn small danger"
:css :css
form select { form select {
......
%li.commit %li.commit
.browse_code_link_holder .browse_code_link_holder
%p %p
%strong= link_to "Browse Code »", tree_project_ref_path(@project, commit.id), :class => "right" %strong= link_to "Browse Code »", tree_project_ref_path(@project, commit.id), class: "right"
%p %p
= link_to commit.short_id(8), project_commit_path(@project, :id => commit.id), :class => "commit_short_id" = link_to commit.short_id(8), project_commit_path(@project, id: commit.id), class: "commit_short_id"
%strong.cgray= commit.author_name %strong.cgray= commit.author_name
&ndash; &ndash;
= image_tag gravatar_icon(commit.author_email), :class => "avatar", :width => 16 = image_tag gravatar_icon(commit.author_email), class: "avatar", width: 16
= link_to_gfm truncate(commit.title, :length => 50), project_commit_path(@project, :id => commit.id), :class => "row_title" = link_to_gfm truncate(commit.title, length: 50), project_commit_path(@project, id: commit.id), class: "row_title"
%span.committed_ago %span.committed_ago
= time_ago_in_words(commit.committed_date) = time_ago_in_words(commit.committed_date)
......
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
%span.btn.disabled.grouped %span.btn.disabled.grouped
%i.icon-comment %i.icon-comment
= @notes_count = @notes_count
= link_to patch_project_commit_path(@project, @commit.id), :class => "btn small grouped" do = link_to patch_project_commit_path(@project, @commit.id), class: "btn small grouped" do
%i.icon-download-alt %i.icon-download-alt
Get Patch Get Patch
= link_to tree_project_ref_path(@project, @commit.id), :class => "browse-button primary grouped" do = link_to tree_project_ref_path(@project, @commit.id), class: "browse-button primary grouped" do
%strong Browse Code » %strong Browse Code »
%h3.commit-title.page_title %h3.commit-title.page_title
= gfm @commit.title = gfm @commit.title
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
.commit-info .commit-info
.row .row
.span4 .span4
= image_tag gravatar_icon(@commit.author_email, 40), :class => "avatar" = image_tag gravatar_icon(@commit.author_email, 40), class: "avatar"
.author .author
%strong= @commit.author_name %strong= @commit.author_name
authored authored
......
...@@ -3,24 +3,24 @@ ...@@ -3,24 +3,24 @@
%li %li
- if diff.deleted_file - if diff.deleted_file
%span.removed_file %span.removed_file
%a{:href => "##{diff.old_path}"} %a{href: "##{diff.old_path}"}
= diff.old_path = diff.old_path
= image_tag "diff_file_delete.png" = image_tag "diff_file_delete.png"
- elsif diff.renamed_file - elsif diff.renamed_file
%span.moved_file %span.moved_file
%a{:href => "##{diff.new_path}"} %a{href: "##{diff.new_path}"}
= diff.old_path = diff.old_path
= "->" = "->"
= diff.new_path = diff.new_path
= image_tag "diff_file_notice.png" = image_tag "diff_file_notice.png"
- elsif diff.new_file - elsif diff.new_file
%span.new_file %span.new_file
%a{:href => "##{diff.new_path}"} %a{href: "##{diff.new_path}"}
= diff.new_path = diff.new_path
= image_tag "diff_file_add.png" = image_tag "diff_file_add.png"
- else - else
%span.edit_file %span.edit_file
%a{:href => "##{diff.new_path}"} %a{href: "##{diff.new_path}"}
= diff.new_path = diff.new_path
= image_tag "diff_file_info.png" = image_tag "diff_file_info.png"
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
%p To prevent performance issue we rejected diff information. %p To prevent performance issue we rejected diff information.
%p %p
But if you still want to see diff But if you still want to see diff
= link_to "click this link", project_commit_path(@project, @commit.id, :force_show_diff => true), :class => "dark" = link_to "click this link", project_commit_path(@project, @commit.id, force_show_diff: true), class: "dark"
%p.cgray %p.cgray
Showing #{pluralize(diffs.count, "changed file")} Showing #{pluralize(diffs.count, "changed file")}
.file_stats .file_stats
= render "commits/diff_head", :diffs => diffs = render "commits/diff_head", diffs: diffs
- unless @suppress_diff - unless @suppress_diff
- diffs.each_with_index do |diff, i| - diffs.each_with_index do |diff, i|
...@@ -22,26 +22,26 @@ ...@@ -22,26 +22,26 @@
.diff_file_header .diff_file_header
- if diff.deleted_file - if diff.deleted_file
%i.icon-file %i.icon-file
%span{:id => "#{diff.old_path}"}= diff.old_path %span{id: "#{diff.old_path}"}= diff.old_path
- else - else
= link_to tree_file_project_ref_path(@project, @commit.id, diff.new_path) do = link_to tree_file_project_ref_path(@project, @commit.id, diff.new_path) do
%i.icon-file %i.icon-file
%span{:id => "#{diff.new_path}"}= diff.new_path %span{id: "#{diff.new_path}"}= diff.new_path
%br/ %br/
.diff_file_content .diff_file_content
-# Skipp all non non-supported blobs -# Skipp all non non-supported blobs
- next unless file.respond_to?('text?') - next unless file.respond_to?('text?')
- if file.text? - if file.text?
= render "commits/text_file", :diff => diff, :index => i = render "commits/text_file", diff: diff, index: i
- elsif file.image? - elsif file.image?
- if diff.renamed_file || diff.new_file || diff.deleted_file - if diff.renamed_file || diff.new_file || diff.deleted_file
.diff_file_content_image .diff_file_content_image
%img{:class => image_diff_class(diff), :src => "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"} %img{class: image_diff_class(diff), src: "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
- else - else
- old_file = (@commit.prev_commit.tree / diff.old_path) - old_file = (@commit.prev_commit.tree / diff.old_path)
.diff_file_content_image.img_compared .diff_file_content_image.img_compared
%img{:class => "diff_image_removed", :src => "data:#{file.mime_type};base64,#{Base64.encode64(old_file.data)}"} %img{class: "diff_image_removed", src: "data:#{file.mime_type};base64,#{Base64.encode64(old_file.data)}"}
%img{:class => "diff_image_added", :src => "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"} %img{class: "diff_image_added", src: "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
- else - else
%p.nothing_here_message No preview for this file type %p.nothing_here_message No preview for this file type
%ul.nav.nav-tabs %ul.nav.nav-tabs
%li %li
= form_tag switch_project_refs_path(@project), :method => :get, :class => "project-refs-form" do = form_tag switch_project_refs_path(@project), method: :get, class: "project-refs-form" do
= select_tag "ref", grouped_options_refs, :onchange => "$(this.form).trigger('submit');", :class => "project-refs-select" = select_tag "ref", grouped_options_refs, onchange: "$(this.form).trigger('submit');", class: "project-refs-select"
= hidden_field_tag :destination, "commits" = hidden_field_tag :destination, "commits"
%li{:class => "#{'active' if current_page?(project_commits_path(@project)) }"} %li{class: "#{'active' if current_page?(project_commits_path(@project)) }"}
= link_to project_commits_path(@project) do = link_to project_commits_path(@project) do
Commits Commits
%li{:class => "#{'active' if current_page?(compare_project_commits_path(@project)) }"} %li{class: "#{'active' if current_page?(compare_project_commits_path(@project)) }"}
= link_to compare_project_commits_path(@project) do = link_to compare_project_commits_path(@project) do
Compare Compare
%li{:class => "#{branches_tab_class}"} %li{class: "#{branches_tab_class}"}
= link_to project_repository_path(@project) do = link_to project_repository_path(@project) do
Branches Branches
%span.badge= @project.repo.branch_count %span.badge= @project.repo.branch_count
%li{:class => "#{'active' if current_page?(tags_project_repository_path(@project)) }"} %li{class: "#{'active' if current_page?(tags_project_repository_path(@project)) }"}
= link_to tags_project_repository_path(@project) do = link_to tags_project_repository_path(@project) do
Tags Tags
%span.badge= @project.repo.tag_count %span.badge= @project.repo.tag_count
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
- if current_page?(project_commits_path(@project)) && current_user.private_token - if current_page?(project_commits_path(@project)) && current_user.private_token
%li.right %li.right
%span.rss-icon %span.rss-icon
= link_to project_commits_path(@project, :atom, { :private_token => current_user.private_token, :ref => @ref }), :title => "Feed" do = link_to project_commits_path(@project, :atom, { private_token: current_user.private_token, ref: @ref }), title: "Feed" do
= image_tag "rss_ui.png", :title => "feed" = image_tag "rss_ui.png", title: "feed"
:javascript :javascript
$(function(){ $(function(){
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- if too_big - if too_big
%a.supp_diff_link Diff suppressed. Click to show %a.supp_diff_link Diff suppressed. Click to show
%table{:class => "#{'hide' if too_big}"} %table{class: "#{'hide' if too_big}"}
- each_diff_line(diff.diff.lines.to_a, index) do |line, type, line_code, line_new, line_old| - each_diff_line(diff.diff.lines.to_a, index) do |line, type, line_code, line_new, line_old|
%tr.line_holder %tr.line_holder
- if type == "match" - if type == "match"
...@@ -11,16 +11,16 @@ ...@@ -11,16 +11,16 @@
%td.line_content.matched= line %td.line_content.matched= line
- else - else
%td.old_line %td.old_line
= link_to raw(type == "new" ? "&nbsp;" : line_old), "##{line_code}", :id => line_code = link_to raw(type == "new" ? "&nbsp;" : line_old), "##{line_code}", id: line_code
- if @comments_allowed - if @comments_allowed
= link_to "", "#", :class => "line_note_link", "line_code" => line_code, :title => "Add note for this line" = link_to "", "#", class: "line_note_link", "line_code" => line_code, title: "Add note for this line"
%td.new_line= link_to raw(type == "old" ? "&nbsp;" : line_new) , "##{line_code}", :id => line_code %td.new_line= link_to raw(type == "old" ? "&nbsp;" : line_new) , "##{line_code}", id: line_code
%td.line_content{:class => "noteable_line #{type} #{line_code}", "line_code" => line_code}= raw "#{line} &nbsp;" %td.line_content{class: "noteable_line #{type} #{line_code}", "line_code" => line_code}= raw "#{line} &nbsp;"
- if @comments_allowed - if @comments_allowed
- comments = @line_notes.select { |n| n.line_code == line_code }.sort_by(&:created_at).reverse - comments = @line_notes.select { |n| n.line_code == line_code }.sort_by(&:created_at).reverse
- unless comments.empty? - unless comments.empty?
- comments.each_with_index do |note, i| - comments.each_with_index do |note, i|
= render "notes/reply_button", :line_code => line_code if i.zero? = render "notes/reply_button", line_code: line_code if i.zero?
= render "notes/per_line_show", :note => note = render "notes/per_line_show", note: note
- @line_notes.reject!{ |n| n == note } - @line_notes.reject!{ |n| n == note }
...@@ -14,13 +14,13 @@ ...@@ -14,13 +14,13 @@
%br %br
= form_tag compare_project_commits_path(@project), :method => :get do = form_tag compare_project_commits_path(@project), method: :get do
.clearfix .clearfix
= text_field_tag :from, params[:from], :placeholder => "master", :class => "xlarge" = text_field_tag :from, params[:from], placeholder: "master", class: "xlarge"
= "..." = "..."
= text_field_tag :to, params[:to], :placeholder => "aa8b4ef", :class => "xlarge" = text_field_tag :to, params[:to], placeholder: "aa8b4ef", class: "xlarge"
.actions .actions
= submit_tag "Compare", :class => "btn btn-primary" = submit_tag "Compare", class: "btn btn-primary"
- unless @commits.empty? - unless @commits.empty?
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
- unless @diffs.empty? - unless @diffs.empty?
%h4 Diff %h4 Diff
= render "commits/diffs", :diffs => @diffs = render "commits/diffs", diffs: @diffs
:javascript :javascript
$(function() { $(function() {
......
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
%span.divider %span.divider
\/ \/
%li %li
%a{:href => "#"}= params[:path].split("/").join(" / ") %a{href: "#"}= params[:path].split("/").join(" / ")
%div{:id => dom_id(@project)} %div{id: dom_id(@project)}
#commits_list= render "commits" #commits_list= render "commits"
.clear .clear
.loading{ :style => "display:none;"} .loading{ style: "display:none;"}
- if @commits.count == @limit - if @commits.count == @limit
:javascript :javascript
......
:plain :plain
CommitsList.append(#{@commits.count}, "#{escape_javascript(render(:partial => 'commits/commits'))}"); CommitsList.append(#{@commits.count}, "#{escape_javascript(render(partial: 'commits/commits'))}");
= render "commits/commit_box" = render "commits/commit_box"
= render "commits/diffs", :diffs => @commit.diffs = render "commits/diffs", diffs: @commit.diffs
= render "notes/notes", :tid => @commit.id, :tt => "commit" = render "notes/notes", tid: @commit.id, tt: "commit"
= render "notes/per_line_form" = render "notes/per_line_form"
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
%span %span
You wont be able to pull/push project code unless you You wont be able to pull/push project code unless you
%strong %strong
= link_to new_key_path, :class => "vlink" do = link_to new_key_path, class: "vlink" do
add new key add new key
to your profile to your profile
- if @events.any? - if @events.any?
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
%h4.nothing_here_message Projects activity will be displayed here %h4.nothing_here_message Projects activity will be displayed here
.loading.hide .loading.hide
.side .side
= render "events/event_last_push", :event => @last_push = render "events/event_last_push", event: @last_push
.projects_box .projects_box
%h5 %h5
Projects Projects
...@@ -23,23 +23,23 @@ ...@@ -23,23 +23,23 @@
(#{@projects.total_count}) (#{@projects.total_count})
- if current_user.can_create_project? - if current_user.can_create_project?
%span.right %span.right
= link_to new_project_path, :class => "btn very_small info" do = link_to new_project_path, class: "btn very_small info" do
%i.icon-plus %i.icon-plus
New Project New Project
- @projects.each do |project| - @projects.each do |project|
= link_to project_path(project), :class => dom_class(project) do = link_to project_path(project), class: dom_class(project) do
%h4 %h4
%span.ico.project %span.ico.project
= truncate(project.name, :length => 25) = truncate(project.name, length: 25)
%span.right %span.right
&rarr; &rarr;
.bottom= paginate @projects, :theme => "gitlab" .bottom= paginate @projects, theme: "gitlab"
%hr %hr
%div %div
%span.rss-icon %span.rss-icon
= link_to dashboard_path(:atom, { :private_token => current_user.private_token }) do = link_to dashboard_path(:atom, { private_token: current_user.private_token }) do
= image_tag "rss_ui.png", :title => "feed" = image_tag "rss_ui.png", title: "feed"
%strong News Feed %strong News Feed
- else - else
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
= current_user.projects_limit = current_user.projects_limit
projects. Click on button below to add a new one projects. Click on button below to add a new one
.link_holder .link_holder
= link_to new_project_path, :class => "btn primary" do = link_to new_project_path, class: "btn primary" do
New Project » New Project »
- else - else
If you will be added to project - it will be displayed here If you will be added to project - it will be displayed here
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
%h5= @project.name %h5= @project.name
%ul.unstyled.issues_table %ul.unstyled.issues_table
- group[1].each do |issue| - group[1].each do |issue|
= render(:partial => 'issues/show', :locals => {:issue => issue}) = render(partial: 'issues/show', locals: {issue: issue})
%hr %hr
= paginate @issues, :theme => "gitlab" = paginate @issues, theme: "gitlab"
- else - else
%h3.nothing_here_message Nothing to show here %h3.nothing_here_message Nothing to show here
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
- @project = group[0] - @project = group[0]
%h5= @project.name %h5= @project.name
- group[1].each do |merge_request| - group[1].each do |merge_request|
= render(:partial => 'merge_requests/merge_request', :locals => {:merge_request => merge_request}) = render(partial: 'merge_requests/merge_request', locals: {merge_request: merge_request})
%hr %hr
= paginate @merge_requests, :theme => "gitlab" = paginate @merge_requests, theme: "gitlab"
- else - else
%h3.nothing_here_message Nothing to show here %h3.nothing_here_message Nothing to show here
%div %div
= form_for [@project, @key], :url => project_deploy_keys_path do |f| = form_for [@project, @key], url: project_deploy_keys_path do |f|
-if @key.errors.any? -if @key.errors.any?
.alert-message.block-message.error .alert-message.block-message.error
%ul %ul
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
.input= f.text_field :title .input= f.text_field :title
.clearfix .clearfix
= f.label :key = f.label :key
.input= f.text_area :key, :class => "xlarge" .input= f.text_area :key, class: "xlarge"
.actions .actions
= f.submit 'Save', :class => "primary btn" = f.submit 'Save', class: "primary btn"
= link_to "Cancel", project_deploy_keys_path(@project), :class => "btn" = link_to "Cancel", project_deploy_keys_path(@project), class: "btn"
%tr %tr
%td %td
%a{:href => project_deploy_key_path(key.project, key)} %a{href: project_deploy_key_path(key.project, key)}
%strong= key.title %strong= key.title
%td %td
%span.update-author %span.update-author
...@@ -8,5 +8,5 @@ ...@@ -8,5 +8,5 @@
= time_ago_in_words(key.created_at) = time_ago_in_words(key.created_at)
ago ago
%td %td
= link_to 'Remove', project_deploy_key_path(key.project, key), :confirm => 'Are you sure?', :method => :delete, :class => "danger btn delete-key small right" = link_to 'Remove', project_deploy_key_path(key.project, key), confirm: 'Are you sure?', method: :delete, class: "danger btn delete-key small right"
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
- if can? current_user, :admin_project, @project - if can? current_user, :admin_project, @project
.alert-message.block-message .alert-message.block-message
Deploy keys allow read-only access to repository. Deploy keys allow read-only access to repository.
= link_to new_project_deploy_key_path(@project), :class => "btn small", :title => "New Deploy Key" do = link_to new_project_deploy_key_path(@project), class: "btn small", title: "New Deploy Key" do
Add Deploy Key Add Deploy Key
- if @keys.any? - if @keys.any?
%table %table
- @keys.each do |key| - @keys.each do |key|
= render(:partial => 'show', :locals => {:key => key}) = render(partial: 'show', locals: {key: key})
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
%hr %hr
%pre= @key.key %pre= @key.key
.actions .actions
= link_to 'Remove', project_deploy_key_path(@key.project, @key), :confirm => 'Are you sure?', :method => :delete, :class => "danger btn delete-key" = link_to 'Remove', project_deploy_key_path(@key.project, @key), confirm: 'Are you sure?', method: :delete, class: "danger btn delete-key"
.clear .clear
= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put, :class => "login-box" }) do |f| = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: "login-box" }) do |f|
= image_tag "login-logo.png", :width => "304", :height => "66", :class => "login-logo", :alt => "Login Logo" = image_tag "login-logo.png", width: "304", height: "66", class: "login-logo", alt: "Login Logo"
%h3 Change your password %h3 Change your password
= devise_error_messages! = devise_error_messages!
= f.hidden_field :reset_password_token = f.hidden_field :reset_password_token
%div %div
= f.password_field :password, :class => "text top", :placeholder => "New password" = f.password_field :password, class: "text top", placeholder: "New password"
%div %div
= f.password_field :password_confirmation, :class => "text bottom", :placeholder => "Confirm new password" = f.password_field :password_confirmation, class: "text bottom", placeholder: "Confirm new password"
%div %div
= f.submit "Change my password", :class => "btn primary" = f.submit "Change my password", class: "btn primary"
.right= render :partial => "devise/shared/links" .right= render partial: "devise/shared/links"
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
%h3 Access Denied %h3 Access Denied
%hr %hr
%p Youre not allowed to access this page %p Youre not allowed to access this page
%p Read more about project permissions #{link_to "here", help_permissions_path, :class => "vlink"} %p Read more about project permissions #{link_to "here", help_permissions_path, class: "vlink"}
- commit = CommitDecorator.decorate(commit) - commit = CommitDecorator.decorate(commit)
%li.wll.commit %li.wll.commit
%p %p
= link_to commit.short_id(8), project_commit_path(project, :id => commit.id), :class => "commit_short_id" = link_to commit.short_id(8), project_commit_path(project, id: commit.id), class: "commit_short_id"
%strong.cdark= commit.author_name %strong.cdark= commit.author_name
&ndash; &ndash;
= image_tag gravatar_icon(commit.author_email), :class => "avatar", :width => 16 = image_tag gravatar_icon(commit.author_email), class: "avatar", width: 16
= gfm truncate(commit.title, :length => 50), project_commit_path(project, :id => commit.id) rescue "--broken encoding" = gfm truncate(commit.title, length: 50), project_commit_path(project, id: commit.id) rescue "--broken encoding"
- if event.allowed? - if event.allowed?
- if event.issue? - if event.issue?
.event_feed .event_feed
= render "events/event_issue", :event => event = render "events/event_issue", event: event
- elsif event.merge_request? - elsif event.merge_request?
.event_feed .event_feed
= render "events/event_merge_request", :event => event = render "events/event_merge_request", event: event
- elsif event.push? - elsif event.push?
.event_feed .event_feed
= render "events/event_push", :event => event = render "events/event_push", event: event
= image_tag gravatar_icon(event.author_email), :class => "avatar" = image_tag gravatar_icon(event.author_email), class: "avatar"
%strong #{event.author_name} %strong #{event.author_name}
%span.event_label{:class => event.action_name}= event.action_name %span.event_label{class: event.action_name}= event.action_name
issue issue
= link_to project_issue_path(event.project, event.issue) do = link_to project_issue_path(event.project, event.issue) do
%strong= truncate event.issue_title %strong= truncate event.issue_title
......
- if show_last_push_widget?(event) - if show_last_push_widget?(event)
.event_lp .event_lp
%div %div
= image_tag gravatar_icon(event.author_email), :class => "avatar" = image_tag gravatar_icon(event.author_email), class: "avatar"
%span Your pushed to %span Your pushed to
= event.ref_type = event.ref_type
= link_to project_commits_path(event.project, :ref => event.ref_name) do = link_to project_commits_path(event.project, ref: event.ref_name) do
%strong= truncate(event.ref_name, :length => 28) %strong= truncate(event.ref_name, length: 28)
at at
%strong= link_to event.project.name, event.project %strong= link_to event.project.name, event.project
= link_to new_mr_path_from_push_event(event), :title => "New Merge Request", :class => "btn very_small primary" do = link_to new_mr_path_from_push_event(event), title: "New Merge Request", class: "btn very_small primary" do
Create Merge Request Create Merge Request
- if event.action_name == "merged" - if event.action_name == "merged"
.event_icon= image_tag "event_mr_merged.png" .event_icon= image_tag "event_mr_merged.png"
= image_tag gravatar_icon(event.author_email), :class => "avatar" = image_tag gravatar_icon(event.author_email), class: "avatar"
%strong #{event.author_name} %strong #{event.author_name}
%span.event_label{:class => event.action_name}= event.action_name %span.event_label{class: event.action_name}= event.action_name
merge request merge request
= link_to project_merge_request_path(event.project, event.merge_request) do = link_to project_merge_request_path(event.project, event.merge_request) do
%strong= truncate event.merge_request_title %strong= truncate event.merge_request_title
......
%div %div
.event_icon= image_tag "event_push.png" .event_icon= image_tag "event_push.png"
= image_tag gravatar_icon(event.author_email), :class => "avatar" = image_tag gravatar_icon(event.author_email), class: "avatar"
%strong #{event.author_name} %strong #{event.author_name}
%span.event_label.pushed= event.push_action_name %span.event_label.pushed= event.push_action_name
= event.ref_type = event.ref_type
= link_to project_commits_path(event.project, :ref => event.ref_name) do = link_to project_commits_path(event.project, ref: event.ref_name) do
%strong= event.ref_name %strong= event.ref_name
at at
%strong= link_to event.project.name, event.project %strong= link_to event.project.name, event.project
...@@ -14,17 +14,17 @@ ...@@ -14,17 +14,17 @@
- if event.push_with_commits? - if event.push_with_commits?
- if event.commits_count > 1 - if event.commits_count > 1
= link_to compare_project_commits_path(event.project, :from => event.parent_commit.id, :to => event.last_commit.id) do = link_to compare_project_commits_path(event.project, from: event.parent_commit.id, to: event.last_commit.id) do
%strong #{event.parent_commit.id[0..7]}...#{event.last_commit.id[0..7]} %strong #{event.parent_commit.id[0..7]}...#{event.last_commit.id[0..7]}
- project = event.project - project = event.project
%ul.unstyled.event_commits %ul.unstyled.event_commits
- if event.commits_count > 3 - if event.commits_count > 3
- event.commits[0...2].each do |commit| - event.commits[0...2].each do |commit|
= render "events/commit", :commit => commit, :project => project = render "events/commit", commit: commit, project: project
%li %li
%br %br
\... and #{event.commits_count - 2} more commits \... and #{event.commits_count - 2} more commits
- else - else
- event.commits.each do |commit| - event.commits.each do |commit|
= render "events/commit", :commit => commit, :project => project = render "events/commit", commit: commit, project: project
...@@ -6,13 +6,13 @@ ...@@ -6,13 +6,13 @@
%ol %ol
%li %li
%a{:href => "#README"} README %a{href: "#README"} README
%li %li
%a{:href => "#projects"} Projects %a{href: "#projects"} Projects
%li %li
%a{:href => "#users"} Users %a{href: "#users"} Users
%li %li
%a{:href => "#issues"} Issues %a{href: "#issues"} Issues
.file_holder#README .file_holder#README
.file_title .file_title
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
Post receive hooks for binding events when someone push to repository. Post receive hooks for binding events when someone push to repository.
%br %br
Read more about web hooks Read more about web hooks
%strong #{link_to "here", help_web_hooks_path, :class => "vlink"} %strong #{link_to "here", help_web_hooks_path, class: "vlink"}
= form_for [@project, @hook], :as => :hook, :url => project_hooks_path(@project) do |f| = form_for [@project, @hook], as: :hook, url: project_hooks_path(@project) do |f|
-if @hook.errors.any? -if @hook.errors.any?
.alert-message.block-message.error .alert-message.block-message.error
- @hook.errors.full_messages.each do |msg| - @hook.errors.full_messages.each do |msg|
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
.clearfix .clearfix
= f.label :url, "URL:" = f.label :url, "URL:"
.input .input
= f.text_field :url, :class => "text_field xxlarge" = f.text_field :url, class: "text_field xxlarge"
&nbsp; &nbsp;
= f.submit "Add Web Hook", :class => "btn primary" = f.submit "Add Web Hook", class: "btn primary"
%hr %hr
-if @hooks.any? -if @hooks.any?
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
%td %td
= link_to project_hook_path(@project, hook) do = link_to project_hook_path(@project, hook) do
%strong= hook.url %strong= hook.url
= link_to 'Test Hook', test_project_hook_path(@project, hook), :class => "btn small right" = link_to 'Test Hook', test_project_hook_path(@project, hook), class: "btn small right"
%td POST %td POST
%td %td
= link_to 'Remove', project_hook_path(@project, hook), :confirm => 'Are you sure?', :method => :delete, :class => "danger btn small right" = link_to 'Remove', project_hook_path(@project, hook), confirm: 'Are you sure?', method: :delete, class: "danger btn small right"
%div.issue-form-holder %div.issue-form-holder
%h3= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.id}" %h3= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.id}"
= form_for [@project, @issue], :remote => request.xhr? do |f| = form_for [@project, @issue], remote: request.xhr? do |f|
-if @issue.errors.any? -if @issue.errors.any?
.alert-message.block-message.error .alert-message.block-message.error
%ul %ul
...@@ -12,18 +12,18 @@ ...@@ -12,18 +12,18 @@
= f.label :title do = f.label :title do
%strong= "Subject *" %strong= "Subject *"
.input .input
= f.text_field :title, :maxlength => 255, :class => "xxlarge" = f.text_field :title, maxlength: 255, class: "xxlarge"
.issue_middle_block .issue_middle_block
.issue_assignee .issue_assignee
= f.label :assignee_id do = f.label :assignee_id do
%i.icon-user %i.icon-user
Assign to Assign to
.input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select a user" }) .input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { include_blank: "Select a user" })
.issue_milestone .issue_milestone
= f.label :milestone_id do = f.label :milestone_id do
%i.icon-time %i.icon-time
Milestone Milestone
.input= f.select(:milestone_id, @project.milestones.active.all.collect {|p| [ p.title, p.id ] }, { :include_blank => "Select milestone" }) .input= f.select(:milestone_id, @project.milestones.active.all.collect {|p| [ p.title, p.id ] }, { include_blank: "Select milestone" })
.issue_description .issue_description
.clearfix .clearfix
...@@ -31,26 +31,26 @@ ...@@ -31,26 +31,26 @@
%i.icon-tag %i.icon-tag
Labels Labels
.input .input
= f.text_field :label_list, :maxlength => 2000, :class => "xxlarge" = f.text_field :label_list, maxlength: 2000, class: "xxlarge"
%p.hint Separate with comma. %p.hint Separate with comma.
.clearfix .clearfix
= f.label :description, "Details" = f.label :description, "Details"
.input .input
= f.text_area :description, :maxlength => 2000, :class => "xxlarge", :rows => 14 = f.text_area :description, maxlength: 2000, class: "xxlarge", rows: 14
%p.hint Markdown is enabled. %p.hint Markdown is enabled.
.actions .actions
- if @issue.new_record? - if @issue.new_record?
= f.submit 'Submit new issue', :class => "primary btn" = f.submit 'Submit new issue', class: "primary btn"
-else -else
= f.submit 'Save changes', :class => "primary btn" = f.submit 'Save changes', class: "primary btn"
- if request.xhr? - if request.xhr?
= link_to "Cancel", "#back", :onclick => "backToIssues();", :class => "btn" = link_to "Cancel", "#back", onclick: "backToIssues();", class: "btn"
- else - else
- if @issue.new_record? - if @issue.new_record?
= link_to "Cancel", project_issues_path(@project), :class => "btn" = link_to "Cancel", project_issues_path(@project), class: "btn"
- else - else
= link_to "Cancel", project_issue_path(@project, @issue), :class => "btn" = link_to "Cancel", project_issue_path(@project, @issue), class: "btn"
%ul.nav.nav-tabs %ul.nav.nav-tabs
%li{:class => "#{'active' if current_page?(project_issues_path(@project))}"} %li{class: "#{'active' if current_page?(project_issues_path(@project))}"}
= link_to project_issues_path(@project), :class => "tab" do = link_to project_issues_path(@project), class: "tab" do
Browse Issues Browse Issues
%li{:class => "#{'active' if current_page?(project_milestones_path(@project))}"} %li{class: "#{'active' if current_page?(project_milestones_path(@project))}"}
= link_to project_milestones_path(@project), :class => "tab" do = link_to project_milestones_path(@project), class: "tab" do
Milestones Milestones
%li.right %li.right
%span.rss-icon %span.rss-icon
= link_to project_issues_path(@project, :atom, { :private_token => current_user.private_token }) do = link_to project_issues_path(@project, :atom, { private_token: current_user.private_token }) do
= image_tag "rss_ui.png", :title => "feed" = image_tag "rss_ui.png", title: "feed"
- @issues.each do |issue| - @issues.each do |issue|
= render(:partial => 'issues/show', :locals => {:issue => issue}) = render(partial: 'issues/show', locals: {issue: issue})
- if @issues.present? - if @issues.present?
%li.bottom %li.bottom
.row .row
.span7= paginate @issues, :remote => true, :theme => "gitlab" .span7= paginate @issues, remote: true, theme: "gitlab"
.span3.right .span3.right
%span.cgray.right %span.cgray.right
%span.issue_counter #{@issues.total_count} %span.issue_counter #{@issues.total_count}
......
%li.wll{ :id => dom_id(issue), :class => issue_css_classes(issue), :url => project_issue_path(issue.project, issue) } %li.wll{ id: dom_id(issue), class: issue_css_classes(issue), url: project_issue_path(issue.project, issue) }
- if controller.controller_name == 'issues' - if controller.controller_name == 'issues'
.issue_check .issue_check
= check_box_tag dom_id(issue,"selected"), nil, false, 'data-id' => issue.id, :class => "selected_issue", :disabled => !can?(current_user, :modify_issue, issue) = check_box_tag dom_id(issue,"selected"), nil, false, 'data-id' => issue.id, class: "selected_issue", disabled: !can?(current_user, :modify_issue, issue)
.right .right
- issue.labels.each do |label| - issue.labels.each do |label|
%span.label.label-issue.grouped %span.label.label-issue.grouped
...@@ -13,19 +13,19 @@ ...@@ -13,19 +13,19 @@
= issue.notes.count = issue.notes.count
- if can? current_user, :modify_issue, issue - if can? current_user, :modify_issue, issue
- if issue.closed - if issue.closed
= link_to 'Reopen', project_issue_path(issue.project, issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "btn small grouped reopen_issue", :remote => true = link_to 'Reopen', project_issue_path(issue.project, issue, issue: {closed: false }, status_only: true), method: :put, class: "btn small grouped reopen_issue", remote: true
- else - else
= link_to 'Resolve', project_issue_path(issue.project, issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "success btn small grouped close_issue", :remote => true = link_to 'Resolve', project_issue_path(issue.project, issue, issue: {closed: true }, status_only: true), method: :put, class: "success btn small grouped close_issue", remote: true
= link_to edit_project_issue_path(issue.project, issue), :class => "btn small edit-issue-link", :remote => true do = link_to edit_project_issue_path(issue.project, issue), class: "btn small edit-issue-link", remote: true do
%i.icon-edit %i.icon-edit
Edit Edit
- if issue.assignee - if issue.assignee
= image_tag gravatar_icon(issue.assignee_email), :class => "avatar" = image_tag gravatar_icon(issue.assignee_email), class: "avatar"
- else - else
= image_tag "no_avatar.png", :class => "avatar" = image_tag "no_avatar.png", class: "avatar"
%p= link_to_gfm truncate(issue.title, :length => 100), project_issue_path(issue.project, issue), :class => "row_title" %p= link_to_gfm truncate(issue.title, length: 100), project_issue_path(issue.project, issue), class: "row_title"
%span.update-author %span.update-author
%small.cdark= "##{issue.id}" %small.cdark= "##{issue.id}"
......
- if @issue.valid? - if @issue.valid?
:plain :plain
switchFromNewIssue(); switchFromNewIssue();
$("#issues-table").prepend("#{escape_javascript(render(:partial => 'show', :locals => {:issue => @issue}))}"); $("#issues-table").prepend("#{escape_javascript(render(partial: 'show', locals: {issue: @issue}))}");
$.ajax({type: "GET", url: location.href, dataType: "script"}); $.ajax({type: "GET", url: location.href, dataType: "script"});
- else - else
:plain :plain
......
...@@ -6,51 +6,51 @@ ...@@ -6,51 +6,51 @@
.right .right
.span5 .span5
- if can? current_user, :write_issue, @project - if can? current_user, :write_issue, @project
= link_to new_project_issue_path(@project), :class => "right btn small", :title => "New Issue", :remote => true do = link_to new_project_issue_path(@project), class: "right btn small", title: "New Issue", remote: true do
New Issue New Issue
= form_tag search_project_issues_path(@project), :method => :get, :remote => true, :id => "issue_search_form", :class => :right do = form_tag search_project_issues_path(@project), method: :get, remote: true, id: "issue_search_form", class: :right do
= hidden_field_tag :project_id, @project.id, { :id => 'project_id' } = hidden_field_tag :project_id, @project.id, { id: 'project_id' }
= hidden_field_tag :status, params[:f] = hidden_field_tag :status, params[:f]
= search_field_tag :issue_search, nil, { :placeholder => 'Search', :class => 'issue_search span3 right neib' } = search_field_tag :issue_search, nil, { placeholder: 'Search', class: 'issue_search span3 right neib' }
.clearfix .clearfix
%div#issues-table-holder.ui-box %div#issues-table-holder.ui-box
.title .title
= check_box_tag "check_all_issues", nil, false, :class => "check_all_issues left" = check_box_tag "check_all_issues", nil, false, class: "check_all_issues left"
.issues_bulk_update.hide .issues_bulk_update.hide
= form_tag bulk_update_project_issues_path(@project), :method => :post do = form_tag bulk_update_project_issues_path(@project), method: :post do
%span.update_issues_text Update selected issues with &nbsp; %span.update_issues_text Update selected issues with &nbsp;
.left .left
= select_tag('update[status]', options_for_select(['open', 'closed']), :prompt => "Status") = select_tag('update[status]', options_for_select(['open', 'closed']), prompt: "Status")
= select_tag('update[assignee_id]', options_from_collection_for_select(@project.users.all, "id", "name", params[:assignee_id]), :prompt => "Assignee") = select_tag('update[assignee_id]', options_from_collection_for_select(@project.users.all, "id", "name", params[:assignee_id]), prompt: "Assignee")
= select_tag('update[milestone_id]', options_from_collection_for_select(@project.milestones.order("id desc").all, "id", "title", params[:milestone_id]), :prompt => "Milestone") = select_tag('update[milestone_id]', options_from_collection_for_select(@project.milestones.order("id desc").all, "id", "title", params[:milestone_id]), prompt: "Milestone")
= hidden_field_tag 'update[issues_ids]', [] = hidden_field_tag 'update[issues_ids]', []
= hidden_field_tag :f, params[:f] = hidden_field_tag :f, params[:f]
= button_tag "Save", :class => "btn update_selected_issues" = button_tag "Save", class: "btn update_selected_issues"
.issues_filters .issues_filters
.left .left
%ul.nav.nav-pills.left %ul.nav.nav-pills.left
%li{:class => ("active" if (params[:f] == issues_filter[:open] || !params[:f]))} %li{class: ("active" if (params[:f] == issues_filter[:open] || !params[:f]))}
= link_to project_issues_path(@project, :f => issues_filter[:open], :milestone_id => params[:milestone_id]) do = link_to project_issues_path(@project, f: issues_filter[:open], milestone_id: params[:milestone_id]) do
Open Open
%li{:class => ("active" if params[:f] == issues_filter[:closed])} %li{class: ("active" if params[:f] == issues_filter[:closed])}
= link_to project_issues_path(@project, :f => issues_filter[:closed], :milestone_id => params[:milestone_id]) do = link_to project_issues_path(@project, f: issues_filter[:closed], milestone_id: params[:milestone_id]) do
Closed Closed
%li{:class => ("active" if params[:f] == issues_filter[:to_me])} %li{class: ("active" if params[:f] == issues_filter[:to_me])}
= link_to project_issues_path(@project, :f => issues_filter[:to_me], :milestone_id => params[:milestone_id]) do = link_to project_issues_path(@project, f: issues_filter[:to_me], milestone_id: params[:milestone_id]) do
To Me To Me
%li{:class => ("active" if params[:f] == issues_filter[:all])} %li{class: ("active" if params[:f] == issues_filter[:all])}
= link_to project_issues_path(@project, :f => issues_filter[:all], :milestone_id => params[:milestone_id]) do = link_to project_issues_path(@project, f: issues_filter[:all], milestone_id: params[:milestone_id]) do
All All
.right .right
= form_tag project_issues_path(@project), :method => :get, :class => :right do = form_tag project_issues_path(@project), method: :get, class: :right do
= select_tag(:label_name, options_for_select(issue_tags, params[:label_name]), :prompt => "Labels") = select_tag(:label_name, options_for_select(issue_tags, params[:label_name]), prompt: "Labels")
= select_tag(:assignee_id, options_from_collection_for_select(@project.users.all, "id", "name", params[:assignee_id]), :prompt => "Assignee") = select_tag(:assignee_id, options_from_collection_for_select(@project.users.all, "id", "name", params[:assignee_id]), prompt: "Assignee")
= select_tag(:milestone_id, options_from_collection_for_select(@project.milestones.order("id desc").all, "id", "title", params[:milestone_id]), :prompt => "Milestone") = select_tag(:milestone_id, options_from_collection_for_select(@project.milestones.order("id desc").all, "id", "title", params[:milestone_id]), prompt: "Milestone")
= hidden_field_tag :f, params[:f] = hidden_field_tag :f, params[:f]
.clearfix .clearfix
......
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
%span.right %span.right
- if can?(current_user, :admin_project, @project) || @issue.author == current_user - if can?(current_user, :admin_project, @project) || @issue.author == current_user
- if @issue.closed - if @issue.closed
= link_to 'Reopen', project_issue_path(@project, @issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "btn small" = link_to 'Reopen', project_issue_path(@project, @issue, issue: {closed: false }, status_only: true), method: :put, class: "btn small"
- else - else
= link_to 'Close', project_issue_path(@project, @issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "btn small", :title => "Close Issue" = link_to 'Close', project_issue_path(@project, @issue, issue: {closed: true }, status_only: true), method: :put, class: "btn small", title: "Close Issue"
- if can?(current_user, :admin_project, @project) || @issue.author == current_user - if can?(current_user, :admin_project, @project) || @issue.author == current_user
= link_to edit_project_issue_path(@project, @issue), :class => "btn small" do = link_to edit_project_issue_path(@project, @issue), class: "btn small" do
%i.icon-edit %i.icon-edit
Edit Edit
...@@ -35,18 +35,18 @@ ...@@ -35,18 +35,18 @@
.middle_box_content .middle_box_content
%cite.cgray Created by %cite.cgray Created by
= image_tag gravatar_icon(@issue.author_email), :width => 16, :class => "lil_av" = image_tag gravatar_icon(@issue.author_email), width: 16, class: "lil_av"
%strong.author= link_to_issue_author(@issue) %strong.author= link_to_issue_author(@issue)
- if @issue.assignee - if @issue.assignee
%cite.cgray and currently assigned to %cite.cgray and currently assigned to
= image_tag gravatar_icon(@issue.assignee_email), :width => 16, :class => "lil_av" = image_tag gravatar_icon(@issue.assignee_email), width: 16, class: "lil_av"
%strong.author= link_to_issue_assignee(@issue) %strong.author= link_to_issue_assignee(@issue)
- if @issue.milestone - if @issue.milestone
- milestone = @issue.milestone - milestone = @issue.milestone
%cite.cgray and attached to milestone %cite.cgray and attached to milestone
%strong= link_to_gfm truncate(milestone.title, :length => 20), project_milestone_path(milestone.project, milestone) %strong= link_to_gfm truncate(milestone.title, length: 20), project_milestone_path(milestone.project, milestone)
.right .right
- @issue.labels.each do |label| - @issue.labels.each do |label|
...@@ -61,4 +61,4 @@ ...@@ -61,4 +61,4 @@
= markdown @issue.description = markdown @issue.description
.issue_notes#notes= render "notes/notes", :tid => @issue.id, :tt => "issue" .issue_notes#notes= render "notes/notes", tid: @issue.id, tt: "issue"
...@@ -6,4 +6,4 @@ ...@@ -6,4 +6,4 @@
-# per_page: number of items to fetch per page -# per_page: number of items to fetch per page
-# remote: data-remote -# remote: data-remote
%span.first %span.first
= link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote = link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, remote: remote
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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