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

replace Gitolited mixin with Gitlab::ShellAdapter

parent d6338a84
No related branches found
No related tags found
No related merge requests found
Loading
@@ -23,7 +23,7 @@
Loading
@@ -23,7 +23,7 @@
require "grit" require "grit"
   
class Project < ActiveRecord::Base class Project < ActiveRecord::Base
include Gitolited include Gitlab::ShellAdapter
extend Enumerize extend Enumerize
   
class TransferError < StandardError; end class TransferError < StandardError; end
Loading
Loading
Loading
@@ -10,7 +10,7 @@
Loading
@@ -10,7 +10,7 @@
# #
   
class ProtectedBranch < ActiveRecord::Base class ProtectedBranch < ActiveRecord::Base
include Gitolited include Gitlab::ShellAdapter
   
attr_accessible :name attr_accessible :name
   
Loading
Loading
Loading
@@ -11,7 +11,7 @@
Loading
@@ -11,7 +11,7 @@
# #
   
class UsersProject < ActiveRecord::Base class UsersProject < ActiveRecord::Base
include Gitolited include Gitlab::ShellAdapter
   
GUEST = 10 GUEST = 10
REPORTER = 20 REPORTER = 20
Loading
Loading
class KeyObserver < ActiveRecord::Observer class KeyObserver < ActiveRecord::Observer
include Gitolited include Gitlab::ShellAdapter
   
def after_save(key) def after_save(key)
GitlabShellWorker.perform_async( GitlabShellWorker.perform_async(
Loading
Loading
Loading
@@ -3,7 +3,7 @@
Loading
@@ -3,7 +3,7 @@
# Used for transfer project to another namespace # Used for transfer project to another namespace
# #
class ProjectTransferService class ProjectTransferService
include Gitolited include Gitlab::ShellAdapter
   
attr_accessor :project attr_accessor :project
   
Loading
Loading
class GitlabShellWorker class GitlabShellWorker
include Sidekiq::Worker include Sidekiq::Worker
include Gitolited include Gitlab::ShellAdapter
   
sidekiq_options queue: :gitlab_shell sidekiq_options queue: :gitlab_shell
   
Loading
Loading
Loading
@@ -3,3 +3,6 @@ require Rails.root.join("lib", "gitlab", "backend", "grack_auth")
Loading
@@ -3,3 +3,6 @@ require Rails.root.join("lib", "gitlab", "backend", "grack_auth")
   
# GIT over SSH # GIT over SSH
require Rails.root.join("lib", "gitlab", "backend", "shell") require Rails.root.join("lib", "gitlab", "backend", "shell")
# GitLab shell adapter
require Rails.root.join("lib", "gitlab", "backend", "shell_adapter")
# == Gitolited mixin # == GitLab Shell mixin
# #
# Provide a shortcut to Gitlab::Shell instance by gitlab_shell # Provide a shortcut to Gitlab::Shell instance by gitlab_shell
# #
# Used by Project, UsersProject, etc module Gitlab
# module ShellAdapter
module Gitolited def gitlab_shell
def gitlab_shell Gitlab::Shell.new
Gitlab::Shell.new end
end end
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment