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
e322bdbd
Commit
e322bdbd
authored
Jan 27, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/test' of /mnt/ebs/repositories/jhworth.developer/gitlab-ce
parents
3713fc6c
39a2adf4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
9 deletions
+5
-9
app/mailers/notify.rb
app/mailers/notify.rb
+1
-1
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+3
-7
spec/models/project_spec.rb
spec/models/project_spec.rb
+1
-1
No files found.
app/mailers/notify.rb
View file @
e322bdbd
...
@@ -12,7 +12,7 @@ class Notify < ActionMailer::Base
...
@@ -12,7 +12,7 @@ class Notify < ActionMailer::Base
default_url_options
[
:host
]
=
Gitlab
.
config
.
gitlab
.
host
default_url_options
[
:host
]
=
Gitlab
.
config
.
gitlab
.
host
default_url_options
[
:protocol
]
=
Gitlab
.
config
.
gitlab
.
protocol
default_url_options
[
:protocol
]
=
Gitlab
.
config
.
gitlab
.
protocol
default_url_options
[
:port
]
=
Gitlab
.
config
.
gitlab
.
port
if
Gitlab
.
config
.
gitlab_on_n
on_standard_port?
default_url_options
[
:port
]
=
Gitlab
.
config
.
gitlab
.
port
unless
Gitlab
.
config
.
gitlab_
on_standard_port?
default_url_options
[
:script_name
]
=
Gitlab
.
config
.
gitlab
.
relative_url_root
default_url_options
[
:script_name
]
=
Gitlab
.
config
.
gitlab
.
relative_url_root
default
from:
Gitlab
.
config
.
gitlab
.
email_from
default
from:
Gitlab
.
config
.
gitlab
.
email_from
...
...
config/initializers/1_settings.rb
View file @
e322bdbd
...
@@ -3,8 +3,8 @@ class Settings < Settingslogic
...
@@ -3,8 +3,8 @@ class Settings < Settingslogic
namespace
Rails
.
env
namespace
Rails
.
env
class
<<
self
class
<<
self
def
gitlab_on_
non_
standard_port?
def
gitlab_on_standard_port?
!
[
443
,
80
].
include?
(
gitlab
.
port
.
to_i
)
gitlab
.
port
.
to_i
==
(
gitlab
.
https
?
443
:
80
)
end
end
private
private
...
@@ -18,11 +18,7 @@ class Settings < Settingslogic
...
@@ -18,11 +18,7 @@ class Settings < Settingslogic
end
end
def
build_gitlab_url
def
build_gitlab_url
if
gitlab_on_non_standard_port?
custom_port
=
gitlab_on_standard_port?
?
nil
:
":
#{
gitlab
.
port
}
"
custom_port
=
":
#{
gitlab
.
port
}
"
else
custom_port
=
nil
end
[
gitlab
.
protocol
,
[
gitlab
.
protocol
,
"://"
,
"://"
,
gitlab
.
host
,
gitlab
.
host
,
...
...
spec/models/project_spec.rb
View file @
e322bdbd
...
@@ -101,7 +101,7 @@ describe Project do
...
@@ -101,7 +101,7 @@ describe Project do
it
"returns the web URL without the protocol for this repo"
do
it
"returns the web URL without the protocol for this repo"
do
project
=
Project
.
new
(
path:
"somewhere"
)
project
=
Project
.
new
(
path:
"somewhere"
)
project
.
web_url_without_protocol
.
should
==
"
#{
Gitlab
.
config
.
gitlab
.
host
}
/somewhere"
project
.
web_url_without_protocol
.
should
==
"
#{
Gitlab
.
config
.
gitlab
.
url
.
split
(
"://"
)[
1
]
}
/somewhere"
end
end
describe
"last_activity methods"
do
describe
"last_activity methods"
do
...
...
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