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 | 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 | 4 | <%= devise_error_messages! %> |
| 5 | 5 | |
| 6 | 6 | <div><%= f.label :email %><br /> |
| ... | ... | @@ -9,4 +9,4 @@ |
| 9 | 9 | <div><%= f.submit "Resend confirmation instructions" %></div> |
| 10 | 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 | 2 | |
| 3 | 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 | 2 | |
| 3 | 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 | 7 | <p>If you didn't request this, please ignore this email.</p> |
| 8 | 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 | |
| 5 | 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 | 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 | 4 | <%= devise_error_messages! %> |
| 5 | 5 | |
| 6 | 6 | <div><%= f.label :email %><br /> |
| ... | ... | @@ -18,11 +18,11 @@ |
| 18 | 18 | <div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br /> |
| 19 | 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 | 22 | <% end %> |
| 23 | 23 | |
| 24 | 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 | 28 | <%= link_to "Back", :back %> | ... | ... |
app/views/devise/shared/_links.erb
| 1 | 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 | 3 | <% end -%> |
| 4 | 4 | |
| 5 | 5 | <%- if devise_mapping.registerable? && controller_name != 'registrations' %> |
| ... | ... | @@ -7,7 +7,7 @@ |
| 7 | 7 | <% end -%> |
| 8 | 8 | |
| 9 | 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 | 11 | <% end -%> |
| 12 | 12 | |
| 13 | 13 | <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %> | ... | ... |
app/views/devise/unlocks/new.html.erb
| 1 | 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 | 4 | <%= devise_error_messages! %> |
| 5 | 5 | |
| 6 | 6 | <div><%= f.label :email %><br /> |
| ... | ... | @@ -9,4 +9,4 @@ |
| 9 | 9 | <div><%= f.submit "Resend unlock instructions" %></div> |
| 10 | 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 | 4 | |
| 5 | 5 | if defined?(Bundler) |
| 6 | 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 | 8 | # If you want your assets lazily compiled in production, use this line |
| 9 | 9 | Bundler.require(:default, :assets, Rails.env) |
| 10 | 10 | end | ... | ... |
config/environments/production.rb
| ... | ... | @@ -68,8 +68,8 @@ Gitlab::Application.configure do |
| 68 | 68 | config.action_mailer.delivery_method = :sendmail |
| 69 | 69 | # Defaults to: |
| 70 | 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 | 74 | config.action_mailer.perform_deliveries = true |
| 75 | 75 | config.action_mailer.raise_delivery_errors = true | ... | ... |
config/initializers/devise.rb
| ... | ... | @@ -94,7 +94,7 @@ Devise.setup do |config| |
| 94 | 94 | # config.extend_remember_period = false |
| 95 | 95 | |
| 96 | 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 | 98 | # config.cookie_options = {} |
| 99 | 99 | |
| 100 | 100 | # ==> Configuration for :validatable |
| ... | ... | @@ -202,18 +202,18 @@ Devise.setup do |config| |
| 202 | 202 | # config.warden do |manager| |
| 203 | 203 | # manager.failure_app = AnotherApp |
| 204 | 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 | 206 | # end |
| 207 | 207 | |
| 208 | 208 | if Gitlab.config.ldap.enabled |
| 209 | 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 | 217 | end |
| 218 | 218 | |
| 219 | 219 | Gitlab.config.omniauth.providers.each do |provider| | ... | ... |
config/routes.rb
| ... | ... | @@ -179,8 +179,7 @@ Gitlab::Application.routes.draw do |
| 179 | 179 | resources :compare, only: [:index, :create] |
| 180 | 180 | resources :blame, only: [:show], constraints: {id: /.+/} |
| 181 | 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 | 184 | resources :wikis, only: [:show, :edit, :destroy, :create] do |
| 186 | 185 | collection do | ... | ... |
db/fixtures/development/07_milestones.rb
| 1 | 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 | 20 | end |
| 21 | 21 | |
| 22 | 22 | And 'Create gitlab user "John"' do |
| 23 | - create(:user, :name => "John") | |
| 23 | + create(:user, name: "John") | |
| 24 | 24 | end |
| 25 | 25 | |
| 26 | 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 | 29 | click_button "Create group" |
| 30 | 30 | end |
| 31 | 31 | |
| ... | ... | @@ -41,8 +41,8 @@ class AdminGroups < Spinach::FeatureSteps |
| 41 | 41 | When 'I select user "John" from user list as "Reporter"' do |
| 42 | 42 | user = User.find_by_name("John") |
| 43 | 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 | 46 | end |
| 47 | 47 | click_button "Add user to projects in group" |
| 48 | 48 | end | ... | ... |
features/steps/group/group.rb
| ... | ... | @@ -39,8 +39,8 @@ class Groups < Spinach::FeatureSteps |
| 39 | 39 | And 'I select user "John" from list with role "Reporter"' do |
| 40 | 40 | user = User.find_by_name("John") |
| 41 | 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 | 44 | end |
| 45 | 45 | click_button "Add" |
| 46 | 46 | end |
| ... | ... | @@ -85,7 +85,7 @@ class Groups < Spinach::FeatureSteps |
| 85 | 85 | end |
| 86 | 86 | |
| 87 | 87 | And 'I change group name' do |
| 88 | - fill_in 'group_name', :with => 'new-name' | |
| 88 | + fill_in 'group_name', with: 'new-name' | |
| 89 | 89 | click_button "Save group" |
| 90 | 90 | end |
| 91 | 91 | ... | ... |
features/steps/profile/profile.rb
| ... | ... | @@ -9,9 +9,9 @@ class Profile < Spinach::FeatureSteps |
| 9 | 9 | end |
| 10 | 10 | |
| 11 | 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 | 15 | click_button "Save" |
| 16 | 16 | @user.reload |
| 17 | 17 | end |
| ... | ... | @@ -24,8 +24,8 @@ class Profile < Spinach::FeatureSteps |
| 24 | 24 | |
| 25 | 25 | Then 'I change my password' do |
| 26 | 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 | 29 | click_button "Save" |
| 30 | 30 | end |
| 31 | 31 | end | ... | ... |
features/steps/profile/profile_ssh_keys.rb
| ... | ... | @@ -12,8 +12,8 @@ class ProfileSshKeys < Spinach::FeatureSteps |
| 12 | 12 | end |
| 13 | 13 | |
| 14 | 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 | 17 | click_button "Save" |
| 18 | 18 | end |
| 19 | 19 | |
| ... | ... | @@ -43,6 +43,6 @@ class ProfileSshKeys < Spinach::FeatureSteps |
| 43 | 43 | end |
| 44 | 44 | |
| 45 | 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 | 47 | end |
| 48 | 48 | end | ... | ... |
features/steps/project/project_browse_branches.rb
| ... | ... | @@ -30,6 +30,6 @@ class ProjectBrowseBranches < Spinach::FeatureSteps |
| 30 | 30 | |
| 31 | 31 | And 'project "Shop" has protected branches' do |
| 32 | 32 | project = Project.find_by_name("Shop") |
| 33 | - project.protected_branches.create(:name => "stable") | |
| 33 | + project.protected_branches.create(name: "stable") | |
| 34 | 34 | end |
| 35 | 35 | end | ... | ... |
features/steps/project/project_browse_commits.rb
| ... | ... | @@ -17,9 +17,9 @@ class ProjectBrowseCommits < Spinach::FeatureSteps |
| 17 | 17 | Then 'I see commits atom feed' do |
| 18 | 18 | commit = @project.repository.commit |
| 19 | 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 | 23 | end |
| 24 | 24 | |
| 25 | 25 | Given 'I click on commit link' do | ... | ... |
features/steps/project/project_issues.rb
| ... | ... | @@ -41,7 +41,7 @@ class ProjectIssues < Spinach::FeatureSteps |
| 41 | 41 | end |
| 42 | 42 | |
| 43 | 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 | 45 | click_button "Submit new issue" |
| 46 | 46 | end |
| 47 | 47 | |
| ... | ... | @@ -78,16 +78,16 @@ class ProjectIssues < Spinach::FeatureSteps |
| 78 | 78 | |
| 79 | 79 | Given 'project "Shop" has milestone "v2.2"' do |
| 80 | 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 | 84 | end |
| 85 | 85 | |
| 86 | 86 | And 'project "Shop" has milestone "v3.0"' do |
| 87 | 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 | 91 | end |
| 92 | 92 | |
| 93 | 93 | When 'I select milestone "v3.0"' do |
| ... | ... | @@ -115,16 +115,16 @@ class ProjectIssues < Spinach::FeatureSteps |
| 115 | 115 | And 'project "Shop" have "Release 0.4" open issue' do |
| 116 | 116 | project = Project.find_by_name("Shop") |
| 117 | 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 | 121 | end |
| 122 | 122 | |
| 123 | 123 | And 'project "Shop" have "Release 0.3" closed issue' do |
| 124 | 124 | project = Project.find_by_name("Shop") |
| 125 | 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 | 129 | end |
| 130 | 130 | end | ... | ... |
features/steps/project/project_merge_requests.rb
| ... | ... | @@ -56,9 +56,9 @@ class ProjectMergeRequests < Spinach::FeatureSteps |
| 56 | 56 | end |
| 57 | 57 | |
| 58 | 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 | 62 | click_button "Submit merge request" |
| 63 | 63 | end |
| 64 | 64 | ... | ... |
features/steps/project/project_milestones.rb
| ... | ... | @@ -19,7 +19,7 @@ class ProjectMilestones < Spinach::FeatureSteps |
| 19 | 19 | end |
| 20 | 20 | |
| 21 | 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 | 23 | click_button "Create milestone" |
| 24 | 24 | end |
| 25 | 25 | |
| ... | ... | @@ -32,9 +32,9 @@ class ProjectMilestones < Spinach::FeatureSteps |
| 32 | 32 | |
| 33 | 33 | And 'project "Shop" has milestone "v2.2"' do |
| 34 | 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 | 38 | end |
| 39 | 39 | |
| 40 | 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 | 16 | end |
| 17 | 17 | |
| 18 | 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 | 20 | end |
| 21 | 21 | |
| 22 | 22 | And 'page should have "master" on graph' do |
| ... | ... | @@ -26,21 +26,21 @@ class ProjectNetworkGraph < Spinach::FeatureSteps |
| 26 | 26 | end |
| 27 | 27 | |
| 28 | 28 | When 'I switch ref to "stable"' do |
| 29 | - page.select 'stable', :from => 'ref' | |
| 29 | + page.select 'stable', from: 'ref' | |
| 30 | 30 | sleep 2 |
| 31 | 31 | end |
| 32 | 32 | |
| 33 | 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 | 35 | sleep 2 |
| 36 | 36 | end |
| 37 | 37 | |
| 38 | 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 | 40 | end |
| 41 | 41 | |
| 42 | 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 | 44 | end |
| 45 | 45 | |
| 46 | 46 | And 'page should have "stable" on graph' do |
| ... | ... | @@ -51,7 +51,7 @@ class ProjectNetworkGraph < Spinach::FeatureSteps |
| 51 | 51 | |
| 52 | 52 | When 'I looking for a commit by SHA of "v2.1.0"' do |
| 53 | 53 | within ".content .search" do |
| 54 | - fill_in 'q', :with => '98d6492' | |
| 54 | + fill_in 'q', with: '98d6492' | |
| 55 | 55 | find('button').click |
| 56 | 56 | end |
| 57 | 57 | sleep 2 | ... | ... |
features/steps/project/project_wiki.rb
| ... | ... | @@ -16,7 +16,7 @@ class ProjectWiki < Spinach::FeatureSteps |
| 16 | 16 | end |
| 17 | 17 | |
| 18 | 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 | 20 | click_on "Save" |
| 21 | 21 | end |
| 22 | 22 | |
| ... | ... | @@ -42,7 +42,7 @@ class ProjectWiki < Spinach::FeatureSteps |
| 42 | 42 | end |
| 43 | 43 | |
| 44 | 44 | And 'I change the content' do |
| 45 | - fill_in "Content", :with => 'Updated Wiki Content' | |
| 45 | + fill_in "Content", with: 'Updated Wiki Content' | |
| 46 | 46 | click_on "Save" |
| 47 | 47 | end |
| 48 | 48 | ... | ... |
lib/gitlab/auth.rb
| ... | ... | @@ -10,7 +10,7 @@ module Gitlab |
| 10 | 10 | @user |
| 11 | 11 | elsif @user = User.find_by_email(email) |
| 12 | 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 | 14 | @user |
| 15 | 15 | else |
| 16 | 16 | create_from_omniauth(auth, true) |
| ... | ... | @@ -57,7 +57,7 @@ module Gitlab |
| 57 | 57 | if @user = User.find_by_provider_and_extern_uid(provider, uid) |
| 58 | 58 | @user |
| 59 | 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 | 61 | @user |
| 62 | 62 | else |
| 63 | 63 | if Gitlab.config.omniauth['allow_single_sign_on'] | ... | ... |
lib/gitlab/popen.rb
lib/tasks/gitlab/backup.rake
| ... | ... | @@ -4,7 +4,7 @@ namespace :gitlab do |
| 4 | 4 | namespace :backup do |
| 5 | 5 | # Create backup of GitLab system |
| 6 | 6 | desc "GITLAB | Create a backup of the GitLab system" |
| 7 | - task :create => :environment do | |
| 7 | + task create: :environment do | |
| 8 | 8 | warn_user_is_not_gitlab |
| 9 | 9 | |
| 10 | 10 | Rake::Task["gitlab:backup:db:create"].invoke |
| ... | ... | @@ -57,7 +57,7 @@ namespace :gitlab do |
| 57 | 57 | |
| 58 | 58 | # Restore backup of GitLab system |
| 59 | 59 | desc "GITLAB | Restore a previously created backup" |
| 60 | - task :restore => :environment do | |
| 60 | + task restore: :environment do | |
| 61 | 61 | warn_user_is_not_gitlab |
| 62 | 62 | |
| 63 | 63 | Dir.chdir(Gitlab.config.backup.path) |
| ... | ... | @@ -113,13 +113,13 @@ namespace :gitlab do |
| 113 | 113 | end |
| 114 | 114 | |
| 115 | 115 | namespace :repo do |
| 116 | - task :create => :environment do | |
| 116 | + task create: :environment do | |
| 117 | 117 | puts "Dumping repositories ...".blue |
| 118 | 118 | Backup::Repository.new.dump |
| 119 | 119 | puts "done".green |
| 120 | 120 | end |
| 121 | 121 | |
| 122 | - task :restore => :environment do | |
| 122 | + task restore: :environment do | |
| 123 | 123 | puts "Restoring repositories ...".blue |
| 124 | 124 | Backup::Repository.new.restore |
| 125 | 125 | puts "done".green |
| ... | ... | @@ -127,13 +127,13 @@ namespace :gitlab do |
| 127 | 127 | end |
| 128 | 128 | |
| 129 | 129 | namespace :db do |
| 130 | - task :create => :environment do | |
| 130 | + task create: :environment do | |
| 131 | 131 | puts "Dumping database ... ".blue |
| 132 | 132 | Backup::Database.new.dump |
| 133 | 133 | puts "done".green |
| 134 | 134 | end |
| 135 | 135 | |
| 136 | - task :restore => :environment do | |
| 136 | + task restore: :environment do | |
| 137 | 137 | puts "Restoring database ... ".blue |
| 138 | 138 | Backup::Database.new.restore |
| 139 | 139 | puts "done".green |
| ... | ... | @@ -141,13 +141,13 @@ namespace :gitlab do |
| 141 | 141 | end |
| 142 | 142 | |
| 143 | 143 | namespace :uploads do |
| 144 | - task :create => :environment do | |
| 144 | + task create: :environment do | |
| 145 | 145 | puts "Dumping uploads ... ".blue |
| 146 | 146 | Backup::Uploads.new.dump |
| 147 | 147 | puts "done".green |
| 148 | 148 | end |
| 149 | 149 | |
| 150 | - task :restore => :environment do | |
| 150 | + task restore: :environment do | |
| 151 | 151 | puts "Restoring uploads ... ".blue |
| 152 | 152 | Backup::Uploads.new.restore |
| 153 | 153 | puts "done".green | ... | ... |
lib/tasks/gitlab/bulk_add_permission.rake
| 1 | 1 | namespace :gitlab do |
| 2 | 2 | namespace :import do |
| 3 | 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 | 7 | projects_ids = Project.pluck(:id) |
| 8 | 8 | |
| 9 | 9 | puts "Importing #{user_ids.size} users into #{projects_ids.size} projects" | ... | ... |
lib/tasks/gitlab/cleanup.rake
| 1 | 1 | namespace :gitlab do |
| 2 | 2 | namespace :cleanup do |
| 3 | 3 | desc "GITLAB | Cleanup | Clean namespaces" |
| 4 | - task :dirs => :environment do | |
| 4 | + task dirs: :environment do | |
| 5 | 5 | warn_user_is_not_gitlab |
| 6 | 6 | remove_flag = ENV['REMOVE'] |
| 7 | 7 | |
| ... | ... | @@ -44,7 +44,7 @@ namespace :gitlab do |
| 44 | 44 | end |
| 45 | 45 | |
| 46 | 46 | desc "GITLAB | Cleanup | Clean respositories" |
| 47 | - task :repos => :environment do | |
| 47 | + task repos: :environment do | |
| 48 | 48 | warn_user_is_not_gitlab |
| 49 | 49 | remove_flag = ENV['REMOVE'] |
| 50 | 50 | ... | ... |
lib/tasks/gitlab/import.rake
| ... | ... | @@ -10,7 +10,7 @@ namespace :gitlab do |
| 10 | 10 | # * existing projects will be skipped |
| 11 | 11 | # |
| 12 | 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 | 15 | git_base_path = Gitlab.config.gitlab_shell.repos_path |
| 16 | 16 | repos_to_import = Dir.glob(git_base_path + '/*') |
| ... | ... | @@ -40,7 +40,7 @@ namespace :gitlab do |
| 40 | 40 | user = User.admins.first |
| 41 | 41 | |
| 42 | 42 | project_params = { |
| 43 | - :name => path, | |
| 43 | + name: path, | |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 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
spec/requests/api/groups_spec.rb
| ... | ... | @@ -85,17 +85,17 @@ describe Gitlab::API do |
| 85 | 85 | end |
| 86 | 86 | |
| 87 | 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 | 89 | response.status.should == 404 |
| 90 | 90 | end |
| 91 | 91 | |
| 92 | 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 | 94 | response.status.should == 400 |
| 95 | 95 | end |
| 96 | 96 | |
| 97 | 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 | 99 | response.status.should == 400 |
| 100 | 100 | end |
| 101 | 101 | end | ... | ... |
spec/routing/admin_routing_spec.rb
| ... | ... | @@ -56,15 +56,15 @@ describe Admin::UsersController, "routing" do |
| 56 | 56 | end |
| 57 | 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 | 68 | describe Admin::ProjectsController, "routing" do |
| 69 | 69 | it "to #index" do |
| 70 | 70 | get("/admin/projects").should route_to('admin/projects#index') |
| ... | ... | @@ -75,9 +75,9 @@ describe Admin::ProjectsController, "routing" do |
| 75 | 75 | end |
| 76 | 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 | 81 | describe Admin::Projects::MembersController, "routing" do |
| 82 | 82 | it "to #edit" do |
| 83 | 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 | 279 | end |
| 280 | 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 | 283 | describe CommitController, "routing" do |
| 284 | 284 | it "to #show" do |
| 285 | 285 | get("/gitlabhq/commit/4246fb").should route_to('commit#show', project_id: 'gitlabhq', id: '4246fb') |
| ... | ... | @@ -375,7 +375,7 @@ describe NotesController, "routing" do |
| 375 | 375 | end |
| 376 | 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 | 379 | describe BlameController, "routing" do |
| 380 | 380 | it "to #show" do |
| 381 | 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 | 383 | end |
| 384 | 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 | 387 | describe BlobController, "routing" do |
| 388 | 388 | it "to #show" do |
| 389 | 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 | 392 | end |
| 393 | 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 | 396 | describe TreeController, "routing" do |
| 397 | 397 | it "to #show" do |
| 398 | 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 | 400 | end |
| 401 | 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 | 406 | describe CompareController, "routing" do |
| 407 | 407 | it "to #index" do |
| 408 | 408 | get("/gitlabhq/compare").should route_to('compare#index', project_id: 'gitlabhq') | ... | ... |
spec/support/valid_commit.rb
| ... | ... | @@ -9,7 +9,7 @@ module ValidCommit |
| 9 | 9 | C_FILE_PATH = "app/models" |
| 10 | 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 | 13 | BLOB_FILE_PATH = "app/views/keys/show.html.haml" |
| 14 | 14 | end |
| 15 | 15 | ... | ... |
spec/tasks/gitlab/backup_rake_spec.rb
| ... | ... | @@ -22,21 +22,21 @@ describe 'gitlab:app namespace rake task' do |
| 22 | 22 | |
| 23 | 23 | context 'gitlab version' do |
| 24 | 24 | before do |
| 25 | - Dir.stub :glob => [] | |
| 25 | + Dir.stub glob: [] | |
| 26 | 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 | 29 | end |
| 30 | 30 | |
| 31 | 31 | let(:gitlab_version) { %x{git rev-parse HEAD}.gsub(/\n/,"") } |
| 32 | 32 | |
| 33 | 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 | 35 | expect { run_rake_task }.to raise_error SystemExit |
| 36 | 36 | end |
| 37 | 37 | |
| 38 | 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 | 40 | Rake::Task["gitlab:backup:db:restore"].should_receive :invoke |
| 41 | 41 | Rake::Task["gitlab:backup:repo:restore"].should_receive :invoke |
| 42 | 42 | expect { run_rake_task }.to_not raise_error SystemExit | ... | ... |