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
edc7acbc
Commit
edc7acbc
authored
Mar 21, 2016
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added notify key url to GeoNode
parent
8a7a332a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
app/models/geo_node.rb
app/models/geo_node.rb
+4
-0
spec/models/geo_node_spec.rb
spec/models/geo_node_spec.rb
+8
-0
No files found.
app/models/geo_node.rb
View file @
edc7acbc
...
...
@@ -60,6 +60,10 @@ class GeoNode < ActiveRecord::Base
URI
.
join
(
uri
,
"
#{
uri
.
path
}
/"
,
"api/
#{
API
::
API
.
version
}
/geo/refresh_wikis"
).
to_s
end
def
notify_key_url
URI
.
join
(
uri
,
"
#{
uri
.
path
}
/"
,
"api/
#{
API
::
API
.
version
}
/geo/refresh_key"
).
to_s
end
def
oauth_callback_url
URI
.
join
(
uri
,
"
#{
uri
.
path
}
/"
,
'oauth/geo/callback'
).
to_s
end
...
...
spec/models/geo_node_spec.rb
View file @
edc7acbc
...
...
@@ -163,6 +163,14 @@ describe GeoNode, type: :model do
end
end
describe
'#notify_key_url'
do
let
(
:refresh_url
)
{
'https://localhost:3000/gitlab/api/v3/geo/refresh_key'
}
it
'returns api url based on node uri'
do
expect
(
new_node
.
notify_key_url
).
to
eq
(
refresh_url
)
end
end
describe
'#oauth_callback_url'
do
let
(
:oauth_callback_url
)
{
'https://localhost:3000/gitlab/oauth/geo/callback'
}
...
...
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