Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
01033631
Commit
01033631
authored
Mar 21, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace Gitolited mixin with Gitlab::ShellAdapter
parent
d6338a84
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
21 additions
and
6 deletions
+21
-6
app/models/project.rb
app/models/project.rb
+1
-1
app/models/protected_branch.rb
app/models/protected_branch.rb
+1
-1
app/models/users_project.rb
app/models/users_project.rb
+1
-1
app/observers/key_observer.rb
app/observers/key_observer.rb
+1
-1
app/services/project_transfer_service.rb
app/services/project_transfer_service.rb
+1
-1
app/workers/gitlab_shell_worker.rb
app/workers/gitlab_shell_worker.rb
+1
-1
config/initializers/5_backend.rb
config/initializers/5_backend.rb
+3
-0
lib/gitlab/backend/shell_adapter.rb
lib/gitlab/backend/shell_adapter.rb
+12
-0
No files found.
app/models/project.rb
View file @
01033631
...
...
@@ -23,7 +23,7 @@
require
"grit"
class
Project
<
ActiveRecord
::
Base
include
Git
olited
include
Git
lab
::
ShellAdapter
extend
Enumerize
class
TransferError
<
StandardError
;
end
...
...
app/models/protected_branch.rb
View file @
01033631
...
...
@@ -10,7 +10,7 @@
#
class
ProtectedBranch
<
ActiveRecord
::
Base
include
Git
olited
include
Git
lab
::
ShellAdapter
attr_accessible
:name
...
...
app/models/users_project.rb
View file @
01033631
...
...
@@ -11,7 +11,7 @@
#
class
UsersProject
<
ActiveRecord
::
Base
include
Git
olited
include
Git
lab
::
ShellAdapter
GUEST
=
10
REPORTER
=
20
...
...
app/observers/key_observer.rb
View file @
01033631
class
KeyObserver
<
ActiveRecord
::
Observer
include
Git
olited
include
Git
lab
::
ShellAdapter
def
after_save
(
key
)
GitlabShellWorker
.
perform_async
(
...
...
app/services/project_transfer_service.rb
View file @
01033631
...
...
@@ -3,7 +3,7 @@
# Used for transfer project to another namespace
#
class
ProjectTransferService
include
Git
olited
include
Git
lab
::
ShellAdapter
attr_accessor
:project
...
...
app/workers/gitlab_shell_worker.rb
View file @
01033631
class
GitlabShellWorker
include
Sidekiq
::
Worker
include
Git
olited
include
Git
lab
::
ShellAdapter
sidekiq_options
queue: :gitlab_shell
...
...
config/initializers/5_backend.rb
View file @
01033631
...
...
@@ -3,3 +3,6 @@ require Rails.root.join("lib", "gitlab", "backend", "grack_auth")
# GIT over SSH
require
Rails
.
root
.
join
(
"lib"
,
"gitlab"
,
"backend"
,
"shell"
)
# GitLab shell adapter
require
Rails
.
root
.
join
(
"lib"
,
"gitlab"
,
"backend"
,
"shell_adapter"
)
lib/git
olited
.rb
→
lib/git
lab/backend/shell_adapter
.rb
View file @
01033631
# == Git
olited
mixin
# == Git
Lab Shell
mixin
#
# Provide a shortcut to Gitlab::Shell instance by gitlab_shell
#
# Used by Project, UsersProject, etc
#
module
Gitolited
def
gitlab_shell
Gitlab
::
Shell
.
new
module
Gitlab
module
ShellAdapter
def
gitlab_shell
Gitlab
::
Shell
.
new
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment