Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
32c6576b
Verified
Commit
32c6576b
authored
May 31, 2020
by
Alexander Strizhakov
Browse files
naming
parent
e1603ac8
Pipeline
#27278
passed with stages
in 11 minutes and 59 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/config/config_db.ex
View file @
32c6576b
...
...
@@ -331,7 +331,7 @@ def string_to_elixir_types("~r" <> _pattern = regex) do
def
string_to_elixir_types
(
":"
<>
atom
),
do
:
String
.
to_atom
(
atom
)
def
string_to_elixir_types
(
value
)
do
if
is_
module_name?
(
value
)
do
if
module_name?
(
value
)
do
String
.
to_existing_atom
(
"Elixir."
<>
value
)
else
value
...
...
@@ -373,8 +373,8 @@ defp find_valid_delimiter([delimiter | others], pattern, regex_delimiter) do
end
end
@spec
is_
module_name?
(
String
.
t
())
::
boolean
()
def
is_
module_name?
(
string
)
do
@spec
module_name?
(
String
.
t
())
::
boolean
()
def
module_name?
(
string
)
do
Regex
.
match?
(
~r/^(Pleroma|Phoenix|Tesla|Quack|Ueberauth|Swoosh)\./
,
string
)
or
string
in
[
"Oban"
,
"Ueberauth"
,
"ExSyslogger"
]
end
...
...
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