Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nginx-redirector
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eterfund
nginx-redirector
Commits
171292b9
You need to sign in or sign up before continuing.
Commit
171292b9
authored
Mar 15, 2022
by
Soldatoff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Поправил работу nginx-redirector-watch
parent
ace2b6e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
nginx-redirector.spec
.gear/nginx-redirector.spec
+1
-1
parser.py
redirector/utils/parser.py
+2
-2
No files found.
.gear/nginx-redirector.spec
View file @
171292b9
%define biname nginx-redirector
%define biname nginx-redirector
Name: nginx-redirector
Name: nginx-redirector
Version: 0.1.
5
Version: 0.1.
6
Release: alt1
Release: alt1
Summary: CLI-utility for building nginx redirects
Summary: CLI-utility for building nginx redirects
...
...
redirector/utils/parser.py
View file @
171292b9
...
@@ -101,7 +101,7 @@ class ConfigReader:
...
@@ -101,7 +101,7 @@ class ConfigReader:
for
project
in
data
.
get
(
"projects"
):
for
project
in
data
.
get
(
"projects"
):
map_path
=
project
.
get
(
"map"
)
map_path
=
project
.
get
(
"map"
)
abs_map_path
=
get_map_path
(
map_path
,
yaml_dir
)
abs_map_path
=
map_path
project_prefix
=
project
.
get
(
"prefix"
)
project_prefix
=
project
.
get
(
"prefix"
)
return_list
.
append
((
abs_map_path
,
project_prefix
))
return_list
.
append
((
abs_map_path
,
project_prefix
))
...
@@ -128,7 +128,7 @@ class ConfigReader:
...
@@ -128,7 +128,7 @@ class ConfigReader:
res_prefix
=
prefix
.
split
(
"/"
)[
-
1
]
# Last directory of map_path a project's name
res_prefix
=
prefix
.
split
(
"/"
)[
-
1
]
# Last directory of map_path a project's name
f
=
open
(
abs_
map_path
,
"r"
)
f
=
open
(
map_path
,
"r"
)
for
i
,
line
in
enumerate
(
f
):
for
i
,
line
in
enumerate
(
f
):
request_url
,
redirect_url
,
option
=
None
,
None
,
[]
request_url
,
redirect_url
,
option
=
None
,
None
,
[]
...
...
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