Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
c7ab6e9e3fb2
Commit
c7ab6e9e
authored
Mar 21, 2013
by
Dmitriy Zaporozhets
Browse files
replace Gitolited mixin with Gitlab::ShellAdapter
parent
d540493f1555
Changes
9
Hide whitespace changes
Inline
Side-by-side
app/models/project.rb
View file @
c7ab6e9e
...
...
@@ -23,7 +23,7 @@
require
"grit"
class
Project
<
ActiveRecord
::
Base
include
Git
oli
te
d
include
Git
lab
::
ShellAdap
te
r
extend
Enumerize
class
TransferError
<
StandardError
;
end
...
...
app/models/protected_branch.rb
View file @
c7ab6e9e
...
...
@@ -10,7 +10,7 @@
#
class
ProtectedBranch
<
ActiveRecord
::
Base
include
Git
oli
te
d
include
Git
lab
::
ShellAdap
te
r
attr_accessible
:name
...
...
app/models/users_project.rb
View file @
c7ab6e9e
...
...
@@ -11,7 +11,7 @@
#
class
UsersProject
<
ActiveRecord
::
Base
include
Git
oli
te
d
include
Git
lab
::
ShellAdap
te
r
GUEST
=
10
REPORTER
=
20
...
...
app/observers/key_observer.rb
View file @
c7ab6e9e
class
KeyObserver
<
ActiveRecord
::
Observer
include
Git
oli
te
d
include
Git
lab
::
ShellAdap
te
r
def
after_save
(
key
)
GitlabShellWorker
.
perform_async
(
...
...
app/services/project_transfer_service.rb
View file @
c7ab6e9e
...
...
@@ -3,7 +3,7 @@
# Used for transfer project to another namespace
#
class
ProjectTransferService
include
Git
oli
te
d
include
Git
lab
::
ShellAdap
te
r
attr_accessor
:project
...
...
app/workers/gitlab_shell_worker.rb
View file @
c7ab6e9e
class
GitlabShellWorker
include
Sidekiq
::
Worker
include
Git
oli
te
d
include
Git
lab
::
ShellAdap
te
r
sidekiq_options
queue: :gitlab_shell
...
...
config/initializers/5_backend.rb
View file @
c7ab6e9e
...
...
@@ -3,3 +3,6 @@
# GIT over SSH
require
Rails
.
root
.
join
(
"lib"
,
"gitlab"
,
"backend"
,
"shell"
)
# GitLab shell adapter
require
Rails
.
root
.
join
(
"lib"
,
"gitlab"
,
"backend"
,
"shell_adapter"
)
lib/gitlab/backend/shell_adapter.rb
0 → 100644
View file @
c7ab6e9e
# == GitLab Shell mixin
#
# Provide a shortcut to Gitlab::Shell instance by gitlab_shell
#
module
Gitlab
module
ShellAdapter
def
gitlab_shell
Gitlab
::
Shell
.
new
end
end
end
lib/gitolited.rb
deleted
100644 → 0
View file @
d540493f
# == Gitolited mixin
#
# Provide a shortcut to Gitlab::Shell instance by gitlab_shell
#
# Used by Project, UsersProject, etc
#
module
Gitolited
def
gitlab_shell
Gitlab
::
Shell
.
new
end
end
Write
Preview
Supports
Markdown
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