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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
ab931ae4
Commit
ab931ae4
authored
Jan 30, 2018
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-01-30
parents
ef33f884
2d6a017d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
1 deletion
+29
-1
app/models/project_services/jira_service.rb
app/models/project_services/jira_service.rb
+1
-1
changelogs/unreleased/sh-fix-jira-trailing-slash.yml
changelogs/unreleased/sh-fix-jira-trailing-slash.yml
+5
-0
spec/models/project_services/jira_service_spec.rb
spec/models/project_services/jira_service_spec.rb
+23
-0
No files found.
app/models/project_services/jira_service.rb
View file @
ab931ae4
...
@@ -43,7 +43,7 @@ class JiraService < IssueTrackerService
...
@@ -43,7 +43,7 @@ class JiraService < IssueTrackerService
username:
self
.
username
,
username:
self
.
username
,
password:
self
.
password
,
password:
self
.
password
,
site:
URI
.
join
(
url
,
'/'
).
to_s
,
site:
URI
.
join
(
url
,
'/'
).
to_s
,
context_path:
url
.
path
,
context_path:
url
.
path
.
chomp
(
'/'
)
,
auth_type: :basic
,
auth_type: :basic
,
read_timeout:
120
,
read_timeout:
120
,
use_cookies:
true
,
use_cookies:
true
,
...
...
changelogs/unreleased/sh-fix-jira-trailing-slash.yml
0 → 100644
View file @
ab931ae4
---
title
:
Fix JIRA not working when a trailing slash is included
merge_request
:
author
:
type
:
fixed
spec/models/project_services/jira_service_spec.rb
View file @
ab931ae4
...
@@ -3,6 +3,29 @@ require 'spec_helper'
...
@@ -3,6 +3,29 @@ require 'spec_helper'
describe
JiraService
do
describe
JiraService
do
include
Gitlab
::
Routing
include
Gitlab
::
Routing
describe
'#options'
do
let
(
:service
)
do
described_class
.
new
(
project:
build_stubbed
(
:project
),
active:
true
,
username:
'username'
,
password:
'test'
,
jira_issue_transition_id:
24
,
url:
'http://jira.test.com/path/'
)
end
it
'sets the URL properly'
do
# jira-ruby gem parses the URI and handles trailing slashes
# fine: https://github.com/sumoheavy/jira-ruby/blob/v1.4.1/lib/jira/http_client.rb#L59
expect
(
service
.
options
[
:site
]).
to
eq
(
'http://jira.test.com/'
)
end
it
'leaves out trailing slashes in context'
do
expect
(
service
.
options
[
:context_path
]).
to
eq
(
'/path'
)
end
end
describe
"Associations"
do
describe
"Associations"
do
it
{
is_expected
.
to
belong_to
:project
}
it
{
is_expected
.
to
belong_to
:project
}
it
{
is_expected
.
to
have_one
:service_hook
}
it
{
is_expected
.
to
have_one
:service_hook
}
...
...
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