Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
elixir__file_system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bioroboticslab
robofish
electrofish
vendor
elixir__file_system
Commits
e00ef8ed
Unverified
Commit
e00ef8ed
authored
5 years ago
by
José Valim
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix Elixir warnings (#62)
parent
76e6a06e
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
config/config.exs
+1
-1
1 addition, 1 deletion
config/config.exs
lib/file_system/backends/fs_mac.ex
+1
-1
1 addition, 1 deletion
lib/file_system/backends/fs_mac.ex
mix.exs
+3
-3
3 additions, 3 deletions
mix.exs
test/file_system_test.exs
+1
-1
1 addition, 1 deletion
test/file_system_test.exs
with
6 additions
and
6 deletions
config/config.exs
+
1
−
1
View file @
e00ef8ed
use
Mix
.
Config
if
:test
==
Mix
.
env
do
if
:test
==
Mix
.
env
()
do
config
:logger
,
backends:
[]
end
This diff is collapsed.
Click to expand it.
lib/file_system/backends/fs_mac.ex
+
1
−
1
View file @
e00ef8ed
...
...
@@ -174,7 +174,7 @@ defmodule FileSystem.Backends.FSMac do
def
parse_line
(
line
)
do
[
_
,
_
,
events
,
path
]
=
line
|>
to_string
|>
String
.
split
([
"
\t
"
,
"="
],
parts:
4
)
{
path
,
events
|>
String
.
split
(
~w|[ , ]|
,
trim:
true
)
|>
Enum
.
map
(
&
String
.
to_existing_atom
/
1
)}
{
path
,
events
|>
String
.
split
(
[
"["
,
","
,
"]"
]
,
trim:
true
)
|>
Enum
.
map
(
&
String
.
to_existing_atom
/
1
)}
end
end
This diff is collapsed.
Click to expand it.
mix.exs
+
3
−
3
View file @
e00ef8ed
...
...
@@ -9,7 +9,7 @@ defmodule FileSystem.Mixfile do
description:
"A file system change watcher wrapper based on [fs](https://github.com/synrc/fs)"
,
source_url:
"https://github.com/falood/file_system"
,
package:
package
(),
compilers:
[
:file_system
|
Mix
.
compilers
],
compilers:
[
:file_system
|
Mix
.
compilers
()
],
aliases:
[
"compile.file_system"
:
&
file_system
/
1
],
docs:
[
extras:
[
"README.md"
],
...
...
@@ -31,7 +31,7 @@ defmodule FileSystem.Mixfile do
end
defp
file_system
(
_args
)
do
case
:os
.
type
do
case
:os
.
type
()
do
{
:unix
,
:darwin
}
->
compile_mac
()
_
->
:ok
end
...
...
@@ -45,7 +45,7 @@ defmodule FileSystem.Mixfile do
if
Mix
.
Utils
.
stale?
(
Path
.
wildcard
(
source
),
[
target
])
do
Logger
.
info
"Compiling file system watcher for Mac..."
cmd
=
"clang -framework CoreFoundation -framework CoreServices -Wno-deprecated-declarations
#{
source
}
-o
#{
target
}
"
if
Mix
.
shell
.
cmd
(
cmd
)
>
0
do
if
Mix
.
shell
()
.
cmd
(
cmd
)
>
0
do
Logger
.
error
"Could not compile file system watcher for Mac, try to run
#{
inspect
cmd
}
manually inside the dependency."
else
Logger
.
info
"Done."
...
...
This diff is collapsed.
Click to expand it.
test/file_system_test.exs
+
1
−
1
View file @
e00ef8ed
...
...
@@ -22,7 +22,7 @@ defmodule FileSystemTest do
File
.
touch
(
"
#{
tmp_dir
}
/b"
)
assert_receive
{
:file_event
,
^
pid
,
{
_path
,
_events
}},
5000
Port
.
list
Port
.
list
()
|>
Enum
.
reject
(
fn
port
->
:undefined
==
port
|>
Port
.
info
|>
Access
.
get
(
:os_pid
)
end
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment