Skip to content
Snippets Groups Projects
Commit af5d0e9e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Merge pull request #3275 from Undev/feature/code_cleanup_remove_old_hashes

Code cleanup: Replace old hashes and remove trailing spaces
parents dc41ffa3 a50d96a8
No related branches found
No related tags found
No related merge requests found
Showing
with 59 additions and 60 deletions
Loading
Loading
@@ -7,7 +7,7 @@ class IssuesBulkUpdateContext < BaseContext
assignee_id = update_data[:assignee_id]
status = update_data[:status]
 
opts = {}
opts = {}
opts[:milestone_id] = milestone_id if milestone_id.present?
opts[:assignee_id] = assignee_id if assignee_id.present?
opts[:closed] = (status == "closed") if status.present?
Loading
Loading
@@ -15,7 +15,7 @@ class IssuesBulkUpdateContext < BaseContext
issues = Issue.where(id: issues_ids).all
issues = issues.select { |issue| can?(current_user, :modify_issue, issue) }
issues.each { |issue| issue.update_attributes(opts) }
{
{
count: issues.count,
success: !issues.count.zero?
}
Loading
Loading
Loading
Loading
@@ -72,9 +72,9 @@ class Milestone < ActiveRecord::Base
if due_date.past?
"expired at #{due_date.stamp("Aug 21, 2011")}"
else
"expires at #{due_date.stamp("Aug 21, 2011")}"
"expires at #{due_date.stamp("Aug 21, 2011")}"
end
end
end
end
 
def can_be_closed?
Loading
Loading
<h2>Resend confirmation instructions</h2>
 
<%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
<%= devise_error_messages! %>
 
<div><%= f.label :email %><br />
Loading
Loading
@@ -9,4 +9,4 @@
<div><%= f.submit "Resend confirmation instructions" %></div>
<% end %>
 
<%= render :partial => "devise/shared/links" %>
<%= render partial: "devise/shared/links" %>
Loading
Loading
@@ -2,4 +2,4 @@
 
<p>You can confirm your account through the link below:</p>
 
<p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
<p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @resource.confirmation_token) %></p>
Loading
Loading
@@ -2,7 +2,7 @@
 
<p>Someone has requested a link to change your password, and you can do this through the link below.</p>
 
<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @resource.reset_password_token) %></p>
 
<p>If you didn't request this, please ignore this email.</p>
<p>Your password won't change until you access the link above and create a new one.</p>
Loading
Loading
@@ -4,4 +4,4 @@
 
<p>Click the link below to unlock your account:</p>
 
<p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
<p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @resource.unlock_token) %></p>
<h2>Edit <%= resource_name.to_s.humanize %></h2>
 
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
<%= devise_error_messages! %>
 
<div><%= f.label :email %><br />
Loading
Loading
@@ -18,11 +18,11 @@
<div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
<%= f.password_field :current_password %></div>
 
<div><%= f.submit "Update", :class => "input_button" %></div>
<div><%= f.submit "Update", class: "input_button" %></div>
<% end %>
 
<h3>Cancel my account</h3>
 
<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.</p>
<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), confirm: "Are you sure?", method: :delete %>.</p>
 
<%= link_to "Back", :back %>
<%- if controller_name != 'sessions' %>
<%= link_to "Sign in", new_session_path(resource_name), :class => "btn" %><br />
<%= link_to "Sign in", new_session_path(resource_name), class: "btn" %><br />
<% end -%>
 
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
Loading
Loading
@@ -7,7 +7,7 @@
<% end -%>
 
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
<%= link_to "Forgot your password?", new_password_path(resource_name), :class => "btn" %><br />
<%= link_to "Forgot your password?", new_password_path(resource_name), class: "btn" %><br />
<% end -%>
 
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
Loading
Loading
<h2>Resend unlock instructions</h2>
 
<%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
<%= devise_error_messages! %>
 
<div><%= f.label :email %><br />
Loading
Loading
@@ -9,4 +9,4 @@
<div><%= f.submit "Resend unlock instructions" %></div>
<% end %>
 
<%= render :partial => "devise/shared/links" %>
<%= render partial: "devise/shared/links" %>
Loading
Loading
@@ -4,7 +4,7 @@ require 'rails/all'
 
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
# Bundler.require(*Rails.groups(:assets => %w(development test)))
# Bundler.require(*Rails.groups(assets: %w(development test)))
# If you want your assets lazily compiled in production, use this line
Bundler.require(:default, :assets, Rails.env)
end
Loading
Loading
Loading
Loading
@@ -68,8 +68,8 @@ Gitlab::Application.configure do
config.action_mailer.delivery_method = :sendmail
# Defaults to:
# # config.action_mailer.sendmail_settings = {
# # :location => '/usr/sbin/sendmail',
# # :arguments => '-i -t'
# # location: '/usr/sbin/sendmail',
# # arguments: '-i -t'
# # }
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
Loading
Loading
Loading
Loading
@@ -94,7 +94,7 @@ Devise.setup do |config|
# config.extend_remember_period = false
 
# Options to be passed to the created cookie. For instance, you can set
# :secure => true in order to force SSL only cookies.
# secure: true in order to force SSL only cookies.
# config.cookie_options = {}
 
# ==> Configuration for :validatable
Loading
Loading
@@ -202,18 +202,18 @@ Devise.setup do |config|
# config.warden do |manager|
# manager.failure_app = AnotherApp
# manager.intercept_401 = false
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
# manager.default_strategies(scope: :user).unshift :some_external_strategy
# end
 
if Gitlab.config.ldap.enabled
config.omniauth :ldap,
:host => Gitlab.config.ldap['host'],
:base => Gitlab.config.ldap['base'],
:uid => Gitlab.config.ldap['uid'],
:port => Gitlab.config.ldap['port'],
:method => Gitlab.config.ldap['method'],
:bind_dn => Gitlab.config.ldap['bind_dn'],
:password => Gitlab.config.ldap['password']
host: Gitlab.config.ldap['host'],
base: Gitlab.config.ldap['base'],
uid: Gitlab.config.ldap['uid'],
port: Gitlab.config.ldap['port'],
method: Gitlab.config.ldap['method'],
bind_dn: Gitlab.config.ldap['bind_dn'],
password: Gitlab.config.ldap['password']
end
 
Gitlab.config.omniauth.providers.each do |provider|
Loading
Loading
Loading
Loading
@@ -179,8 +179,7 @@ Gitlab::Application.routes.draw do
resources :compare, only: [:index, :create]
resources :blame, only: [:show], constraints: {id: /.+/}
resources :graph, only: [:show], constraints: {id: /(?:[^.]|\.(?!json$))+/, format: /json/}
match "/compare/:from...:to" => "compare#show", as: "compare",
:via => [:get, :post], constraints: {from: /.+/, to: /.+/}
match "/compare/:from...:to" => "compare#show", as: "compare", via: [:get, :post], constraints: {from: /.+/, to: /.+/}
 
resources :wikis, only: [:show, :edit, :destroy, :create] do
collection do
Loading
Loading
Milestone.seed(:id, [
{ :id => 1, :project_id => 1, :title => 'v' + Faker::Address.zip_code },
{ :id => 2, :project_id => 1, :title => 'v' + Faker::Address.zip_code },
{ :id => 3, :project_id => 1, :title => 'v' + Faker::Address.zip_code },
{ :id => 4, :project_id => 2, :title => 'v' + Faker::Address.zip_code },
{ :id => 5, :project_id => 2, :title => 'v' + Faker::Address.zip_code },
{ id: 1, project_id: 1, title: 'v' + Faker::Address.zip_code },
{ id: 2, project_id: 1, title: 'v' + Faker::Address.zip_code },
{ id: 3, project_id: 1, title: 'v' + Faker::Address.zip_code },
{ id: 4, project_id: 2, title: 'v' + Faker::Address.zip_code },
{ id: 5, project_id: 2, title: 'v' + Faker::Address.zip_code },
 
{ :id => 6, :project_id => 2, :title => 'v' + Faker::Address.zip_code },
{ :id => 7, :project_id => 2, :title => 'v' + Faker::Address.zip_code },
{ :id => 8, :project_id => 3, :title => 'v' + Faker::Address.zip_code },
{ :id => 9, :project_id => 3, :title => 'v' + Faker::Address.zip_code },
{ :id => 11, :project_id => 3, :title => 'v' + Faker::Address.zip_code },
{ id: 6, project_id: 2, title: 'v' + Faker::Address.zip_code },
{ id: 7, project_id: 2, title: 'v' + Faker::Address.zip_code },
{ id: 8, project_id: 3, title: 'v' + Faker::Address.zip_code },
{ id: 9, project_id: 3, title: 'v' + Faker::Address.zip_code },
{ id: 11, project_id: 3, title: 'v' + Faker::Address.zip_code },
])
Loading
Loading
@@ -20,12 +20,12 @@ class AdminGroups < Spinach::FeatureSteps
end
 
And 'Create gitlab user "John"' do
create(:user, :name => "John")
create(:user, name: "John")
end
 
And 'submit form with new group info' do
fill_in 'group_name', :with => 'gitlab'
fill_in 'group_description', :with => 'Group description'
fill_in 'group_name', with: 'gitlab'
fill_in 'group_description', with: 'Group description'
click_button "Create group"
end
 
Loading
Loading
@@ -41,8 +41,8 @@ class AdminGroups < Spinach::FeatureSteps
When 'I select user "John" from user list as "Reporter"' do
user = User.find_by_name("John")
within "#new_team_member" do
select user.name, :from => "user_ids"
select "Reporter", :from => "project_access"
select user.name, from: "user_ids"
select "Reporter", from: "project_access"
end
click_button "Add user to projects in group"
end
Loading
Loading
Loading
Loading
@@ -39,8 +39,8 @@ class Groups < Spinach::FeatureSteps
And 'I select user "John" from list with role "Reporter"' do
user = User.find_by_name("John")
within "#new_team_member" do
select user.name, :from => "user_ids"
select "Reporter", :from => "project_access"
select user.name, from: "user_ids"
select "Reporter", from: "project_access"
end
click_button "Add"
end
Loading
Loading
@@ -85,7 +85,7 @@ class Groups < Spinach::FeatureSteps
end
 
And 'I change group name' do
fill_in 'group_name', :with => 'new-name'
fill_in 'group_name', with: 'new-name'
click_button "Save group"
end
 
Loading
Loading
Loading
Loading
@@ -9,9 +9,9 @@ class Profile < Spinach::FeatureSteps
end
 
Then 'I change my contact info' do
fill_in "user_skype", :with => "testskype"
fill_in "user_linkedin", :with => "testlinkedin"
fill_in "user_twitter", :with => "testtwitter"
fill_in "user_skype", with: "testskype"
fill_in "user_linkedin", with: "testlinkedin"
fill_in "user_twitter", with: "testtwitter"
click_button "Save"
@user.reload
end
Loading
Loading
@@ -24,8 +24,8 @@ class Profile < Spinach::FeatureSteps
 
Then 'I change my password' do
within '.update-password' do
fill_in "user_password", :with => "222333"
fill_in "user_password_confirmation", :with => "222333"
fill_in "user_password", with: "222333"
fill_in "user_password_confirmation", with: "222333"
click_button "Save"
end
end
Loading
Loading
Loading
Loading
@@ -12,8 +12,8 @@ class ProfileSshKeys < Spinach::FeatureSteps
end
 
And 'I submit new ssh key "Laptop"' do
fill_in "key_title", :with => "Laptop"
fill_in "key_key", :with => "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAzrEJUIR6Y03TCE9rIJ+GqTBvgb8t1jI9h5UBzCLuK4VawOmkLornPqLDrGbm6tcwM/wBrrLvVOqi2HwmkKEIecVO0a64A4rIYScVsXIniHRS6w5twyn1MD3sIbN+socBDcaldECQa2u1dI3tnNVcs8wi77fiRe7RSxePsJceGoheRQgC8AZ510UdIlO+9rjIHUdVN7LLyz512auAfYsgx1OfablkQ/XJcdEwDNgi9imI6nAXhmoKUm1IPLT2yKajTIC64AjLOnE0YyCh6+7RFMpiMyu1qiOCpdjYwTgBRiciNRZCH8xIedyCoAmiUgkUT40XYHwLuwiPJICpkAzp7Q== user@laptop"
fill_in "key_title", with: "Laptop"
fill_in "key_key", with: "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAzrEJUIR6Y03TCE9rIJ+GqTBvgb8t1jI9h5UBzCLuK4VawOmkLornPqLDrGbm6tcwM/wBrrLvVOqi2HwmkKEIecVO0a64A4rIYScVsXIniHRS6w5twyn1MD3sIbN+socBDcaldECQa2u1dI3tnNVcs8wi77fiRe7RSxePsJceGoheRQgC8AZ510UdIlO+9rjIHUdVN7LLyz512auAfYsgx1OfablkQ/XJcdEwDNgi9imI6nAXhmoKUm1IPLT2yKajTIC64AjLOnE0YyCh6+7RFMpiMyu1qiOCpdjYwTgBRiciNRZCH8xIedyCoAmiUgkUT40XYHwLuwiPJICpkAzp7Q== user@laptop"
click_button "Save"
end
 
Loading
Loading
@@ -43,6 +43,6 @@ class ProfileSshKeys < Spinach::FeatureSteps
end
 
And 'I have ssh key "ssh-rsa Work"' do
create(:key, :user => @user, :title => "ssh-rsa Work", :key => "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+L3TbFegm3k8QjejSwemk4HhlRh+DuN679Pc5ckqE/MPhVtE/+kZQDYCTB284GiT2aIoGzmZ8ee9TkaoejAsBwlA+Wz2Q3vhz65X6sMgalRwpdJx8kSEUYV8ZPV3MZvPo8KdNg993o4jL6G36GDW4BPIyO6FPZhfsawdf6liVD0Xo5kibIK7B9VoE178cdLQtLpS2YolRwf5yy6XR6hbbBGQR+6xrGOdP16eGZDb1CE2bMvvJijjloFqPscGktWOqW+nfh5txwFfBzlfARDTBsS8WZtg3Yoj1kn33kPsWRlgHfNutFRAIynDuDdQzQq8tTtVwm+Yi75RfcPHW8y3P Work")
create(:key, user: @user, title: "ssh-rsa Work", key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+L3TbFegm3k8QjejSwemk4HhlRh+DuN679Pc5ckqE/MPhVtE/+kZQDYCTB284GiT2aIoGzmZ8ee9TkaoejAsBwlA+Wz2Q3vhz65X6sMgalRwpdJx8kSEUYV8ZPV3MZvPo8KdNg993o4jL6G36GDW4BPIyO6FPZhfsawdf6liVD0Xo5kibIK7B9VoE178cdLQtLpS2YolRwf5yy6XR6hbbBGQR+6xrGOdP16eGZDb1CE2bMvvJijjloFqPscGktWOqW+nfh5txwFfBzlfARDTBsS8WZtg3Yoj1kn33kPsWRlgHfNutFRAIynDuDdQzQq8tTtVwm+Yi75RfcPHW8y3P Work")
end
end
Loading
Loading
@@ -30,6 +30,6 @@ class ProjectBrowseBranches < Spinach::FeatureSteps
 
And 'project "Shop" has protected branches' do
project = Project.find_by_name("Shop")
project.protected_branches.create(:name => "stable")
project.protected_branches.create(name: "stable")
end
end
Loading
Loading
@@ -17,9 +17,9 @@ class ProjectBrowseCommits < Spinach::FeatureSteps
Then 'I see commits atom feed' do
commit = @project.repository.commit
page.response_headers['Content-Type'].should have_content("application/atom+xml")
page.body.should have_selector("title", :text => "Recent commits to #{@project.name}")
page.body.should have_selector("author email", :text => commit.author_email)
page.body.should have_selector("entry summary", :text => commit.description)
page.body.should have_selector("title", text: "Recent commits to #{@project.name}")
page.body.should have_selector("author email", text: commit.author_email)
page.body.should have_selector("entry summary", text: commit.description)
end
 
Given 'I click on commit link' do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment