Commit 67ccc8b52aceebea9c0cb22b3277daf0b467c78e
1 parent
493b5ff0
Exists in
master
and in
4 other branches
Replace old hashes with new 1.9 ruby hashes (rebase)
Showing
38 changed files
with
130 additions
and
131 deletions
Show diff stats
app/views/devise/confirmations/new.html.erb
1 | <h2>Resend confirmation instructions</h2> | 1 | <h2>Resend confirmation instructions</h2> |
2 | 2 | ||
3 | -<%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %> | 3 | +<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> |
4 | <%= devise_error_messages! %> | 4 | <%= devise_error_messages! %> |
5 | 5 | ||
6 | <div><%= f.label :email %><br /> | 6 | <div><%= f.label :email %><br /> |
@@ -9,4 +9,4 @@ | @@ -9,4 +9,4 @@ | ||
9 | <div><%= f.submit "Resend confirmation instructions" %></div> | 9 | <div><%= f.submit "Resend confirmation instructions" %></div> |
10 | <% end %> | 10 | <% end %> |
11 | 11 | ||
12 | -<%= render :partial => "devise/shared/links" %> | 12 | +<%= render partial: "devise/shared/links" %> |
app/views/devise/mailer/confirmation_instructions.html.erb
@@ -2,4 +2,4 @@ | @@ -2,4 +2,4 @@ | ||
2 | 2 | ||
3 | <p>You can confirm your account through the link below:</p> | 3 | <p>You can confirm your account through the link below:</p> |
4 | 4 | ||
5 | -<p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p> | 5 | +<p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @resource.confirmation_token) %></p> |
app/views/devise/mailer/reset_password_instructions.html.erb
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | 2 | ||
3 | <p>Someone has requested a link to change your password, and you can do this through the link below.</p> | 3 | <p>Someone has requested a link to change your password, and you can do this through the link below.</p> |
4 | 4 | ||
5 | -<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p> | 5 | +<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @resource.reset_password_token) %></p> |
6 | 6 | ||
7 | <p>If you didn't request this, please ignore this email.</p> | 7 | <p>If you didn't request this, please ignore this email.</p> |
8 | <p>Your password won't change until you access the link above and create a new one.</p> | 8 | <p>Your password won't change until you access the link above and create a new one.</p> |
app/views/devise/mailer/unlock_instructions.html.erb
@@ -4,4 +4,4 @@ | @@ -4,4 +4,4 @@ | ||
4 | 4 | ||
5 | <p>Click the link below to unlock your account:</p> | 5 | <p>Click the link below to unlock your account:</p> |
6 | 6 | ||
7 | -<p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p> | 7 | +<p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @resource.unlock_token) %></p> |
app/views/devise/registrations/edit.html.erb
1 | <h2>Edit <%= resource_name.to_s.humanize %></h2> | 1 | <h2>Edit <%= resource_name.to_s.humanize %></h2> |
2 | 2 | ||
3 | -<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %> | 3 | +<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> |
4 | <%= devise_error_messages! %> | 4 | <%= devise_error_messages! %> |
5 | 5 | ||
6 | <div><%= f.label :email %><br /> | 6 | <div><%= f.label :email %><br /> |
@@ -18,11 +18,11 @@ | @@ -18,11 +18,11 @@ | ||
18 | <div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br /> | 18 | <div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br /> |
19 | <%= f.password_field :current_password %></div> | 19 | <%= f.password_field :current_password %></div> |
20 | 20 | ||
21 | -<div><%= f.submit "Update", :class => "input_button" %></div> | 21 | +<div><%= f.submit "Update", class: "input_button" %></div> |
22 | <% end %> | 22 | <% end %> |
23 | 23 | ||
24 | <h3>Cancel my account</h3> | 24 | <h3>Cancel my account</h3> |
25 | 25 | ||
26 | -<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.</p> | 26 | +<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), confirm: "Are you sure?", method: :delete %>.</p> |
27 | 27 | ||
28 | <%= link_to "Back", :back %> | 28 | <%= link_to "Back", :back %> |
app/views/devise/shared/_links.erb
1 | <%- if controller_name != 'sessions' %> | 1 | <%- if controller_name != 'sessions' %> |
2 | - <%= link_to "Sign in", new_session_path(resource_name), :class => "btn" %><br /> | 2 | + <%= link_to "Sign in", new_session_path(resource_name), class: "btn" %><br /> |
3 | <% end -%> | 3 | <% end -%> |
4 | 4 | ||
5 | <%- if devise_mapping.registerable? && controller_name != 'registrations' %> | 5 | <%- if devise_mapping.registerable? && controller_name != 'registrations' %> |
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | <% end -%> | 7 | <% end -%> |
8 | 8 | ||
9 | <%- if devise_mapping.recoverable? && controller_name != 'passwords' %> | 9 | <%- if devise_mapping.recoverable? && controller_name != 'passwords' %> |
10 | -<%= link_to "Forgot your password?", new_password_path(resource_name), :class => "btn" %><br /> | 10 | +<%= link_to "Forgot your password?", new_password_path(resource_name), class: "btn" %><br /> |
11 | <% end -%> | 11 | <% end -%> |
12 | 12 | ||
13 | <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %> | 13 | <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %> |
app/views/devise/unlocks/new.html.erb
1 | <h2>Resend unlock instructions</h2> | 1 | <h2>Resend unlock instructions</h2> |
2 | 2 | ||
3 | -<%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %> | 3 | +<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %> |
4 | <%= devise_error_messages! %> | 4 | <%= devise_error_messages! %> |
5 | 5 | ||
6 | <div><%= f.label :email %><br /> | 6 | <div><%= f.label :email %><br /> |
@@ -9,4 +9,4 @@ | @@ -9,4 +9,4 @@ | ||
9 | <div><%= f.submit "Resend unlock instructions" %></div> | 9 | <div><%= f.submit "Resend unlock instructions" %></div> |
10 | <% end %> | 10 | <% end %> |
11 | 11 | ||
12 | -<%= render :partial => "devise/shared/links" %> | 12 | +<%= render partial: "devise/shared/links" %> |
config/application.rb
@@ -4,7 +4,7 @@ require 'rails/all' | @@ -4,7 +4,7 @@ require 'rails/all' | ||
4 | 4 | ||
5 | if defined?(Bundler) | 5 | if defined?(Bundler) |
6 | # If you precompile assets before deploying to production, use this line | 6 | # If you precompile assets before deploying to production, use this line |
7 | - # Bundler.require(*Rails.groups(:assets => %w(development test))) | 7 | + # Bundler.require(*Rails.groups(assets: %w(development test))) |
8 | # If you want your assets lazily compiled in production, use this line | 8 | # If you want your assets lazily compiled in production, use this line |
9 | Bundler.require(:default, :assets, Rails.env) | 9 | Bundler.require(:default, :assets, Rails.env) |
10 | end | 10 | end |
config/environments/production.rb
@@ -68,8 +68,8 @@ Gitlab::Application.configure do | @@ -68,8 +68,8 @@ Gitlab::Application.configure do | ||
68 | config.action_mailer.delivery_method = :sendmail | 68 | config.action_mailer.delivery_method = :sendmail |
69 | # Defaults to: | 69 | # Defaults to: |
70 | # # config.action_mailer.sendmail_settings = { | 70 | # # config.action_mailer.sendmail_settings = { |
71 | - # # :location => '/usr/sbin/sendmail', | ||
72 | - # # :arguments => '-i -t' | 71 | + # # location: '/usr/sbin/sendmail', |
72 | + # # arguments: '-i -t' | ||
73 | # # } | 73 | # # } |
74 | config.action_mailer.perform_deliveries = true | 74 | config.action_mailer.perform_deliveries = true |
75 | config.action_mailer.raise_delivery_errors = true | 75 | config.action_mailer.raise_delivery_errors = true |
config/initializers/devise.rb
@@ -94,7 +94,7 @@ Devise.setup do |config| | @@ -94,7 +94,7 @@ Devise.setup do |config| | ||
94 | # config.extend_remember_period = false | 94 | # config.extend_remember_period = false |
95 | 95 | ||
96 | # Options to be passed to the created cookie. For instance, you can set | 96 | # Options to be passed to the created cookie. For instance, you can set |
97 | - # :secure => true in order to force SSL only cookies. | 97 | + # secure: true in order to force SSL only cookies. |
98 | # config.cookie_options = {} | 98 | # config.cookie_options = {} |
99 | 99 | ||
100 | # ==> Configuration for :validatable | 100 | # ==> Configuration for :validatable |
@@ -202,18 +202,18 @@ Devise.setup do |config| | @@ -202,18 +202,18 @@ Devise.setup do |config| | ||
202 | # config.warden do |manager| | 202 | # config.warden do |manager| |
203 | # manager.failure_app = AnotherApp | 203 | # manager.failure_app = AnotherApp |
204 | # manager.intercept_401 = false | 204 | # manager.intercept_401 = false |
205 | - # manager.default_strategies(:scope => :user).unshift :some_external_strategy | 205 | + # manager.default_strategies(scope: :user).unshift :some_external_strategy |
206 | # end | 206 | # end |
207 | 207 | ||
208 | if Gitlab.config.ldap.enabled | 208 | if Gitlab.config.ldap.enabled |
209 | config.omniauth :ldap, | 209 | config.omniauth :ldap, |
210 | - :host => Gitlab.config.ldap['host'], | ||
211 | - :base => Gitlab.config.ldap['base'], | ||
212 | - :uid => Gitlab.config.ldap['uid'], | ||
213 | - :port => Gitlab.config.ldap['port'], | ||
214 | - :method => Gitlab.config.ldap['method'], | ||
215 | - :bind_dn => Gitlab.config.ldap['bind_dn'], | ||
216 | - :password => Gitlab.config.ldap['password'] | 210 | + host: Gitlab.config.ldap['host'], |
211 | + base: Gitlab.config.ldap['base'], | ||
212 | + uid: Gitlab.config.ldap['uid'], | ||
213 | + port: Gitlab.config.ldap['port'], | ||
214 | + method: Gitlab.config.ldap['method'], | ||
215 | + bind_dn: Gitlab.config.ldap['bind_dn'], | ||
216 | + password: Gitlab.config.ldap['password'] | ||
217 | end | 217 | end |
218 | 218 | ||
219 | Gitlab.config.omniauth.providers.each do |provider| | 219 | Gitlab.config.omniauth.providers.each do |provider| |
config/routes.rb
@@ -179,8 +179,7 @@ Gitlab::Application.routes.draw do | @@ -179,8 +179,7 @@ Gitlab::Application.routes.draw do | ||
179 | resources :compare, only: [:index, :create] | 179 | resources :compare, only: [:index, :create] |
180 | resources :blame, only: [:show], constraints: {id: /.+/} | 180 | resources :blame, only: [:show], constraints: {id: /.+/} |
181 | resources :graph, only: [:show], constraints: {id: /(?:[^.]|\.(?!json$))+/, format: /json/} | 181 | resources :graph, only: [:show], constraints: {id: /(?:[^.]|\.(?!json$))+/, format: /json/} |
182 | - match "/compare/:from...:to" => "compare#show", as: "compare", | ||
183 | - :via => [:get, :post], constraints: {from: /.+/, to: /.+/} | 182 | + match "/compare/:from...:to" => "compare#show", as: "compare", via: [:get, :post], constraints: {from: /.+/, to: /.+/} |
184 | 183 | ||
185 | resources :wikis, only: [:show, :edit, :destroy, :create] do | 184 | resources :wikis, only: [:show, :edit, :destroy, :create] do |
186 | collection do | 185 | collection do |
db/fixtures/development/07_milestones.rb
1 | Milestone.seed(:id, [ | 1 | Milestone.seed(:id, [ |
2 | - { :id => 1, :project_id => 1, :title => 'v' + Faker::Address.zip_code }, | ||
3 | - { :id => 2, :project_id => 1, :title => 'v' + Faker::Address.zip_code }, | ||
4 | - { :id => 3, :project_id => 1, :title => 'v' + Faker::Address.zip_code }, | ||
5 | - { :id => 4, :project_id => 2, :title => 'v' + Faker::Address.zip_code }, | ||
6 | - { :id => 5, :project_id => 2, :title => 'v' + Faker::Address.zip_code }, | 2 | + { id: 1, project_id: 1, title: 'v' + Faker::Address.zip_code }, |
3 | + { id: 2, project_id: 1, title: 'v' + Faker::Address.zip_code }, | ||
4 | + { id: 3, project_id: 1, title: 'v' + Faker::Address.zip_code }, | ||
5 | + { id: 4, project_id: 2, title: 'v' + Faker::Address.zip_code }, | ||
6 | + { id: 5, project_id: 2, title: 'v' + Faker::Address.zip_code }, | ||
7 | 7 | ||
8 | - { :id => 6, :project_id => 2, :title => 'v' + Faker::Address.zip_code }, | ||
9 | - { :id => 7, :project_id => 2, :title => 'v' + Faker::Address.zip_code }, | ||
10 | - { :id => 8, :project_id => 3, :title => 'v' + Faker::Address.zip_code }, | ||
11 | - { :id => 9, :project_id => 3, :title => 'v' + Faker::Address.zip_code }, | ||
12 | - { :id => 11, :project_id => 3, :title => 'v' + Faker::Address.zip_code }, | 8 | + { id: 6, project_id: 2, title: 'v' + Faker::Address.zip_code }, |
9 | + { id: 7, project_id: 2, title: 'v' + Faker::Address.zip_code }, | ||
10 | + { id: 8, project_id: 3, title: 'v' + Faker::Address.zip_code }, | ||
11 | + { id: 9, project_id: 3, title: 'v' + Faker::Address.zip_code }, | ||
12 | + { id: 11, project_id: 3, title: 'v' + Faker::Address.zip_code }, | ||
13 | ]) | 13 | ]) |
features/steps/admin/admin_groups.rb
@@ -20,12 +20,12 @@ class AdminGroups < Spinach::FeatureSteps | @@ -20,12 +20,12 @@ class AdminGroups < Spinach::FeatureSteps | ||
20 | end | 20 | end |
21 | 21 | ||
22 | And 'Create gitlab user "John"' do | 22 | And 'Create gitlab user "John"' do |
23 | - create(:user, :name => "John") | 23 | + create(:user, name: "John") |
24 | end | 24 | end |
25 | 25 | ||
26 | And 'submit form with new group info' do | 26 | And 'submit form with new group info' do |
27 | - fill_in 'group_name', :with => 'gitlab' | ||
28 | - fill_in 'group_description', :with => 'Group description' | 27 | + fill_in 'group_name', with: 'gitlab' |
28 | + fill_in 'group_description', with: 'Group description' | ||
29 | click_button "Create group" | 29 | click_button "Create group" |
30 | end | 30 | end |
31 | 31 | ||
@@ -41,8 +41,8 @@ class AdminGroups < Spinach::FeatureSteps | @@ -41,8 +41,8 @@ class AdminGroups < Spinach::FeatureSteps | ||
41 | When 'I select user "John" from user list as "Reporter"' do | 41 | When 'I select user "John" from user list as "Reporter"' do |
42 | user = User.find_by_name("John") | 42 | user = User.find_by_name("John") |
43 | within "#new_team_member" do | 43 | within "#new_team_member" do |
44 | - select user.name, :from => "user_ids" | ||
45 | - select "Reporter", :from => "project_access" | 44 | + select user.name, from: "user_ids" |
45 | + select "Reporter", from: "project_access" | ||
46 | end | 46 | end |
47 | click_button "Add user to projects in group" | 47 | click_button "Add user to projects in group" |
48 | end | 48 | end |
features/steps/group/group.rb
@@ -39,8 +39,8 @@ class Groups < Spinach::FeatureSteps | @@ -39,8 +39,8 @@ class Groups < Spinach::FeatureSteps | ||
39 | And 'I select user "John" from list with role "Reporter"' do | 39 | And 'I select user "John" from list with role "Reporter"' do |
40 | user = User.find_by_name("John") | 40 | user = User.find_by_name("John") |
41 | within "#new_team_member" do | 41 | within "#new_team_member" do |
42 | - select user.name, :from => "user_ids" | ||
43 | - select "Reporter", :from => "project_access" | 42 | + select user.name, from: "user_ids" |
43 | + select "Reporter", from: "project_access" | ||
44 | end | 44 | end |
45 | click_button "Add" | 45 | click_button "Add" |
46 | end | 46 | end |
@@ -85,7 +85,7 @@ class Groups < Spinach::FeatureSteps | @@ -85,7 +85,7 @@ class Groups < Spinach::FeatureSteps | ||
85 | end | 85 | end |
86 | 86 | ||
87 | And 'I change group name' do | 87 | And 'I change group name' do |
88 | - fill_in 'group_name', :with => 'new-name' | 88 | + fill_in 'group_name', with: 'new-name' |
89 | click_button "Save group" | 89 | click_button "Save group" |
90 | end | 90 | end |
91 | 91 |
features/steps/profile/profile.rb
@@ -9,9 +9,9 @@ class Profile < Spinach::FeatureSteps | @@ -9,9 +9,9 @@ class Profile < Spinach::FeatureSteps | ||
9 | end | 9 | end |
10 | 10 | ||
11 | Then 'I change my contact info' do | 11 | Then 'I change my contact info' do |
12 | - fill_in "user_skype", :with => "testskype" | ||
13 | - fill_in "user_linkedin", :with => "testlinkedin" | ||
14 | - fill_in "user_twitter", :with => "testtwitter" | 12 | + fill_in "user_skype", with: "testskype" |
13 | + fill_in "user_linkedin", with: "testlinkedin" | ||
14 | + fill_in "user_twitter", with: "testtwitter" | ||
15 | click_button "Save" | 15 | click_button "Save" |
16 | @user.reload | 16 | @user.reload |
17 | end | 17 | end |
@@ -24,8 +24,8 @@ class Profile < Spinach::FeatureSteps | @@ -24,8 +24,8 @@ class Profile < Spinach::FeatureSteps | ||
24 | 24 | ||
25 | Then 'I change my password' do | 25 | Then 'I change my password' do |
26 | within '.update-password' do | 26 | within '.update-password' do |
27 | - fill_in "user_password", :with => "222333" | ||
28 | - fill_in "user_password_confirmation", :with => "222333" | 27 | + fill_in "user_password", with: "222333" |
28 | + fill_in "user_password_confirmation", with: "222333" | ||
29 | click_button "Save" | 29 | click_button "Save" |
30 | end | 30 | end |
31 | end | 31 | end |
features/steps/profile/profile_ssh_keys.rb
@@ -12,8 +12,8 @@ class ProfileSshKeys < Spinach::FeatureSteps | @@ -12,8 +12,8 @@ class ProfileSshKeys < Spinach::FeatureSteps | ||
12 | end | 12 | end |
13 | 13 | ||
14 | And 'I submit new ssh key "Laptop"' do | 14 | And 'I submit new ssh key "Laptop"' do |
15 | - fill_in "key_title", :with => "Laptop" | ||
16 | - fill_in "key_key", :with => "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAzrEJUIR6Y03TCE9rIJ+GqTBvgb8t1jI9h5UBzCLuK4VawOmkLornPqLDrGbm6tcwM/wBrrLvVOqi2HwmkKEIecVO0a64A4rIYScVsXIniHRS6w5twyn1MD3sIbN+socBDcaldECQa2u1dI3tnNVcs8wi77fiRe7RSxePsJceGoheRQgC8AZ510UdIlO+9rjIHUdVN7LLyz512auAfYsgx1OfablkQ/XJcdEwDNgi9imI6nAXhmoKUm1IPLT2yKajTIC64AjLOnE0YyCh6+7RFMpiMyu1qiOCpdjYwTgBRiciNRZCH8xIedyCoAmiUgkUT40XYHwLuwiPJICpkAzp7Q== user@laptop" | 15 | + fill_in "key_title", with: "Laptop" |
16 | + fill_in "key_key", with: "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAzrEJUIR6Y03TCE9rIJ+GqTBvgb8t1jI9h5UBzCLuK4VawOmkLornPqLDrGbm6tcwM/wBrrLvVOqi2HwmkKEIecVO0a64A4rIYScVsXIniHRS6w5twyn1MD3sIbN+socBDcaldECQa2u1dI3tnNVcs8wi77fiRe7RSxePsJceGoheRQgC8AZ510UdIlO+9rjIHUdVN7LLyz512auAfYsgx1OfablkQ/XJcdEwDNgi9imI6nAXhmoKUm1IPLT2yKajTIC64AjLOnE0YyCh6+7RFMpiMyu1qiOCpdjYwTgBRiciNRZCH8xIedyCoAmiUgkUT40XYHwLuwiPJICpkAzp7Q== user@laptop" | ||
17 | click_button "Save" | 17 | click_button "Save" |
18 | end | 18 | end |
19 | 19 | ||
@@ -43,6 +43,6 @@ class ProfileSshKeys < Spinach::FeatureSteps | @@ -43,6 +43,6 @@ class ProfileSshKeys < Spinach::FeatureSteps | ||
43 | end | 43 | end |
44 | 44 | ||
45 | And 'I have ssh key "ssh-rsa Work"' do | 45 | And 'I have ssh key "ssh-rsa Work"' do |
46 | - create(:key, :user => @user, :title => "ssh-rsa Work", :key => "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+L3TbFegm3k8QjejSwemk4HhlRh+DuN679Pc5ckqE/MPhVtE/+kZQDYCTB284GiT2aIoGzmZ8ee9TkaoejAsBwlA+Wz2Q3vhz65X6sMgalRwpdJx8kSEUYV8ZPV3MZvPo8KdNg993o4jL6G36GDW4BPIyO6FPZhfsawdf6liVD0Xo5kibIK7B9VoE178cdLQtLpS2YolRwf5yy6XR6hbbBGQR+6xrGOdP16eGZDb1CE2bMvvJijjloFqPscGktWOqW+nfh5txwFfBzlfARDTBsS8WZtg3Yoj1kn33kPsWRlgHfNutFRAIynDuDdQzQq8tTtVwm+Yi75RfcPHW8y3P Work") | 46 | + create(:key, user: @user, title: "ssh-rsa Work", key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+L3TbFegm3k8QjejSwemk4HhlRh+DuN679Pc5ckqE/MPhVtE/+kZQDYCTB284GiT2aIoGzmZ8ee9TkaoejAsBwlA+Wz2Q3vhz65X6sMgalRwpdJx8kSEUYV8ZPV3MZvPo8KdNg993o4jL6G36GDW4BPIyO6FPZhfsawdf6liVD0Xo5kibIK7B9VoE178cdLQtLpS2YolRwf5yy6XR6hbbBGQR+6xrGOdP16eGZDb1CE2bMvvJijjloFqPscGktWOqW+nfh5txwFfBzlfARDTBsS8WZtg3Yoj1kn33kPsWRlgHfNutFRAIynDuDdQzQq8tTtVwm+Yi75RfcPHW8y3P Work") |
47 | end | 47 | end |
48 | end | 48 | end |
features/steps/project/project_browse_branches.rb
@@ -30,6 +30,6 @@ class ProjectBrowseBranches < Spinach::FeatureSteps | @@ -30,6 +30,6 @@ class ProjectBrowseBranches < Spinach::FeatureSteps | ||
30 | 30 | ||
31 | And 'project "Shop" has protected branches' do | 31 | And 'project "Shop" has protected branches' do |
32 | project = Project.find_by_name("Shop") | 32 | project = Project.find_by_name("Shop") |
33 | - project.protected_branches.create(:name => "stable") | 33 | + project.protected_branches.create(name: "stable") |
34 | end | 34 | end |
35 | end | 35 | end |
features/steps/project/project_browse_commits.rb
@@ -17,9 +17,9 @@ class ProjectBrowseCommits < Spinach::FeatureSteps | @@ -17,9 +17,9 @@ class ProjectBrowseCommits < Spinach::FeatureSteps | ||
17 | Then 'I see commits atom feed' do | 17 | Then 'I see commits atom feed' do |
18 | commit = @project.repository.commit | 18 | commit = @project.repository.commit |
19 | page.response_headers['Content-Type'].should have_content("application/atom+xml") | 19 | page.response_headers['Content-Type'].should have_content("application/atom+xml") |
20 | - page.body.should have_selector("title", :text => "Recent commits to #{@project.name}") | ||
21 | - page.body.should have_selector("author email", :text => commit.author_email) | ||
22 | - page.body.should have_selector("entry summary", :text => commit.description) | 20 | + page.body.should have_selector("title", text: "Recent commits to #{@project.name}") |
21 | + page.body.should have_selector("author email", text: commit.author_email) | ||
22 | + page.body.should have_selector("entry summary", text: commit.description) | ||
23 | end | 23 | end |
24 | 24 | ||
25 | Given 'I click on commit link' do | 25 | Given 'I click on commit link' do |
features/steps/project/project_issues.rb
@@ -41,7 +41,7 @@ class ProjectIssues < Spinach::FeatureSteps | @@ -41,7 +41,7 @@ class ProjectIssues < Spinach::FeatureSteps | ||
41 | end | 41 | end |
42 | 42 | ||
43 | And 'I submit new issue "500 error on profile"' do | 43 | And 'I submit new issue "500 error on profile"' do |
44 | - fill_in "issue_title", :with => "500 error on profile" | 44 | + fill_in "issue_title", with: "500 error on profile" |
45 | click_button "Submit new issue" | 45 | click_button "Submit new issue" |
46 | end | 46 | end |
47 | 47 | ||
@@ -78,16 +78,16 @@ class ProjectIssues < Spinach::FeatureSteps | @@ -78,16 +78,16 @@ class ProjectIssues < Spinach::FeatureSteps | ||
78 | 78 | ||
79 | Given 'project "Shop" has milestone "v2.2"' do | 79 | Given 'project "Shop" has milestone "v2.2"' do |
80 | project = Project.find_by_name("Shop") | 80 | project = Project.find_by_name("Shop") |
81 | - milestone = create(:milestone, :title => "v2.2", :project => project) | 81 | + milestone = create(:milestone, title: "v2.2", project: project) |
82 | 82 | ||
83 | - 3.times { create(:issue, :project => project, :milestone => milestone) } | 83 | + 3.times { create(:issue, project: project, milestone: milestone) } |
84 | end | 84 | end |
85 | 85 | ||
86 | And 'project "Shop" has milestone "v3.0"' do | 86 | And 'project "Shop" has milestone "v3.0"' do |
87 | project = Project.find_by_name("Shop") | 87 | project = Project.find_by_name("Shop") |
88 | - milestone = create(:milestone, :title => "v3.0", :project => project) | 88 | + milestone = create(:milestone, title: "v3.0", project: project) |
89 | 89 | ||
90 | - 3.times { create(:issue, :project => project, :milestone => milestone) } | 90 | + 3.times { create(:issue, project: project, milestone: milestone) } |
91 | end | 91 | end |
92 | 92 | ||
93 | When 'I select milestone "v3.0"' do | 93 | When 'I select milestone "v3.0"' do |
@@ -115,16 +115,16 @@ class ProjectIssues < Spinach::FeatureSteps | @@ -115,16 +115,16 @@ class ProjectIssues < Spinach::FeatureSteps | ||
115 | And 'project "Shop" have "Release 0.4" open issue' do | 115 | And 'project "Shop" have "Release 0.4" open issue' do |
116 | project = Project.find_by_name("Shop") | 116 | project = Project.find_by_name("Shop") |
117 | create(:issue, | 117 | create(:issue, |
118 | - :title => "Release 0.4", | ||
119 | - :project => project, | ||
120 | - :author => project.users.first) | 118 | + title: "Release 0.4", |
119 | + project: project, | ||
120 | + author: project.users.first) | ||
121 | end | 121 | end |
122 | 122 | ||
123 | And 'project "Shop" have "Release 0.3" closed issue' do | 123 | And 'project "Shop" have "Release 0.3" closed issue' do |
124 | project = Project.find_by_name("Shop") | 124 | project = Project.find_by_name("Shop") |
125 | create(:closed_issue, | 125 | create(:closed_issue, |
126 | - :title => "Release 0.3", | ||
127 | - :project => project, | ||
128 | - :author => project.users.first) | 126 | + title: "Release 0.3", |
127 | + project: project, | ||
128 | + author: project.users.first) | ||
129 | end | 129 | end |
130 | end | 130 | end |
features/steps/project/project_merge_requests.rb
@@ -56,9 +56,9 @@ class ProjectMergeRequests < Spinach::FeatureSteps | @@ -56,9 +56,9 @@ class ProjectMergeRequests < Spinach::FeatureSteps | ||
56 | end | 56 | end |
57 | 57 | ||
58 | And 'I submit new merge request "Wiki Feature"' do | 58 | And 'I submit new merge request "Wiki Feature"' do |
59 | - fill_in "merge_request_title", :with => "Wiki Feature" | ||
60 | - select "master", :from => "merge_request_source_branch" | ||
61 | - select "stable", :from => "merge_request_target_branch" | 59 | + fill_in "merge_request_title", with: "Wiki Feature" |
60 | + select "master", from: "merge_request_source_branch" | ||
61 | + select "stable", from: "merge_request_target_branch" | ||
62 | click_button "Submit merge request" | 62 | click_button "Submit merge request" |
63 | end | 63 | end |
64 | 64 |
features/steps/project/project_milestones.rb
@@ -19,7 +19,7 @@ class ProjectMilestones < Spinach::FeatureSteps | @@ -19,7 +19,7 @@ class ProjectMilestones < Spinach::FeatureSteps | ||
19 | end | 19 | end |
20 | 20 | ||
21 | And 'I submit new milestone "v2.3"' do | 21 | And 'I submit new milestone "v2.3"' do |
22 | - fill_in "milestone_title", :with => "v2.3" | 22 | + fill_in "milestone_title", with: "v2.3" |
23 | click_button "Create milestone" | 23 | click_button "Create milestone" |
24 | end | 24 | end |
25 | 25 | ||
@@ -32,9 +32,9 @@ class ProjectMilestones < Spinach::FeatureSteps | @@ -32,9 +32,9 @@ class ProjectMilestones < Spinach::FeatureSteps | ||
32 | 32 | ||
33 | And 'project "Shop" has milestone "v2.2"' do | 33 | And 'project "Shop" has milestone "v2.2"' do |
34 | project = Project.find_by_name("Shop") | 34 | project = Project.find_by_name("Shop") |
35 | - milestone = create(:milestone, :title => "v2.2", :project => project) | 35 | + milestone = create(:milestone, title: "v2.2", project: project) |
36 | 36 | ||
37 | - 3.times { create(:issue, :project => project, :milestone => milestone) } | 37 | + 3.times { create(:issue, project: project, milestone: milestone) } |
38 | end | 38 | end |
39 | 39 | ||
40 | Given 'the milestone has open and closed issues' do | 40 | Given 'the milestone has open and closed issues' do |
features/steps/project/project_network_graph.rb
@@ -16,7 +16,7 @@ class ProjectNetworkGraph < Spinach::FeatureSteps | @@ -16,7 +16,7 @@ class ProjectNetworkGraph < Spinach::FeatureSteps | ||
16 | end | 16 | end |
17 | 17 | ||
18 | And 'page should select "master" in select box' do | 18 | And 'page should select "master" in select box' do |
19 | - page.should have_selector '#ref_chzn span', :text => "master" | 19 | + page.should have_selector '#ref_chzn span', text: "master" |
20 | end | 20 | end |
21 | 21 | ||
22 | And 'page should have "master" on graph' do | 22 | And 'page should have "master" on graph' do |
@@ -26,21 +26,21 @@ class ProjectNetworkGraph < Spinach::FeatureSteps | @@ -26,21 +26,21 @@ class ProjectNetworkGraph < Spinach::FeatureSteps | ||
26 | end | 26 | end |
27 | 27 | ||
28 | When 'I switch ref to "stable"' do | 28 | When 'I switch ref to "stable"' do |
29 | - page.select 'stable', :from => 'ref' | 29 | + page.select 'stable', from: 'ref' |
30 | sleep 2 | 30 | sleep 2 |
31 | end | 31 | end |
32 | 32 | ||
33 | When 'I switch ref to "v2.1.0"' do | 33 | When 'I switch ref to "v2.1.0"' do |
34 | - page.select 'v2.1.0', :from => 'ref' | 34 | + page.select 'v2.1.0', from: 'ref' |
35 | sleep 2 | 35 | sleep 2 |
36 | end | 36 | end |
37 | 37 | ||
38 | And 'page should select "stable" in select box' do | 38 | And 'page should select "stable" in select box' do |
39 | - page.should have_selector '#ref_chzn span', :text => "stable" | 39 | + page.should have_selector '#ref_chzn span', text: "stable" |
40 | end | 40 | end |
41 | 41 | ||
42 | And 'page should select "v2.1.0" in select box' do | 42 | And 'page should select "v2.1.0" in select box' do |
43 | - page.should have_selector '#ref_chzn span', :text => "v2.1.0" | 43 | + page.should have_selector '#ref_chzn span', text: "v2.1.0" |
44 | end | 44 | end |
45 | 45 | ||
46 | And 'page should have "stable" on graph' do | 46 | And 'page should have "stable" on graph' do |
@@ -51,7 +51,7 @@ class ProjectNetworkGraph < Spinach::FeatureSteps | @@ -51,7 +51,7 @@ class ProjectNetworkGraph < Spinach::FeatureSteps | ||
51 | 51 | ||
52 | When 'I looking for a commit by SHA of "v2.1.0"' do | 52 | When 'I looking for a commit by SHA of "v2.1.0"' do |
53 | within ".content .search" do | 53 | within ".content .search" do |
54 | - fill_in 'q', :with => '98d6492' | 54 | + fill_in 'q', with: '98d6492' |
55 | find('button').click | 55 | find('button').click |
56 | end | 56 | end |
57 | sleep 2 | 57 | sleep 2 |
features/steps/project/project_wiki.rb
@@ -16,7 +16,7 @@ class ProjectWiki < Spinach::FeatureSteps | @@ -16,7 +16,7 @@ class ProjectWiki < Spinach::FeatureSteps | ||
16 | end | 16 | end |
17 | 17 | ||
18 | Given 'I create the Wiki Home page' do | 18 | Given 'I create the Wiki Home page' do |
19 | - fill_in "Content", :with => '[link test](test)' | 19 | + fill_in "Content", with: '[link test](test)' |
20 | click_on "Save" | 20 | click_on "Save" |
21 | end | 21 | end |
22 | 22 | ||
@@ -42,7 +42,7 @@ class ProjectWiki < Spinach::FeatureSteps | @@ -42,7 +42,7 @@ class ProjectWiki < Spinach::FeatureSteps | ||
42 | end | 42 | end |
43 | 43 | ||
44 | And 'I change the content' do | 44 | And 'I change the content' do |
45 | - fill_in "Content", :with => 'Updated Wiki Content' | 45 | + fill_in "Content", with: 'Updated Wiki Content' |
46 | click_on "Save" | 46 | click_on "Save" |
47 | end | 47 | end |
48 | 48 |
lib/gitlab/auth.rb
@@ -10,7 +10,7 @@ module Gitlab | @@ -10,7 +10,7 @@ module Gitlab | ||
10 | @user | 10 | @user |
11 | elsif @user = User.find_by_email(email) | 11 | elsif @user = User.find_by_email(email) |
12 | log.info "Updating legacy LDAP user #{email} with extern_uid => #{uid}" | 12 | log.info "Updating legacy LDAP user #{email} with extern_uid => #{uid}" |
13 | - @user.update_attributes(:extern_uid => uid, :provider => provider) | 13 | + @user.update_attributes(extern_uid: uid, provider: provider) |
14 | @user | 14 | @user |
15 | else | 15 | else |
16 | create_from_omniauth(auth, true) | 16 | create_from_omniauth(auth, true) |
@@ -57,7 +57,7 @@ module Gitlab | @@ -57,7 +57,7 @@ module Gitlab | ||
57 | if @user = User.find_by_provider_and_extern_uid(provider, uid) | 57 | if @user = User.find_by_provider_and_extern_uid(provider, uid) |
58 | @user | 58 | @user |
59 | elsif @user = User.find_by_email(email) | 59 | elsif @user = User.find_by_email(email) |
60 | - @user.update_attributes(:extern_uid => uid, :provider => provider) | 60 | + @user.update_attributes(extern_uid: uid, provider: provider) |
61 | @user | 61 | @user |
62 | else | 62 | else |
63 | if Gitlab.config.omniauth['allow_single_sign_on'] | 63 | if Gitlab.config.omniauth['allow_single_sign_on'] |
lib/gitlab/popen.rb
@@ -2,7 +2,7 @@ module Gitlab | @@ -2,7 +2,7 @@ module Gitlab | ||
2 | module Popen | 2 | module Popen |
3 | def popen(cmd, path) | 3 | def popen(cmd, path) |
4 | vars = { "PWD" => path } | 4 | vars = { "PWD" => path } |
5 | - options = { :chdir => path } | 5 | + options = { chdir: path } |
6 | 6 | ||
7 | @cmd_output = "" | 7 | @cmd_output = "" |
8 | @cmd_status = 0 | 8 | @cmd_status = 0 |
lib/tasks/gitlab/backup.rake
@@ -4,7 +4,7 @@ namespace :gitlab do | @@ -4,7 +4,7 @@ namespace :gitlab do | ||
4 | namespace :backup do | 4 | namespace :backup do |
5 | # Create backup of GitLab system | 5 | # Create backup of GitLab system |
6 | desc "GITLAB | Create a backup of the GitLab system" | 6 | desc "GITLAB | Create a backup of the GitLab system" |
7 | - task :create => :environment do | 7 | + task create: :environment do |
8 | warn_user_is_not_gitlab | 8 | warn_user_is_not_gitlab |
9 | 9 | ||
10 | Rake::Task["gitlab:backup:db:create"].invoke | 10 | Rake::Task["gitlab:backup:db:create"].invoke |
@@ -57,7 +57,7 @@ namespace :gitlab do | @@ -57,7 +57,7 @@ namespace :gitlab do | ||
57 | 57 | ||
58 | # Restore backup of GitLab system | 58 | # Restore backup of GitLab system |
59 | desc "GITLAB | Restore a previously created backup" | 59 | desc "GITLAB | Restore a previously created backup" |
60 | - task :restore => :environment do | 60 | + task restore: :environment do |
61 | warn_user_is_not_gitlab | 61 | warn_user_is_not_gitlab |
62 | 62 | ||
63 | Dir.chdir(Gitlab.config.backup.path) | 63 | Dir.chdir(Gitlab.config.backup.path) |
@@ -113,13 +113,13 @@ namespace :gitlab do | @@ -113,13 +113,13 @@ namespace :gitlab do | ||
113 | end | 113 | end |
114 | 114 | ||
115 | namespace :repo do | 115 | namespace :repo do |
116 | - task :create => :environment do | 116 | + task create: :environment do |
117 | puts "Dumping repositories ...".blue | 117 | puts "Dumping repositories ...".blue |
118 | Backup::Repository.new.dump | 118 | Backup::Repository.new.dump |
119 | puts "done".green | 119 | puts "done".green |
120 | end | 120 | end |
121 | 121 | ||
122 | - task :restore => :environment do | 122 | + task restore: :environment do |
123 | puts "Restoring repositories ...".blue | 123 | puts "Restoring repositories ...".blue |
124 | Backup::Repository.new.restore | 124 | Backup::Repository.new.restore |
125 | puts "done".green | 125 | puts "done".green |
@@ -127,13 +127,13 @@ namespace :gitlab do | @@ -127,13 +127,13 @@ namespace :gitlab do | ||
127 | end | 127 | end |
128 | 128 | ||
129 | namespace :db do | 129 | namespace :db do |
130 | - task :create => :environment do | 130 | + task create: :environment do |
131 | puts "Dumping database ... ".blue | 131 | puts "Dumping database ... ".blue |
132 | Backup::Database.new.dump | 132 | Backup::Database.new.dump |
133 | puts "done".green | 133 | puts "done".green |
134 | end | 134 | end |
135 | 135 | ||
136 | - task :restore => :environment do | 136 | + task restore: :environment do |
137 | puts "Restoring database ... ".blue | 137 | puts "Restoring database ... ".blue |
138 | Backup::Database.new.restore | 138 | Backup::Database.new.restore |
139 | puts "done".green | 139 | puts "done".green |
@@ -141,13 +141,13 @@ namespace :gitlab do | @@ -141,13 +141,13 @@ namespace :gitlab do | ||
141 | end | 141 | end |
142 | 142 | ||
143 | namespace :uploads do | 143 | namespace :uploads do |
144 | - task :create => :environment do | 144 | + task create: :environment do |
145 | puts "Dumping uploads ... ".blue | 145 | puts "Dumping uploads ... ".blue |
146 | Backup::Uploads.new.dump | 146 | Backup::Uploads.new.dump |
147 | puts "done".green | 147 | puts "done".green |
148 | end | 148 | end |
149 | 149 | ||
150 | - task :restore => :environment do | 150 | + task restore: :environment do |
151 | puts "Restoring uploads ... ".blue | 151 | puts "Restoring uploads ... ".blue |
152 | Backup::Uploads.new.restore | 152 | Backup::Uploads.new.restore |
153 | puts "done".green | 153 | puts "done".green |
lib/tasks/gitlab/bulk_add_permission.rake
1 | namespace :gitlab do | 1 | namespace :gitlab do |
2 | namespace :import do | 2 | namespace :import do |
3 | desc "GITLAB | Add all users to all projects (admin users are added as masters)" | 3 | desc "GITLAB | Add all users to all projects (admin users are added as masters)" |
4 | - task :all_users_to_all_projects => :environment do |t, args| | ||
5 | - user_ids = User.where(:admin => false).pluck(:id) | ||
6 | - admin_ids = User.where(:admin => true).pluck(:id) | 4 | + task all_users_to_all_projects: :environment do |t, args| |
5 | + user_ids = User.where(admin: false).pluck(:id) | ||
6 | + admin_ids = User.where(admin: true).pluck(:id) | ||
7 | projects_ids = Project.pluck(:id) | 7 | projects_ids = Project.pluck(:id) |
8 | 8 | ||
9 | puts "Importing #{user_ids.size} users into #{projects_ids.size} projects" | 9 | puts "Importing #{user_ids.size} users into #{projects_ids.size} projects" |
lib/tasks/gitlab/cleanup.rake
1 | namespace :gitlab do | 1 | namespace :gitlab do |
2 | namespace :cleanup do | 2 | namespace :cleanup do |
3 | desc "GITLAB | Cleanup | Clean namespaces" | 3 | desc "GITLAB | Cleanup | Clean namespaces" |
4 | - task :dirs => :environment do | 4 | + task dirs: :environment do |
5 | warn_user_is_not_gitlab | 5 | warn_user_is_not_gitlab |
6 | remove_flag = ENV['REMOVE'] | 6 | remove_flag = ENV['REMOVE'] |
7 | 7 | ||
@@ -44,7 +44,7 @@ namespace :gitlab do | @@ -44,7 +44,7 @@ namespace :gitlab do | ||
44 | end | 44 | end |
45 | 45 | ||
46 | desc "GITLAB | Cleanup | Clean respositories" | 46 | desc "GITLAB | Cleanup | Clean respositories" |
47 | - task :repos => :environment do | 47 | + task repos: :environment do |
48 | warn_user_is_not_gitlab | 48 | warn_user_is_not_gitlab |
49 | remove_flag = ENV['REMOVE'] | 49 | remove_flag = ENV['REMOVE'] |
50 | 50 |
lib/tasks/gitlab/import.rake
@@ -10,7 +10,7 @@ namespace :gitlab do | @@ -10,7 +10,7 @@ namespace :gitlab do | ||
10 | # * existing projects will be skipped | 10 | # * existing projects will be skipped |
11 | # | 11 | # |
12 | desc "GITLAB | Import bare repositories from git_host -> base_path into GitLab project instance" | 12 | desc "GITLAB | Import bare repositories from git_host -> base_path into GitLab project instance" |
13 | - task :repos => :environment do | 13 | + task repos: :environment do |
14 | 14 | ||
15 | git_base_path = Gitlab.config.gitlab_shell.repos_path | 15 | git_base_path = Gitlab.config.gitlab_shell.repos_path |
16 | repos_to_import = Dir.glob(git_base_path + '/*') | 16 | repos_to_import = Dir.glob(git_base_path + '/*') |
@@ -40,7 +40,7 @@ namespace :gitlab do | @@ -40,7 +40,7 @@ namespace :gitlab do | ||
40 | user = User.admins.first | 40 | user = User.admins.first |
41 | 41 | ||
42 | project_params = { | 42 | project_params = { |
43 | - :name => path, | 43 | + name: path, |
44 | } | 44 | } |
45 | 45 | ||
46 | project = Projects::CreateContext.new(user, project_params).execute | 46 | project = Projects::CreateContext.new(user, project_params).execute |
lib/tasks/gitlab/setup.rake
lib/tasks/gitlab/test.rake
lib/tasks/travis.rake
spec/observers/users_project_observer_spec.rb
@@ -16,7 +16,7 @@ describe UsersProjectObserver do | @@ -16,7 +16,7 @@ describe UsersProjectObserver do | ||
16 | 16 | ||
17 | it "should send email to user" do | 17 | it "should send email to user" do |
18 | subject.should_receive(:notification) | 18 | subject.should_receive(:notification) |
19 | - Event.stub(:create => true) | 19 | + Event.stub(create: true) |
20 | 20 | ||
21 | create(:users_project) | 21 | create(:users_project) |
22 | end | 22 | end |
spec/requests/api/groups_spec.rb
@@ -85,17 +85,17 @@ describe Gitlab::API do | @@ -85,17 +85,17 @@ describe Gitlab::API do | ||
85 | end | 85 | end |
86 | 86 | ||
87 | it "should not create group, duplicate" do | 87 | it "should not create group, duplicate" do |
88 | - post api("/groups", admin), {:name => "Duplicate Test", :path => group2.path} | 88 | + post api("/groups", admin), {name: "Duplicate Test", path: group2.path} |
89 | response.status.should == 404 | 89 | response.status.should == 404 |
90 | end | 90 | end |
91 | 91 | ||
92 | it "should return 400 bad request error if name not given" do | 92 | it "should return 400 bad request error if name not given" do |
93 | - post api("/groups", admin), { :path => group2.path } | 93 | + post api("/groups", admin), { path: group2.path } |
94 | response.status.should == 400 | 94 | response.status.should == 400 |
95 | end | 95 | end |
96 | 96 | ||
97 | it "should return 400 bad request error if path not given" do | 97 | it "should return 400 bad request error if path not given" do |
98 | - post api("/groups", admin), { :name => 'test' } | 98 | + post api("/groups", admin), { name: 'test' } |
99 | response.status.should == 400 | 99 | response.status.should == 400 |
100 | end | 100 | end |
101 | end | 101 | end |
spec/routing/admin_routing_spec.rb
@@ -56,15 +56,15 @@ describe Admin::UsersController, "routing" do | @@ -56,15 +56,15 @@ describe Admin::UsersController, "routing" do | ||
56 | end | 56 | end |
57 | end | 57 | end |
58 | 58 | ||
59 | -# team_admin_project GET /admin/projects/:id/team(.:format) admin/projects#team {:id=>/[^\/]+/} | ||
60 | -# team_update_admin_project PUT /admin/projects/:id/team_update(.:format) admin/projects#team_update {:id=>/[^\/]+/} | ||
61 | -# admin_projects GET /admin/projects(.:format) admin/projects#index {:id=>/[^\/]+/} | ||
62 | -# POST /admin/projects(.:format) admin/projects#create {:id=>/[^\/]+/} | ||
63 | -# new_admin_project GET /admin/projects/new(.:format) admin/projects#new {:id=>/[^\/]+/} | ||
64 | -# edit_admin_project GET /admin/projects/:id/edit(.:format) admin/projects#edit {:id=>/[^\/]+/} | ||
65 | -# admin_project GET /admin/projects/:id(.:format) admin/projects#show {:id=>/[^\/]+/} | ||
66 | -# PUT /admin/projects/:id(.:format) admin/projects#update {:id=>/[^\/]+/} | ||
67 | -# DELETE /admin/projects/:id(.:format) admin/projects#destroy {:id=>/[^\/]+/} | 59 | +# team_admin_project GET /admin/projects/:id/team(.:format) admin/projects#team {id: /[^\/]+/} |
60 | +# team_update_admin_project PUT /admin/projects/:id/team_update(.:format) admin/projects#team_update {id: /[^\/]+/} | ||
61 | +# admin_projects GET /admin/projects(.:format) admin/projects#index {id: /[^\/]+/} | ||
62 | +# POST /admin/projects(.:format) admin/projects#create {id: /[^\/]+/} | ||
63 | +# new_admin_project GET /admin/projects/new(.:format) admin/projects#new {id: /[^\/]+/} | ||
64 | +# edit_admin_project GET /admin/projects/:id/edit(.:format) admin/projects#edit {id: /[^\/]+/} | ||
65 | +# admin_project GET /admin/projects/:id(.:format) admin/projects#show {id: /[^\/]+/} | ||
66 | +# PUT /admin/projects/:id(.:format) admin/projects#update {id: /[^\/]+/} | ||
67 | +# DELETE /admin/projects/:id(.:format) admin/projects#destroy {id: /[^\/]+/} | ||
68 | describe Admin::ProjectsController, "routing" do | 68 | describe Admin::ProjectsController, "routing" do |
69 | it "to #index" do | 69 | it "to #index" do |
70 | get("/admin/projects").should route_to('admin/projects#index') | 70 | get("/admin/projects").should route_to('admin/projects#index') |
@@ -75,9 +75,9 @@ describe Admin::ProjectsController, "routing" do | @@ -75,9 +75,9 @@ describe Admin::ProjectsController, "routing" do | ||
75 | end | 75 | end |
76 | end | 76 | end |
77 | 77 | ||
78 | -# edit_admin_project_member GET /admin/projects/:project_id/members/:id/edit(.:format) admin/projects/members#edit {:id=>/[^\/]+/, :project_id=>/[^\/]+/} | ||
79 | -# admin_project_member PUT /admin/projects/:project_id/members/:id(.:format) admin/projects/members#update {:id=>/[^\/]+/, :project_id=>/[^\/]+/} | ||
80 | -# DELETE /admin/projects/:project_id/members/:id(.:format) admin/projects/members#destroy {:id=>/[^\/]+/, :project_id=>/[^\/]+/} | 78 | +# edit_admin_project_member GET /admin/projects/:project_id/members/:id/edit(.:format) admin/projects/members#edit {id: /[^\/]+/, project_id: /[^\/]+/} |
79 | +# admin_project_member PUT /admin/projects/:project_id/members/:id(.:format) admin/projects/members#update {id: /[^\/]+/, project_id: /[^\/]+/} | ||
80 | +# DELETE /admin/projects/:project_id/members/:id(.:format) admin/projects/members#destroy {id: /[^\/]+/, project_id: /[^\/]+/} | ||
81 | describe Admin::Projects::MembersController, "routing" do | 81 | describe Admin::Projects::MembersController, "routing" do |
82 | it "to #edit" do | 82 | it "to #edit" do |
83 | get("/admin/projects/test/members/1/edit").should route_to('admin/projects/members#edit', project_id: 'test', id: '1') | 83 | get("/admin/projects/test/members/1/edit").should route_to('admin/projects/members#edit', project_id: 'test', id: '1') |
spec/routing/project_routing_spec.rb
@@ -279,7 +279,7 @@ describe HooksController, "routing" do | @@ -279,7 +279,7 @@ describe HooksController, "routing" do | ||
279 | end | 279 | end |
280 | end | 280 | end |
281 | 281 | ||
282 | -# project_commit GET /:project_id/commit/:id(.:format) commit#show {:id=>/[[:alnum:]]{6,40}/, :project_id=>/[^\/]+/} | 282 | +# project_commit GET /:project_id/commit/:id(.:format) commit#show {id: /[[:alnum:]]{6,40}/, project_id: /[^\/]+/} |
283 | describe CommitController, "routing" do | 283 | describe CommitController, "routing" do |
284 | it "to #show" do | 284 | it "to #show" do |
285 | get("/gitlabhq/commit/4246fb").should route_to('commit#show', project_id: 'gitlabhq', id: '4246fb') | 285 | get("/gitlabhq/commit/4246fb").should route_to('commit#show', project_id: 'gitlabhq', id: '4246fb') |
@@ -375,7 +375,7 @@ describe NotesController, "routing" do | @@ -375,7 +375,7 @@ describe NotesController, "routing" do | ||
375 | end | 375 | end |
376 | end | 376 | end |
377 | 377 | ||
378 | -# project_blame GET /:project_id/blame/:id(.:format) blame#show {:id=>/.+/, :project_id=>/[^\/]+/} | 378 | +# project_blame GET /:project_id/blame/:id(.:format) blame#show {id: /.+/, project_id: /[^\/]+/} |
379 | describe BlameController, "routing" do | 379 | describe BlameController, "routing" do |
380 | it "to #show" do | 380 | it "to #show" do |
381 | get("/gitlabhq/blame/master/app/models/project.rb").should route_to('blame#show', project_id: 'gitlabhq', id: 'master/app/models/project.rb') | 381 | get("/gitlabhq/blame/master/app/models/project.rb").should route_to('blame#show', project_id: 'gitlabhq', id: 'master/app/models/project.rb') |
@@ -383,7 +383,7 @@ describe BlameController, "routing" do | @@ -383,7 +383,7 @@ describe BlameController, "routing" do | ||
383 | end | 383 | end |
384 | end | 384 | end |
385 | 385 | ||
386 | -# project_blob GET /:project_id/blob/:id(.:format) blob#show {:id=>/.+/, :project_id=>/[^\/]+/} | 386 | +# project_blob GET /:project_id/blob/:id(.:format) blob#show {id: /.+/, project_id: /[^\/]+/} |
387 | describe BlobController, "routing" do | 387 | describe BlobController, "routing" do |
388 | it "to #show" do | 388 | it "to #show" do |
389 | get("/gitlabhq/blob/master/app/models/project.rb").should route_to('blob#show', project_id: 'gitlabhq', id: 'master/app/models/project.rb') | 389 | get("/gitlabhq/blob/master/app/models/project.rb").should route_to('blob#show', project_id: 'gitlabhq', id: 'master/app/models/project.rb') |
@@ -392,7 +392,7 @@ describe BlobController, "routing" do | @@ -392,7 +392,7 @@ describe BlobController, "routing" do | ||
392 | end | 392 | end |
393 | end | 393 | end |
394 | 394 | ||
395 | -# project_tree GET /:project_id/tree/:id(.:format) tree#show {:id=>/.+/, :project_id=>/[^\/]+/} | 395 | +# project_tree GET /:project_id/tree/:id(.:format) tree#show {id: /.+/, project_id: /[^\/]+/} |
396 | describe TreeController, "routing" do | 396 | describe TreeController, "routing" do |
397 | it "to #show" do | 397 | it "to #show" do |
398 | get("/gitlabhq/tree/master/app/models/project.rb").should route_to('tree#show', project_id: 'gitlabhq', id: 'master/app/models/project.rb') | 398 | get("/gitlabhq/tree/master/app/models/project.rb").should route_to('tree#show', project_id: 'gitlabhq', id: 'master/app/models/project.rb') |
@@ -400,9 +400,9 @@ describe TreeController, "routing" do | @@ -400,9 +400,9 @@ describe TreeController, "routing" do | ||
400 | end | 400 | end |
401 | end | 401 | end |
402 | 402 | ||
403 | -# project_compare_index GET /:project_id/compare(.:format) compare#index {:id=>/[^\/]+/, :project_id=>/[^\/]+/} | ||
404 | -# POST /:project_id/compare(.:format) compare#create {:id=>/[^\/]+/, :project_id=>/[^\/]+/} | ||
405 | -# project_compare /:project_id/compare/:from...:to(.:format) compare#show {:from=>/.+/, :to=>/.+/, :id=>/[^\/]+/, :project_id=>/[^\/]+/} | 403 | +# project_compare_index GET /:project_id/compare(.:format) compare#index {id: /[^\/]+/, project_id: /[^\/]+/} |
404 | +# POST /:project_id/compare(.:format) compare#create {id: /[^\/]+/, project_id: /[^\/]+/} | ||
405 | +# project_compare /:project_id/compare/:from...:to(.:format) compare#show {from: /.+/, to: /.+/, id: /[^\/]+/, project_id: /[^\/]+/} | ||
406 | describe CompareController, "routing" do | 406 | describe CompareController, "routing" do |
407 | it "to #index" do | 407 | it "to #index" do |
408 | get("/gitlabhq/compare").should route_to('compare#index', project_id: 'gitlabhq') | 408 | get("/gitlabhq/compare").should route_to('compare#index', project_id: 'gitlabhq') |
spec/support/valid_commit.rb
@@ -9,7 +9,7 @@ module ValidCommit | @@ -9,7 +9,7 @@ module ValidCommit | ||
9 | C_FILE_PATH = "app/models" | 9 | C_FILE_PATH = "app/models" |
10 | C_FILES = [".gitkeep", "ability.rb", "commit.rb", "issue.rb", "key.rb", "mailer_observer.rb", "merge_request.rb", "note.rb", "project.rb", "protected_branch.rb", "repository.rb", "snippet.rb", "tree.rb", "user.rb", "users_project.rb", "web_hook.rb", "wiki.rb"] | 10 | C_FILES = [".gitkeep", "ability.rb", "commit.rb", "issue.rb", "key.rb", "mailer_observer.rb", "merge_request.rb", "note.rb", "project.rb", "protected_branch.rb", "repository.rb", "snippet.rb", "tree.rb", "user.rb", "users_project.rb", "web_hook.rb", "wiki.rb"] |
11 | 11 | ||
12 | - BLOB_FILE = %{%h3= @key.title\n%hr\n%pre= @key.key\n.actions\n = link_to 'Remove', @key, :confirm => 'Are you sure?', :method => :delete, :class => \"btn danger delete-key\"\n\n\n} | 12 | + BLOB_FILE = %{%h3= @key.title\n%hr\n%pre= @key.key\n.actions\n = link_to 'Remove', @key, confirm: 'Are you sure?', method: :delete, class: \"btn danger delete-key\"\n\n\n} |
13 | BLOB_FILE_PATH = "app/views/keys/show.html.haml" | 13 | BLOB_FILE_PATH = "app/views/keys/show.html.haml" |
14 | end | 14 | end |
15 | 15 |
spec/tasks/gitlab/backup_rake_spec.rb
@@ -22,21 +22,21 @@ describe 'gitlab:app namespace rake task' do | @@ -22,21 +22,21 @@ describe 'gitlab:app namespace rake task' do | ||
22 | 22 | ||
23 | context 'gitlab version' do | 23 | context 'gitlab version' do |
24 | before do | 24 | before do |
25 | - Dir.stub :glob => [] | 25 | + Dir.stub glob: [] |
26 | Dir.stub :chdir | 26 | Dir.stub :chdir |
27 | - File.stub :exists? => true | ||
28 | - Kernel.stub :system => true | 27 | + File.stub exists?: true |
28 | + Kernel.stub system: true | ||
29 | end | 29 | end |
30 | 30 | ||
31 | let(:gitlab_version) { %x{git rev-parse HEAD}.gsub(/\n/,"") } | 31 | let(:gitlab_version) { %x{git rev-parse HEAD}.gsub(/\n/,"") } |
32 | 32 | ||
33 | it 'should fail on mismach' do | 33 | it 'should fail on mismach' do |
34 | - YAML.stub :load_file => {:gitlab_version => gitlab_version.reverse} | 34 | + YAML.stub load_file: {gitlab_version: gitlab_version.reverse} |
35 | expect { run_rake_task }.to raise_error SystemExit | 35 | expect { run_rake_task }.to raise_error SystemExit |
36 | end | 36 | end |
37 | 37 | ||
38 | it 'should invoke restoration on mach' do | 38 | it 'should invoke restoration on mach' do |
39 | - YAML.stub :load_file => {:gitlab_version => gitlab_version} | 39 | + YAML.stub load_file: {gitlab_version: gitlab_version} |
40 | Rake::Task["gitlab:backup:db:restore"].should_receive :invoke | 40 | Rake::Task["gitlab:backup:db:restore"].should_receive :invoke |
41 | Rake::Task["gitlab:backup:repo:restore"].should_receive :invoke | 41 | Rake::Task["gitlab:backup:repo:restore"].should_receive :invoke |
42 | expect { run_rake_task }.to_not raise_error SystemExit | 42 | expect { run_rake_task }.to_not raise_error SystemExit |