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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
1c5cb538
Commit
1c5cb538
authored
Sep 24, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into stable
parents
6dd47c59
923eb89c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
18 deletions
+33
-18
app/views/events/_event_last_push.html.haml
app/views/events/_event_last_push.html.haml
+1
-1
config/initializers/4_resque.rb
config/initializers/4_resque.rb
+31
-0
config/initializers/4_resque_queues.rb
config/initializers/4_resque_queues.rb
+0
-1
config/initializers/resque_authentication.rb
config/initializers/resque_authentication.rb
+0
-14
config/initializers/resque_mailer.rb
config/initializers/resque_mailer.rb
+0
-1
features/steps/dashboard/dashboard.rb
features/steps/dashboard/dashboard.rb
+1
-1
No files found.
app/views/events/_event_last_push.html.haml
View file @
1c5cb538
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
.event_lp
.event_lp
%div
%div
=
image_tag
gravatar_icon
(
event
.
author_email
),
class:
"avatar"
=
image_tag
gravatar_icon
(
event
.
author_email
),
class:
"avatar"
%span
You
r
pushed to
%span
You pushed to
=
event
.
ref_type
=
event
.
ref_type
=
link_to
project_commits_path
(
event
.
project
,
ref:
event
.
ref_name
)
do
=
link_to
project_commits_path
(
event
.
project
,
ref:
event
.
ref_name
)
do
%strong
=
truncate
(
event
.
ref_name
,
length:
28
)
%strong
=
truncate
(
event
.
ref_name
,
length:
28
)
...
...
config/initializers/resque.rb
→
config/initializers/
4_
resque.rb
View file @
1c5cb538
# Custom Redis configuration
rails_root
=
ENV
[
'RAILS_ROOT'
]
||
File
.
dirname
(
__FILE__
)
+
'/../..'
rails_root
=
ENV
[
'RAILS_ROOT'
]
||
File
.
dirname
(
__FILE__
)
+
'/../..'
rails_env
=
ENV
[
'RAILS_ENV'
]
||
'development'
rails_env
=
ENV
[
'RAILS_ENV'
]
||
'development'
config_file
=
File
.
join
(
rails_root
,
'config'
,
'resque.yml'
)
config_file
=
File
.
join
(
rails_root
,
'config'
,
'resque.yml'
)
...
@@ -6,3 +7,25 @@ if File.exists?(config_file)
...
@@ -6,3 +7,25 @@ if File.exists?(config_file)
resque_config
=
YAML
.
load_file
(
config_file
)
resque_config
=
YAML
.
load_file
(
config_file
)
Resque
.
redis
=
resque_config
[
rails_env
]
Resque
.
redis
=
resque_config
[
rails_env
]
end
end
# Queues
Resque
.
watch_queue
(
PostReceive
.
instance_variable_get
(
"@queue"
))
# Authentication
require
'resque/server'
class
Authentication
def
initialize
(
app
)
@app
=
app
end
def
call
(
env
)
account
=
env
[
'warden'
].
authenticate!
(
:database_authenticatable
,
:rememberable
,
scope: :user
)
raise
"Access denied"
if
!
account
.
admin?
@app
.
call
(
env
)
end
end
Resque
::
Server
.
use
Authentication
# Mailer
Resque
::
Mailer
.
excluded_environments
=
[]
config/initializers/4_resque_queues.rb
deleted
100644 → 0
View file @
6dd47c59
Resque
.
watch_queue
(
PostReceive
.
instance_variable_get
(
"@queue"
))
config/initializers/resque_authentication.rb
deleted
100644 → 0
View file @
6dd47c59
require
'resque/server'
class
Authentication
def
initialize
(
app
)
@app
=
app
end
def
call
(
env
)
account
=
env
[
'warden'
].
authenticate!
(
:database_authenticatable
,
:rememberable
,
scope: :user
)
raise
"Access denied"
if
!
account
.
admin?
@app
.
call
(
env
)
end
end
Resque
::
Server
.
use
Authentication
\ No newline at end of file
config/initializers/resque_mailer.rb
deleted
100644 → 0
View file @
6dd47c59
Resque
::
Mailer
.
excluded_environments
=
[]
features/steps/dashboard/dashboard.rb
View file @
1c5cb538
...
@@ -16,7 +16,7 @@ class Dashboard < Spinach::FeatureSteps
...
@@ -16,7 +16,7 @@ class Dashboard < Spinach::FeatureSteps
end
end
Then
'I should see last push widget'
do
Then
'I should see last push widget'
do
page
.
should
have_content
"You
r
pushed to branch new_design"
page
.
should
have_content
"You pushed to branch new_design"
page
.
should
have_link
"Create Merge Request"
page
.
should
have_link
"Create Merge Request"
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