Skip to content
Snippets Groups Projects
Commit 67ccc8b5 authored by Andrey Kumanyaev's avatar Andrey Kumanyaev
Browse files

Replace old hashes with new 1.9 ruby hashes (rebase)

parent 493b5ff0
No related branches found
No related tags found
1 merge request!3275Code cleanup: Replace old hashes and remove trailing spaces
Showing
with 69 additions and 70 deletions
<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
Loading
Loading
@@ -41,7 +41,7 @@ class ProjectIssues < Spinach::FeatureSteps
end
 
And 'I submit new issue "500 error on profile"' do
fill_in "issue_title", :with => "500 error on profile"
fill_in "issue_title", with: "500 error on profile"
click_button "Submit new issue"
end
 
Loading
Loading
@@ -78,16 +78,16 @@ class ProjectIssues < Spinach::FeatureSteps
 
Given 'project "Shop" has milestone "v2.2"' do
project = Project.find_by_name("Shop")
milestone = create(:milestone, :title => "v2.2", :project => project)
milestone = create(:milestone, title: "v2.2", project: project)
 
3.times { create(:issue, :project => project, :milestone => milestone) }
3.times { create(:issue, project: project, milestone: milestone) }
end
 
And 'project "Shop" has milestone "v3.0"' do
project = Project.find_by_name("Shop")
milestone = create(:milestone, :title => "v3.0", :project => project)
milestone = create(:milestone, title: "v3.0", project: project)
 
3.times { create(:issue, :project => project, :milestone => milestone) }
3.times { create(:issue, project: project, milestone: milestone) }
end
 
When 'I select milestone "v3.0"' do
Loading
Loading
@@ -115,16 +115,16 @@ class ProjectIssues < Spinach::FeatureSteps
And 'project "Shop" have "Release 0.4" open issue' do
project = Project.find_by_name("Shop")
create(:issue,
:title => "Release 0.4",
:project => project,
:author => project.users.first)
title: "Release 0.4",
project: project,
author: project.users.first)
end
 
And 'project "Shop" have "Release 0.3" closed issue' do
project = Project.find_by_name("Shop")
create(:closed_issue,
:title => "Release 0.3",
:project => project,
:author => project.users.first)
title: "Release 0.3",
project: project,
author: project.users.first)
end
end
Loading
Loading
@@ -56,9 +56,9 @@ class ProjectMergeRequests < Spinach::FeatureSteps
end
 
And 'I submit new merge request "Wiki Feature"' do
fill_in "merge_request_title", :with => "Wiki Feature"
select "master", :from => "merge_request_source_branch"
select "stable", :from => "merge_request_target_branch"
fill_in "merge_request_title", with: "Wiki Feature"
select "master", from: "merge_request_source_branch"
select "stable", from: "merge_request_target_branch"
click_button "Submit merge request"
end
 
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