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
b7fd7dae
Commit
b7fd7dae
authored
Feb 14, 2016
by
Kamil Trzcinski
Committed by
James Edwards-Jones
Jan 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rubocop complains
parent
d3b82848
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
13 deletions
+12
-13
app/controllers/projects/pages_controller.rb
app/controllers/projects/pages_controller.rb
+10
-11
app/models/pages_domain.rb
app/models/pages_domain.rb
+2
-2
No files found.
app/controllers/projects/pages_controller.rb
View file @
b7fd7dae
...
...
@@ -43,26 +43,25 @@ class Projects::PagesController < Projects::ApplicationController
end
end
def
destroy
@project
.
remove_pages
respond_to
do
|
format
|
format
.
html
{
redirect_to
project_path
(
@project
)
}
end
end
def
remove_pages
project
.
remove_pages
project
.
pages_domains
.
destroy_all
respond_to
do
|
format
|
format
.
html
do
redirect_to
(
namespace_project_pages_path
(
@project
.
namespace
,
@project
),
notice:
'Pages were removed'
)
end
end
end
private
def
pages_domain_params
params
.
require
(
:pages_domain
).
permit
(
:certificate
,
:key
,
:domain
:certificate
,
:key
,
:domain
)
end
...
...
app/models/pages_domain.rb
View file @
b7fd7dae
...
...
@@ -62,12 +62,12 @@ class PagesDomain < ActiveRecord::Base
def
expired?
return
false
unless
x509
current
=
Time
.
new
return
current
<
x509
.
not_before
||
x509
.
not_after
<
current
current
<
x509
.
not_before
||
x509
.
not_after
<
current
end
def
subject
return
unless
x509
return
x509
.
subject
.
to_s
x509
.
subject
.
to_s
end
def
certificate_text
...
...
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