BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
16 additions
and
12 deletions
+16
-12
project.rb
app/models/project.rb
+1
-1
protected_branch.rb
app/models/protected_branch.rb
+1
-1
users_project.rb
app/models/users_project.rb
+1
-1
key_observer.rb
app/observers/key_observer.rb
+1
-1
project_transfer_service.rb
app/services/project_transfer_service.rb
+1
-1
gitlab_shell_worker.rb
app/workers/gitlab_shell_worker.rb
+1
-1
5_backend.rb
config/initializers/5_backend.rb
+3
-0
shell_adapter.rb
lib/gitlab/backend/shell_adapter.rb
+7
-6
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