mirror of
https://github.com/bonfire-networks/bonfire-app.git
synced 2024-05-15 07:32:42 +00:00
Switch to Untangle
This commit is contained in:
parent
b9274b6d51
commit
4af8fa19c2
4
.iex.exs
4
.iex.exs
|
@ -9,7 +9,7 @@ alias Bonfire.Social
|
|||
alias Bonfire.Common
|
||||
use Common.Utils
|
||||
import Bonfire.Me.Fake
|
||||
require Logger
|
||||
import Untangle
|
||||
|
||||
if module_enabled?(Bonfire.Common.Test.Interactive) && Mix.env() == :test do
|
||||
# to run tests from iex
|
||||
|
@ -27,6 +27,6 @@ if module_enabled?(Bonfire.Common.Test.Interactive) && Mix.env() == :test do
|
|||
Bonfire.Common.Test.Interactive.Helpers.ready
|
||||
|
||||
else
|
||||
Logger.info("IExWatchTests is not running")
|
||||
info("IExWatchTests is not running")
|
||||
end
|
||||
import_if_enabled Bonfire.Common.Test.Interactive.Helpers
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
erlang 25.0.2
|
||||
elixir 1.13.4-otp-25
|
||||
erlang 25.0.4
|
||||
elixir 1.14.0-otp-25
|
||||
|
|
|
@ -64,13 +64,13 @@ We also deal with a lot of functions that indicate failure by returning nil. `~>
|
|||
|
||||
`|>` and `~>` compose in the way you'd expect; i.e. a `~>` receiving an error tuple or nil will stop executing the rest of the chain of (mixed) pipes.
|
||||
|
||||
## Where
|
||||
## Untangle
|
||||
|
||||
`Where` provides replacements for the macros in Elixir's `Logger` module and the `IO.inspect` function to output code location information. The first argument will be `inspect`ed and the second (where provided) will be used as a label:
|
||||
`Untangle` provides replacements for the macros in Elixir's `Logger` module and the `IO.inspect` function to output code location information. The first argument will be `inspect`ed and the second (where provided) will be used as a label:
|
||||
|
||||
```
|
||||
iex(1)> import Where
|
||||
Where
|
||||
iex(1)> import Untangle
|
||||
Untangle
|
||||
iex(2)> debug(:no, "the answer is") # log at debug
|
||||
11:19:09.915 [debug] [iex:2] the answer is: :no
|
||||
:no
|
||||
|
@ -82,7 +82,7 @@ iex(3)> dump(%{a: :map}, "it") # inspect something on stdout
|
|||
When used in a code file, the location information becomes slightly more useful, e.g.:
|
||||
|
||||
```
|
||||
[lib/test_where.ex:15@Test.Where.example/2] Here's an empty list: []
|
||||
[lib/test_untangle.ex:15@Test.Untangle.example/2] Here's an empty list: []
|
||||
```
|
||||
|
||||
You may also notice from the iex output that it returns its first argument. This makes it ideal for
|
||||
|
|
|
@ -176,6 +176,6 @@
|
|||
| waffle | Apache 2.0 | 1.1.6 | https://hex.pm/packages/waffle |
|
||||
| wallaby | MIT | ~> 0.29.1 | https://hex.pm/packages/wallaby |
|
||||
| web_driver_client | MIT | ~> 0.2.0 | https://hex.pm/packages/web_driver_client |
|
||||
| where | Apache 2.0 | 0.1.0 | https://github.com/bonfire-networks/where |
|
||||
| where | Apache 2.0 | 0.1.0 | https://github.com/bonfire-networks/untangle |
|
||||
| zest | Apache 2.0 | 0.1.2 | https://hex.pm/packages/zest |
|
||||
|------------------------------|------------------------------------|------------|------------------------------------------------------------------|
|
||||
|
|
|
@ -169,6 +169,6 @@
|
|||
| verbs | MIT | 0.6.1 | https://github.com/shannonwells/verbs_ex |
|
||||
| voodoo | Undefined | 0.1.0 | https://github.com/bonfire-networks/voodoo |
|
||||
| waffle | Apache 2.0 | 1.1.6 | https://hex.pm/packages/waffle |
|
||||
| where | Apache 2.0 | 0.1.0 | https://github.com/bonfire-networks/where |
|
||||
| where | Apache 2.0 | 0.1.0 | https://github.com/bonfire-networks/untangle |
|
||||
| zest | Apache 2.0 | 0.1.2 | https://hex.pm/packages/zest |
|
||||
|------------------------------|------------------------------------|----------|------------------------------------------------------------------|
|
||||
|
|
|
@ -61,6 +61,8 @@ config :logger, :console,
|
|||
format: "$time $metadata[$level] $message\n",
|
||||
metadata: [:request_id]
|
||||
|
||||
config :elixir, :dbg_callback, {Untangle, :custom_dbg, []}
|
||||
|
||||
config :surface, :compiler,
|
||||
warn_on_undefined_props: false
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ pointers_ulid = "https://github.com/bonfire-networks/pointers_ulid#main"
|
|||
#twinkle_star = "https://github.com/bonfire-networks/twinkle_star"
|
||||
voodoo = "https://github.com/bonfire-networks/voodoo#main"
|
||||
bonfire_invite_links= "https://github.com/bonfire-networks/bonfire_invite_links#main"
|
||||
where = "https://github.com/bonfire-networks/where#main"
|
||||
untangle = "https://github.com/bonfire-networks/untangle#main"
|
||||
# ex_doc = "https://github.com/elixir-lang/ex_doc#main"
|
||||
|
||||
bonfire_editor_ck = "https://github.com/bonfire-networks/bonfire_editor_ck#main"
|
||||
|
|
|
@ -30,7 +30,7 @@ solid = "~> 0.13"
|
|||
makeup_elixir = "~> 0.16.0"
|
||||
# Testing
|
||||
floki = "~> 0.33"
|
||||
# where = "~> 0.1"
|
||||
# untangle = "~> 0.1"
|
||||
# Data Schemas
|
||||
# bonfire_data_access_control = "~> 0.1"
|
||||
# bonfire_data_activity_pub = "~> 0.1"
|
||||
|
|
|
@ -52,7 +52,7 @@ bonfire_data_assort = "https://github.com/bonfire-networks/bonfire_data_assort#m
|
|||
# surface = "https://github.com/surface-ui/surface"
|
||||
# surface_catalogue = "https://github.com/surface-ui/surface_catalogue" # Testing a UI component library
|
||||
bonfire_invite_links= "https://github.com/bonfire-networks/bonfire_invite_links#main"
|
||||
where = "https://github.com/bonfire-networks/where#main"
|
||||
untangle = "https://github.com/bonfire-networks/untangle#main"
|
||||
# ex_doc = "https://github.com/elixir-lang/ex_doc#main"
|
||||
|
||||
bonfire_editor_ck = "https://github.com/bonfire-networks/bonfire_editor_ck#main"
|
||||
|
|
|
@ -21,7 +21,7 @@ telemetry_metrics = "~> 0.6.1"
|
|||
telemetry_poller = "~> 1.0.0"
|
||||
# Testing
|
||||
floki = "~> 0.33"
|
||||
# where = "~> 0.1"
|
||||
# untangle = "~> 0.1"
|
||||
# Data Schemas
|
||||
# bonfire_data_access_control = "~> 0.1"
|
||||
# bonfire_data_activity_pub = "~> 0.1"
|
||||
|
|
|
@ -44,4 +44,4 @@ paginator = "https://github.com/bonfire-networks/paginator"
|
|||
bonfire_data_assort = "https://github.com/bonfire-networks/bonfire_data_assort"
|
||||
# surface_catalogue = "https://github.com/surface-ui/surface_catalogue" # Testing a UI component library
|
||||
bonfire_invite_links= "https://github.com/bonfire-networks/bonfire_invite_links#main"
|
||||
where = "https://github.com/bonfire-networks/where#main"
|
||||
untangle = "https://github.com/bonfire-networks/untangle#main"
|
||||
|
|
|
@ -44,7 +44,7 @@ ecto_sparkles = "https://github.com/bonfire-networks/ecto_sparkles#main"
|
|||
emote = "https://github.com/bonfire-networks/emote#master"
|
||||
paginator = "https://github.com/bonfire-networks/paginator#main"
|
||||
bonfire_invite_links= "https://github.com/bonfire-networks/bonfire_invite_links#main"
|
||||
where = "https://github.com/bonfire-networks/where#main"
|
||||
untangle = "https://github.com/bonfire-networks/untangle#main"
|
||||
# bonfire_data_assort = "https://github.com/bonfire-networks/bonfire_data_assort#master"
|
||||
|
||||
bonfire_editor_ck = "https://github.com/bonfire-networks/bonfire_editor_ck#main"
|
||||
|
|
|
@ -21,7 +21,7 @@ telemetry_metrics = "~> 0.6.1"
|
|||
telemetry_poller = "~> 1.0.0"
|
||||
# Testing
|
||||
floki = "~> 0.33"
|
||||
# where = "~> 0.1"
|
||||
# untangle = "~> 0.1"
|
||||
# Data Schemas
|
||||
# bonfire_data_access_control = "~> 0.1"
|
||||
# bonfire_data_activity_pub = "~> 0.1"
|
||||
|
|
|
@ -53,5 +53,5 @@ bonfire_invite_links= "https://github.com/bonfire-networks/bonfire_invite_links#
|
|||
bonfire_ui_common = "https://github.com/bonfire-networks/bonfire_ui_common#main"
|
||||
bonfire_ui_social = "https://github.com/bonfire-networks/bonfire_ui_social#main"
|
||||
# bonfire_ui_social = "https://gitlab.com/msoe.edu/sdl/y22sdl/sdl-upcycle/bonfire_ui_social#upcycle"
|
||||
where = "https://github.com/bonfire-networks/where#main"
|
||||
untangle = "https://github.com/bonfire-networks/untangle#main"
|
||||
bonfire_upcycle = "https://gitlab.com/bonfire-networks/bonfire_upcycle#main"
|
||||
|
|
|
@ -21,7 +21,7 @@ telemetry_metrics = "~> 0.6.1"
|
|||
telemetry_poller = "~> 1.0.0"
|
||||
# Testing
|
||||
floki = "~> 0.33"
|
||||
# where = "~> 0.1"
|
||||
# untangle = "~> 0.1"
|
||||
# Data Schemas
|
||||
# bonfire_data_access_control = "~> 0.1"
|
||||
# bonfire_data_activity_pub = "~> 0.1"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
defmodule Bonfire.ErrorReporting do
|
||||
@behaviour Plug
|
||||
import Where
|
||||
import Untangle
|
||||
|
||||
defmacro __using__(_) do
|
||||
quote do
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
defmodule Mix.Tasks.Bonfire.Dep.Compile do
|
||||
use Mix.Task
|
||||
import Where
|
||||
import Untangle
|
||||
|
||||
@shortdoc "Compiles dependencies"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
defmodule Mix.Tasks.Bonfire.Localise.Extract do
|
||||
use Mix.Task
|
||||
import Where
|
||||
import Untangle
|
||||
@recursive true
|
||||
|
||||
@shortdoc "Extracts translations from source code"
|
||||
|
|
|
@ -134,7 +134,7 @@ defmodule Bonfire.Web.Router do
|
|||
end
|
||||
defmodule Bonfire.Web.Router.Reverse do
|
||||
import Voodoo, only: [def_reverse_router: 2]
|
||||
# import Where
|
||||
# import Untangle
|
||||
def_reverse_router :path, for: Bonfire.Web.Router
|
||||
|
||||
# def path(_conn_or_socket_or_endpoint, name, _arg1) do
|
||||
|
|
Loading…
Reference in a new issue