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
Tatuya Kamada
gitlab-ce
Commits
c643b50d
Commit
c643b50d
authored
Feb 14, 2013
by
Andrew8xx8
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Default value for issues_tracker setting added
parent
9b606ede
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
+8
-4
app/models/project.rb
app/models/project.rb
+1
-1
config/gitlab.yml.example
config/gitlab.yml.example
+4
-1
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+2
-0
spec/helpers/issues_helper_spec.rb
spec/helpers/issues_helper_spec.rb
+1
-2
No files found.
app/models/project.rb
View file @
c643b50d
...
@@ -96,7 +96,7 @@ class Project < ActiveRecord::Base
...
@@ -96,7 +96,7 @@ class Project < ActiveRecord::Base
scope
:joined
,
->
(
user
)
{
where
(
"namespace_id != ?"
,
user
.
namespace_id
)
}
scope
:joined
,
->
(
user
)
{
where
(
"namespace_id != ?"
,
user
.
namespace_id
)
}
scope
:public_only
,
->
{
where
(
public:
true
)
}
scope
:public_only
,
->
{
where
(
public:
true
)
}
enumerize
:issues_tracker
,
:in
=>
(
Settings
[
:issues_tracker
]
.
keys
).
append
(
:gitlab
),
:default
=>
:gitlab
enumerize
:issues_tracker
,
:in
=>
(
Gitlab
.
config
.
issues_tracker
.
keys
).
append
(
:gitlab
),
:default
=>
:gitlab
class
<<
self
class
<<
self
def
abandoned
def
abandoned
...
...
config/gitlab.yml.example
View file @
c643b50d
...
@@ -143,7 +143,10 @@ development:
...
@@ -143,7 +143,10 @@ development:
<<: *defaults
<<: *defaults
test:
test:
<<: *base
<<: *defaults
issues_tracker:
redmine:
issues_url: "http://redmine/:project_id/:issues_tracker_id/:id"
staging:
staging:
<<: *defaults
<<: *defaults
config/initializers/1_settings.rb
View file @
c643b50d
...
@@ -42,6 +42,8 @@ Settings['omniauth'] ||= Settingslogic.new({})
...
@@ -42,6 +42,8 @@ Settings['omniauth'] ||= Settingslogic.new({})
Settings
.
omniauth
[
'enabled'
]
=
false
if
Settings
.
omniauth
[
'enabled'
].
nil?
Settings
.
omniauth
[
'enabled'
]
=
false
if
Settings
.
omniauth
[
'enabled'
].
nil?
Settings
.
omniauth
[
'providers'
]
||=
[]
Settings
.
omniauth
[
'providers'
]
||=
[]
Settings
[
'issues_tracker'
]
||=
{}
#
#
# GitLab
# GitLab
#
#
...
...
spec/helpers/issues_helper_spec.rb
View file @
c643b50d
...
@@ -25,7 +25,7 @@ describe IssuesHelper do
...
@@ -25,7 +25,7 @@ describe IssuesHelper do
describe
:url_for_issue
do
describe
:url_for_issue
do
let
(
:issue_id
)
{
3
}
let
(
:issue_id
)
{
3
}
let
(
:issues_url
)
{
"http://redmine/:project_id/:issues_tracker_id/:id"
}
let
(
:issues_url
)
{
Gitlab
.
config
.
issues_tracker
.
redmine
.
issues_url
}
let
(
:ext_expected
)
do
let
(
:ext_expected
)
do
issues_url
.
gsub
(
':id'
,
issue_id
.
to_s
)
issues_url
.
gsub
(
':id'
,
issue_id
.
to_s
)
.
gsub
(
':project_id'
,
ext_project
.
id
.
to_s
)
.
gsub
(
':project_id'
,
ext_project
.
id
.
to_s
)
...
@@ -40,7 +40,6 @@ describe IssuesHelper do
...
@@ -40,7 +40,6 @@ describe IssuesHelper do
it
"should return path to external tracker"
do
it
"should return path to external tracker"
do
@project
=
ext_project
@project
=
ext_project
Settings
[
:issues_tracker
][
ext_project
.
issues_tracker
][
"issues_url"
]
=
issues_url
url_for_issue
(
issue_id
).
should
match
(
ext_expected
)
url_for_issue
(
issue_id
).
should
match
(
ext_expected
)
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