commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 4.24k | new_contents stringlengths 1 5.44k | subject stringlengths 14 778 | message stringlengths 15 9.92k | lang stringclasses 277
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
493c23caf9bb6134f4038f6c0fd015b598d68bac | web/controllers/login_controller.ex | web/controllers/login_controller.ex | defmodule Officetournament.LoginController do
use Officetournament.Web, :controller
alias Officetournament.Login
plug :scrub_params, "login" when action in [:create, :update]
plug :action
def index(conn, _params) do
render(conn, "index.html")
end
def login(conn, %{"login" => %{"username" => userna... | defmodule Officetournament.LoginController do
use Officetournament.Web, :controller
alias Officetournament.Login
plug :scrub_params, "login" when action in [:create, :update]
plug :action
def index(conn, _params) do
render(conn, "index.html")
end
def login(conn, %{"login" => %{"username" => userna... | Use proper layout and status code | Use proper layout and status code
| Elixir | mit | X0nic/officetournament,X0nic/officetournament |
852675089229b8da88d7d0a97e095f7e6ad7c06a | lib/mix/tasks/block.ex | lib/mix/tasks/block.ex | defmodule Mix.Tasks.Doex.Block do
use Mix.Task
@shortdoc "Block the command line until a condition is met"
@moduledoc"""
Block the command line until a condition is met.
For example, block until an action is complete
mix doex.block actions 1234 complete
"""
def run(args), do: Doex.Cli.Main.ru... | defmodule Mix.Tasks.Doex.Block do
use Mix.Task
@shortdoc "Block the command line until a condition is met"
@moduledoc"""
Block the command line until a condition is met.
For example, block until an action is completed
mix doex.block actions 1234 completed
"""
def run(args), do: Doex.Cli.Main.... | Update action state to be completed (was missing the d) | Update action state to be completed (was missing the d)
| Elixir | mit | capbash/doex |
2bec9de9c668f249a0a0a6845bbe9dc50c56f5ae | apps/helix_account/config/test.exs | apps/helix_account/config/test.exs | use Mix.Config
config :comeonin, :bcrypt_log_rounds, 2
config :helix_account, Helix.Account.Repo,
pool: Ecto.Adapters.SQL.Sandbox,
size: 2,
username: System.get_env("HELIX_DB_USER") || "postgres",
password: System.get_env("HELIX_DB_PASS") || "postgres",
hostname: System.get_env("HELIX_DB_HOST") || "localhos... | use Mix.Config
config :comeonin, :bcrypt_log_rounds, 2
config :helix_account, Helix.Account.Repo,
pool: Ecto.Adapters.SQL.Sandbox,
database: "account_service_test" | Remove redundant config on account | Remove redundant config on account
| Elixir | agpl-3.0 | renatomassaro/Helix,renatomassaro/Helix,mememori/Helix,HackerExperience/Helix,HackerExperience/Helix |
d60ffa204e581ce456e72a0499a7b2e32f7a6736 | web/views/task_view.ex | web/views/task_view.ex | defmodule MyApp_802337.TaskView do
use MyApp_802337.Web, :view
def render("index.json", %{tasks: tasks}) do
%{data: render_many(tasks, "task.json")}
end
def render("show.json", %{task: task}) do
%{data: render_one(task, "task.json")}
end
def render("task.json", %{task: task}) do
%{id: task.id... | defmodule MyApp_802337.TaskView do
use MyApp_802337.Web, :view
def render("index.json", %{tasks: tasks}) do
%{data: render_many(tasks, "task.json")}
end
def render("show.json", %{task: task}) do
%{data: render_one(task, "task.json")}
end
def render("task.json", %{task: task}) do
%{id: task.id... | Add fields to the json view. | Add fields to the json view.
| Elixir | mit | wsmoak/my_app_802337 |
cf825bec6f3c23d3a0a01312cecc9f6eb1775f32 | lib/hound/ex_unit_helpers/session.ex | lib/hound/ex_unit_helpers/session.ex | defmodule Hound.ExUnitHelpers.Session do
@doc """
Adds ExUnit setup callback to create session and teardown callback to destroy session.
On creation of the session, you will have the hound connection information and session ID
available in the `meta` variable that ex_unit provides.
You can access it with t... | defmodule Hound.ExUnitHelpers.Session do
@doc """
Adds ExUnit setup callback to create session and teardown callback to destroy session.
On creation of the session, you will have the hound connection information and session ID
available in the `meta` variable that ex_unit provides.
You can access it with t... | Store hound info in a record | Store hound info in a record
| Elixir | mit | oivoodoo/hound,manukall/hound,esbullington/hound,manukall/hound,lowks/hound,HashNuke/hound,jontonsoup/hound,esbullington/hound,jontonsoup/hound,oivoodoo/hound,knewter/hound,lowks/hound,HashNuke/hound |
45a0f64397893616e845dc544f033235ac14e853 | lib/jumubase_web/views/layout_view.ex | lib/jumubase_web/views/layout_view.ex | defmodule JumubaseWeb.LayoutView do
use JumubaseWeb, :view
import JumubaseWeb.BreadcrumbHelpers
@doc """
Tells whether the given breadcrumb is active.
"""
def breadcrumb_active(conn, breadcrumb) do
breadcrumb[:path] === conn.request_path
end
end
| defmodule JumubaseWeb.LayoutView do
use JumubaseWeb, :view
import JumubaseWeb.BreadcrumbHelpers
@doc """
Tells whether the given breadcrumb is active.
"""
def breadcrumb_active(conn, breadcrumb) do
breadcrumb == List.last(conn.assigns.breadcrumbs)
end
end
| Simplify "is breadcrumb active" logic | Simplify "is breadcrumb active" logic
The last breadcrumb in the list is always the active one.
| Elixir | mit | richeterre/jumubase-phoenix,richeterre/jumubase-phoenix |
cfb375b81e1ded783c075eb9199d35b7f4699557 | assignments/elixir/word-count/word_count_test.exs | assignments/elixir/word-count/word_count_test.exs | Code.load_file("word-count.exs")
ExUnit.start
defmodule WordsTest do
use ExUnit.Case
test "count one word" do
assert Words.count("word") == HashDict.new [{ "word", 1 }]
end
test "count one of each" do
expected = HashDict.new [{ "one", 1 }, { "of", 1 }, { "each", 1 }]
assert Words.count("one of ea... | Code.load_file("word_count.exs")
ExUnit.start
defmodule WordsTest do
use ExUnit.Case
test "count one word" do
assert Words.count("word") == HashDict.new [{ "word", 1 }]
end
test "count one of each" do
expected = HashDict.new [{ "one", 1 }, { "of", 1 }, { "each", 1 }]
assert Words.count("one of ea... | Use underscore to require file in elixir/word-count | Use underscore to require file in elixir/word-count
| Elixir | mit | parkerl/xelixir,wobh/xelixir,Egogre/xelixir,victorlcampos/xelixir,exercism/xelixir,henrik/xelixir,tjcelaya/xelixir,montague/xelixir,cezarykosko/xelixir,elasticdog/xelixir |
f57fe7230b6c5a894c07559367252aff5a0ed913 | web/views/user_view.ex | web/views/user_view.ex | defmodule MicoseBackend.UserView do
use MicoseBackend.Web, :view
def render("index.json", %{users: users}) do
%{data: render_many(users, MicoseBackend.UserView, "user.json")}
end
def render("show.json", %{user: user}) do
%{data: render_one(user, MicoseBackend.UserView, "user.json")}
end
def rende... | defmodule MicoseBackend.UserView do
use MicoseBackend.Web, :view
def render("index.json", %{users: users}) do
%{data: render_many(users, MicoseBackend.UserView, "user.json")}
end
def render("show.json", %{user: user}) do
%{data: render_one(user, MicoseBackend.UserView, "user.json")}
end
def rende... | Fix user view for nullable borrower. | Fix user view for nullable borrower.
| Elixir | apache-2.0 | manchaques/micose-backend,manchaques/micose-backend |
4a2b7a333671cc8ab7e61a623b829aabddfa8bb1 | lib/battle_snake/game_server_config.ex | lib/battle_snake/game_server_config.ex | defmodule BattleSnake.GameServerConfig do
alias BattleSnake.{
GameServer,
World,
GameForm,
WorldMovement,
}
@moduledoc """
Take a game's configuration from the game-form, and returns a new game server
state for it.
"""
@doc """
How to start the game given an id.
"""
def reset(game_... | defmodule BattleSnake.GameServerConfig do
alias BattleSnake.{
GameServer,
World,
GameForm,
WorldMovement,
}
@moduledoc """
Take a game's configuration from the game-form, and returns a new game server
state for it.
"""
@doc """
How to start the game given an id.
"""
def reset(game_... | Save winners when game completes. | Save winners when game completes.
| Elixir | agpl-3.0 | Dkendal/battle_snake,Dkendal/battle_snake,Dkendal/battle_snake,Dkendal/battle_snake,Dkendal/battle_snake |
375ae8a6b0aeaec3b61cc43c7995e9bd0e3a77f8 | lib/course_planner/offered_courses.ex | lib/course_planner/offered_courses.ex | defmodule CoursePlanner.OfferedCourses do
@moduledoc false
alias CoursePlanner.{OfferedCourse, Repo}
import Ecto.Query
def find_by_term_id(term_id) do
Repo.all(
from oc in OfferedCourse,
where: oc.term_id == ^term_id,
select: {oc.id, oc},
preload: [:course, :students])
|> Enum.... | defmodule CoursePlanner.OfferedCourses do
@moduledoc false
alias CoursePlanner.{OfferedCourse, Repo}
import Ecto.Query
def find_by_term_id(term_id) do
term_id
|> query_by_term_id()
|> select([oc], {oc.id, oc})
|> preload([:course, :students])
|> Repo.all()
|> Enum.into(%{})
end
de... | Refactor query to clean credo issues | Refactor query to clean credo issues
| Elixir | mit | digitalnatives/course_planner,digitalnatives/course_planner,digitalnatives/course_planner |
35a7d0d9caae83efdbf1152de5145b82a07e5363 | test/fixtures/example_app/mix.exs | test/fixtures/example_app/mix.exs | defmodule Test.Mixfile do
use Mix.Project
def project do
[ app: :test,
version: "0.0.1",
deps: deps ]
end
# Configuration for the OTP application
def application do
[mod: { Test, [] },
applications: [:fake_project]]
end
# Returns the list of dependencies in the format:
# { :f... | defmodule Test.Mixfile do
use Mix.Project
def project do
[ app: :test,
version: "0.0.1",
deps: deps ]
end
# Configuration for the OTP application
def application do
[mod: { Test, [] },
applications: [:fake_project]]
end
# Returns the list of dependencies in the format:
# { :f... | Use master of conform_exrm for tests | Use master of conform_exrm for tests
| Elixir | mit | coonce/exrm,bitwalker/exrm,appunite/exrm,GalaxyGorilla/exrm |
8d234f09b4837d45f12fda6f184ba6c24ae70c53 | lib/pact_elixir/mock_server/mock_server_supervisor.ex | lib/pact_elixir/mock_server/mock_server_supervisor.ex | defmodule PactElixir.MockServerSupervisor do
@moduledoc """
Supervises PactMockServers so that they can be controlled even
after the test suite has finished. The Supervisor does not restart
a failed PactMockServer as the information like successful
requests is stored only there and therefor lost.
"""
... | defmodule PactElixir.MockServerSupervisor do
@moduledoc """
Supervises PactMockServers so that they can be controlled even
after the test suite has finished. The Supervisor does not restart
a failed PactMockServer as the information like successful
requests is stored only there and therefor lost.
"""
use... | Return just an error atom | Return just an error atom | Elixir | mit | elitau/pact_elixir |
96a584b59edabb4e03f68d383302698b39d61985 | examples/SimpleChat/lib/helpers/Room.ex | examples/SimpleChat/lib/helpers/Room.ex | defmodule Room do
use GenServer.Behaviour
import Weber.Session
def start_link() do
:gen_server.start_link({:local, :room}, __MODULE__, [], [])
end
def init([]) do
{:ok, []}
end
def handle_cast({:new_user, pid}, state) do
{:noreply, [pid | state] }
end
def handle_cast({:delete_user, pi... | defmodule Room do
use GenServer.Behaviour
import Weber.Session
def start_link() do
:gen_server.start_link({:local, :room}, __MODULE__, [], [])
end
def init([]) do
{:ok, []}
end
def handle_cast({:new_user, pid}, state) do
{:noreply, [pid | state] }
end
def handle_cast({:delete_user, pi... | Fix bug example/SimpleChat can't be launched on elixir 0.12.4 | Fix bug example/SimpleChat can't be launched on elixir 0.12.4
| Elixir | mit | elixir-web/weber,mozillo/weber,elixir-web/weber,mozillo/weber |
d7f114df8ae60a9433f91c44588ed51b26d0077a | lib/erlef_web/views/working_group_view.ex | lib/erlef_web/views/working_group_view.ex | defmodule ErlefWeb.WorkingGroupView do
use ErlefWeb, :view
def content("embedded-systems") do
[
{"BEAM on the Embedded Landscape 2020", "landscape"}
]
end
def content(_), do: nil
end
| defmodule ErlefWeb.WorkingGroupView do
use ErlefWeb, :view
def content(slug) when slug in ["embedded", "embedded-systems"] do
[
{"BEAM on the Embedded Landscape 2020", "landscape"}
]
end
def content(_), do: nil
end
| Adjust static content helper clause to match on embedded/embedded-systems | Adjust static content helper clause to match on embedded/embedded-systems
| Elixir | apache-2.0 | simplabs/website,simplabs/website |
b9ad24f50dbca8d1bab15a61f0949b6e1175cd79 | lib/env.ex | lib/env.ex | defmodule Env do
Env.Compiler.generate
end
defmodule Env.Compiler do
@moduledoc false
def generate do
quote do
@moduledoc """
Provides functions for obtaining information about Elixir runtime.
"""
@doc """
Returns a tuple { Elixir version, commit sha-1, build date }
"""
... | defmodule Env.Compiler do
@moduledoc false
defmacro generate do
quote do
@moduledoc """
Provides functions for obtaining information about Elixir runtime.
"""
@doc """
Returns a tuple { Elixir version, commit sha-1, build date }
"""
def version do
{ Code.versi... | Fix Env issue. It works now | Fix Env issue. It works now
| Elixir | apache-2.0 | kelvinst/elixir,beedub/elixir,antipax/elixir,michalmuskala/elixir,lexmag/elixir,pedrosnk/elixir,beedub/elixir,kimshrier/elixir,kimshrier/elixir,gfvcastro/elixir,ggcampinho/elixir,kelvinst/elixir,ggcampinho/elixir,lexmag/elixir,pedrosnk/elixir,elixir-lang/elixir,gfvcastro/elixir,antipax/elixir,joshprice/elixir |
29c92710042e5766dca4875920e2be3d415e9b4f | bench/lib/proto_bench.ex | bench/lib/proto_bench.ex | defmodule ProtoBench do
def load(pb_path) do
bin = File.read!(pb_path)
Benchmarks.BenchmarkDataset.decode(bin)
end
def mod_name("benchmarks.proto2.GoogleMessage1"), do: Benchmarks.Proto2.GoogleMessage1
def mod_name("benchmarks.proto3.GoogleMessage1"), do: Benchmarks.Proto3.GoogleMessage1
def mod_name... | defmodule ProtoBench do
def load(pb_path) do
pb_path
|> File.read!()
|> Benchmarks.BenchmarkDataset.decode()
end
def mod_name(name) do
name
|> String.split(".")
|> Enum.map(&Macro.camelize/1)
|> Module.safe_concat()
end
end
| Generalize ProtoBench to load any dataset | Generalize ProtoBench to load any dataset
| Elixir | mit | tony612/protobuf-elixir |
26864d2c5adca47a58ded0bead15b29dd15d5d3e | nerves.exs | nerves.exs | use Mix.Config
version =
Path.join(__DIR__, "VERSION")
|> File.read!
|> String.strip
config :nerves_system_nanopi_neo, :nerves_env,
type: :system,
version: version,
compiler: :nerves_package,
artifact_url: ["https://github.com/dhanson358/nerves_system_nanopi_neo/releases/download/v0.0.14a/nerves_system_... | use Mix.Config
version =
Path.join(__DIR__, "VERSION")
|> File.read!
|> String.strip
config :nerves_system_nanopi_neo, :nerves_env,
type: :system,
version: version,
compiler: :nerves_package,
artifact_url: ["https://github.com/dhanson358/nerves_system_nanopi_neo/releases/download/v0.0.15/nerves_system_n... | Use system with non-module Wifi USB | Use system with non-module Wifi USB
| Elixir | apache-2.0 | dhanson358/nerves_system_nanopi_neo,troygnichols/nerves_system_nanopi_neo |
ae0f86adad962a0315972897467efbc5fd16a175 | lib/tasks/end_to_end.ex | lib/tasks/end_to_end.ex | defmodule Mix.Tasks.EndToEnd do
use Mix.Task
@shortdoc "Runs end-to-end tests"
def run(_) do
compile_js()
IO.puts("\n#{IO.ANSI.green()}Executing end-to-end tests...#{IO.ANSI.reset()}\n")
IO.puts("\tNote: browser logs will be written to `browser_logs.log`\n")
System.cmd(
"mix",
["test... | defmodule Mix.Tasks.EndToEnd do
use Mix.Task
@shortdoc "Runs end-to-end tests"
def run(_) do
chrome_outdated?()
compile_js()
IO.puts("\n#{IO.ANSI.green()}Executing end-to-end tests...#{IO.ANSI.reset()}\n")
IO.puts("\tNote: browser logs will be written to `browser_logs.log`\n")
System.cmd(
... | Print warning to stdout when chromedriver is outdated | Print warning to stdout when chromedriver is outdated
- Uses npm outdated -g to check if chrome is outdated
| Elixir | mit | stride-nyc/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro |
eaf0af99908bbd9a2756fd51d5b8af91f0cc65a3 | vivaldi/test/peer_b.exs | vivaldi/test/peer_b.exs | Node.start :"b@127.0.0.1"
Node.set_cookie :"hide_and_seek"
:global.register_name(:"b-ping-server", self)
:timer.sleep(10000 * 1000)
| Node.start :"b@127.0.0.1"
Node.set_cookie :"hide_and_seek"
:global.register_name(:"b-ping-server", self)
:timer.sleep(10000)
| Change ridiculous timeout value inserted during debugging :) | Change ridiculous timeout value inserted during debugging :)
| Elixir | mit | pixyj/vivaldi,pixyj/vivaldi |
8e1a2de9a6468bd5ef921b0ee86083f5240136b6 | web/controllers/auth_controller.ex | web/controllers/auth_controller.ex | defmodule OAuth2Example.AuthController do
use OAuth2Example.Web, :controller
plug :action
@doc """
This action is reached via `/auth` and redirects to the OAuth2 provider
based on the chosen strategy.
"""
def index(conn, _params) do
redirect conn, external: Fitbit.authorize_url!
end
@doc """
... | defmodule OAuth2Example.AuthController do
use OAuth2Example.Web, :controller
plug :action
@doc """
This action is reached via `/auth` and redirects to the OAuth2 provider
based on the chosen strategy.
"""
def index(conn, _params) do
redirect conn, external: Fitbit.authorize_url! [{:scope, "sleep set... | Include required scope parameter in the authorize url | Include required scope parameter in the authorize url
| Elixir | mit | wsmoak/phoenix_oauth2_example |
2dec4be352214e6b00993da7d35f3abaa353b5ec | installer/templates/new/mix.exs | installer/templates/new/mix.exs | defmodule <%= application_module %>.Mixfile do
use Mix.Project
def project do
[app: :<%= application_name %>,
version: "0.0.1",<%= if in_umbrella do %>
deps_path: "../../deps",
lockfile: "../../mix.lock",<% end %>
elixir: "~> 1.0",
elixirc_paths: elixirc_paths(Mix.env),
compilers:... | defmodule <%= application_module %>.Mixfile do
use Mix.Project
def project do
[app: :<%= application_name %>,
version: "0.0.1",<%= if in_umbrella do %>
deps_path: "../../deps",
lockfile: "../../mix.lock",<% end %>
elixir: "~> 1.0",
elixirc_paths: elixirc_paths(Mix.env),
compilers:... | Add only dev to live_reload dependency | Add only dev to live_reload dependency | Elixir | mit | StevenNunez/phoenix,iStefo/phoenix,Kosmas/phoenix,CD1212/phoenix,phoenixframework/phoenix,iStefo/phoenix,seejee/phoenix,nickgartmann/phoenix,milafrerichs/phoenix,yoavlt/phoenix,hotvulcan/phoenix,dmarkow/phoenix,keathley/phoenix,manukall/phoenix,jamilabreu/phoenix,daytonn/phoenix,KazuCocoa/phoenix,rafbgarcia/phoenix,eva... |
4ea7e2eee4a2f61124d7269ec5e6561471907a96 | installer/templates/phx_umbrella/mix.exs | installer/templates/phx_umbrella/mix.exs | defmodule <%= root_app_module %>.MixProject do
use Mix.Project
def project do
[
apps_path: "apps",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Dependencies can be Hex packages:
#
# {:mydep, "~> 0.3.0"}
#
# Or git/path repositories:
#
# {:mydep, git: "htt... | defmodule <%= root_app_module %>.MixProject do
use Mix.Project
def project do
[
apps_path: "apps",
version: "0.1.0",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Dependencies can be Hex packages:
#
# {:mydep, "~> 0.3.0"}
#
# Or git/path repositories:
#
... | Add version to umbrellas (mirror Elixir master) | Add version to umbrellas (mirror Elixir master)
| Elixir | mit | 0x00evil/phoenix,dmarkow/phoenix,mitchellhenke/phoenix,0x00evil/phoenix,keathley/phoenix,0x00evil/phoenix,michalmuskala/phoenix,Joe-noh/phoenix,phoenixframework/phoenix,nshafer/phoenix,Gazler/phoenix,Gazler/phoenix,eksperimental/phoenix,eksperimental/phoenix,optikfluffel/phoenix,rafbgarcia/phoenix,dmarkow/phoenix,keath... |
cad0b2b3f713cf442a062d52ff9e904a4d0b5d61 | lib/farmbot/celery_script/ast/node/install_farmware.ex | lib/farmbot/celery_script/ast/node/install_farmware.ex | defmodule Farmbot.CeleryScript.AST.Node.InstallFarmware do
@moduledoc false
use Farmbot.CeleryScript.AST.Node
allow_args [:url]
def execute(%{url: url}, _, env) do
env = mutate_env(env)
case Farmbot.Farmware.Installer.install(url) do
{:ok, _} -> {:ok, env}
{:error, reason} -> {:error, reaso... | defmodule Farmbot.CeleryScript.AST.Node.InstallFarmware do
@moduledoc false
use Farmbot.CeleryScript.AST.Node
allow_args [:url]
def execute(%{url: url}, _, env) do
env = mutate_env(env)
case Farmbot.Farmware.Installer.install(url) do
:ok -> {:ok, env}
{:error, reason} -> {:error, reason, en... | Fix bad case clause for farmware installation | Fix bad case clause for farmware installation
| Elixir | mit | FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os |
2fbc1cce392593494d41d36f0239f290491e3312 | lib/ex_ncurses/server.ex | lib/ex_ncurses/server.ex | defmodule ExNcurses.Server do
use GenServer
alias ExNcurses.Nif
defmodule State do
defstruct pid: nil
end
def start_link(args) do
GenServer.start_link(__MODULE__, args, name: __MODULE__)
end
def invoke(name, args \\ {}) do
GenServer.call(__MODULE__, {:invoke, name, args})
end
def liste... | defmodule ExNcurses.Server do
use GenServer
alias ExNcurses.Nif
defmodule State do
defstruct pid: nil
end
def start_link(args) do
GenServer.start_link(__MODULE__, args, name: __MODULE__)
end
def invoke(name, args \\ {}) do
GenServer.call(__MODULE__, {:invoke, name, args})
end
def liste... | Call stop when done listening | Call stop when done listening
| Elixir | mit | jfreeze/ex_ncurses,jfreeze/ex_ncurses |
c27c2592e6c20370833fa1c8984c1b42a7def315 | lib/react_phoenix/react_io/path_finder.ex | lib/react_phoenix/react_io/path_finder.ex | defmodule ReactPhoenix.ReactIo.PathFinder do
@moduledoc false
@phoenix_1_3_react_stdio_path Path.join(~w(.. .. assets node_modules .bin react-stdio))
@phoenix_1_2_react_stdio_path Path.join(~w(.. .. node_modules .bin react-stdio))
@local_react_stdio_path Path.join(~w(node_modules .bin react-stdio))
def react... | defmodule ReactPhoenix.ReactIo.PathFinder do
@moduledoc false
@app_dir File.cwd!
@phoenix_1_3_react_stdio_path Path.join(~w(#{@app_dir} assets node_modules .bin react-stdio))
@phoenix_1_2_react_stdio_path Path.join(~w(#{@app_dir} node_modules .bin react-stdio))
@local_react_stdio_path Path.join(~w(node_module... | Use @app_dir when searching for path | Use @app_dir when searching for path
| Elixir | mit | geolessel/react-phoenix |
d76cc0c77732b36b13a819370323771d549b203c | api/lib/core/core_properties_atomizing.ex | api/lib/core/core_properties_atomizing.ex | defmodule Core.CorePropertiesAtomizing do
import Core.Utils
@core_properties [:groups, :relations, :shortDescription, :id, :type, :category, :identifier, :geometry, :gazId,
:georeference, :parentId, :grandparentId]
def get_core_properties(), do: @core_properties
@doc """
Takes a document and changes m... | defmodule Core.CorePropertiesAtomizing do
import Core.Utils
@core_properties [:groups, :relations, :shortDescription, :id, :type, :category, :identifier, :geometry, :gazId,
:georeference, :parentId, :grandparentId]
def get_core_properties(), do: @core_properties
@doc """
Takes a document and changes ma... | Fix Core.CorePropertiesAtomizing.update_relations for empty documents of deletion changes | Fix Core.CorePropertiesAtomizing.update_relations for empty documents of deletion changes
| Elixir | apache-2.0 | dainst/idai-field-web,dainst/idai-field-web,dainst/idai-field-web |
36ee5703b43eec2dfed3b77c33cec7e46a75d204 | trial_server/lib/trial_server/udp.ex | trial_server/lib/trial_server/udp.ex | defmodule TrialServer.UDP do
require Logger
def accept() do
Process.flag(:trap_exit, true)
port = Application.get_env(:trial_server, :port)
{:ok, socket} = :gen_udp.open(port, [:binary, active: true])
Logger.info "Listening on udp port #{port}"
serve(socket)
end
defp serve(socket) do
... | defmodule TrialServer.UDP do
require Logger
def accept() do
Process.flag(:trap_exit, true)
port = Application.get_env(:trial_server, :port)
{:ok, socket} = :gen_udp.open(port, [:binary, active: true])
Logger.info "Listening on udp port #{port}"
serve(socket)
end
defp serve(socket) do
... | Switch to task receive messages | Switch to task receive messages
| Elixir | mit | SteffenBauer/mia_elixir,SteffenBauer/mia_elixir |
0dc71811550579a2d19012d06b15315e7afb8c8f | 2016/Main/H/Elixir/solution_1.exs | 2016/Main/H/Elixir/solution_1.exs | vowels? = fn c -> Enum.member?(["a", "e", "i", "o", "u"], c) end
palindrome? = fn list ->
reversed = list |> Enum.reverse
list == reversed
end
laugh = IO.read(:line) |> String.trim
if laugh
|> String.graphemes
|> Enum.filter(vowels?)
|> palindrome?.()
do
IO.puts "S"
else
IO.puts "N"
end
| vowel? = fn c -> Enum.member?(["a", "e", "i", "o", "u"], c) end
palindrome? = fn list ->
reversed = list |> Enum.reverse
list == reversed
end
laugh = IO.read(:line) |> String.trim
if laugh
|> String.graphemes
|> Enum.filter(vowel?)
|> palindrome?.()
do
IO.puts "S"
else
IO.puts "N"
end
| Fix typo in Elixir 2016 H | Fix typo in Elixir 2016 H
| Elixir | mit | DestructHub/bcs-contest,DestructHub/bcs-contest |
dec4ee8169a0e6eb6f320cd29e27a5a18588d9aa | installer/templates/new/mix.exs | installer/templates/new/mix.exs | defmodule <%= application_module %>.Mixfile do
use Mix.Project
def project do
[app: :<%= application_name %>,
version: "0.0.1",<%= if in_umbrella do %>
deps_path: "../../deps",
lockfile: "../../mix.lock",<% end %>
elixir: "~> 1.0",
elixirc_paths: ["lib", "web"],
compilers: [:phoen... | defmodule <%= application_module %>.Mixfile do
use Mix.Project
def project do
[app: :<%= application_name %>,
version: "0.0.1",<%= if in_umbrella do %>
deps_path: "../../deps",
lockfile: "../../mix.lock",<% end %>
elixir: "~> 1.0",
elixirc_paths: ["lib", "web"],
compilers: [:phoen... | Add some dependencies to build by exrm | Add some dependencies to build by exrm
| Elixir | mit | Ben-Evolently/phoenix,stevedomin/phoenix,javimolla/phoenix,begleynk/phoenix,brucify/phoenix,mschae/phoenix,Rumel/phoenix,mvidaurre/phoenix,dmarkow/phoenix,xtity/simple_phoenix,nickgartmann/phoenix,jamilabreu/phoenix,kevinold/phoenix,ericmj/phoenix,cas27/phoenix,SmartCasual/phoenix,foxnewsnetwork/phoenix,hotvulcan/phoen... |
b1a53761b616ce3175ef8c46ff3c4ce200d74979 | lib/pogo/release.ex | lib/pogo/release.ex | defmodule Pogo.Release do
defmacro __using__(_) do
quote do
@after_bundle :pogo_write_script!
def include_elixir?, do: true
def include_erts?, do: true
def default_release?, do: false
def include_start_clean?, do: true
def pogo_write_script!(options) do
app = name(op... | defmodule Pogo.Release do
defmacro __using__(_) do
quote do
@after_bundle :pogo_write_script!
def include_elixir?, do: true
def include_erts?, do: true
def default_release?, do: false
def include_start_clean?, do: true
def pogo_write_script!(options) do
app = name(op... | Fix chmod on the genereted script | Fix chmod on the genereted script
| Elixir | mit | mtwilliams/pogo,onkel-dirtus/pogo |
4b8c62f91f6cb3a2bd7842691c7e0a3da7824b4f | lib/mix/tasks/dogma.ex | lib/mix/tasks/dogma.ex | defmodule Mix.Tasks.Dogma do
use Mix.Task
@shortdoc "Check Elixir source files for style violations"
@moduledoc @shortdoc
alias Dogma.Config
alias Dogma.Formatter
def run(argv) do
{dir, formatter} = argv |> parse_args
config = Config.build
dir
|> Dogma.run(config, formatter)
|> any_... | defmodule Mix.Tasks.Dogma do
use Mix.Task
@shortdoc "Check Elixir source files for style violations"
@moduledoc @shortdoc
alias Dogma.Config
alias Dogma.Formatter
def run(argv) do
{dir, formatter, noerrors} = argv |> parse_args
config = Config.build
dir
|> Dogma.run(config, formatter)
... | Allow disabling the unix exit code via `--noerrors` | Allow disabling the unix exit code via `--noerrors`
This is useful when using linting as part of a CI pipeline which would
otherwise stop when an exit code other than `0` is returned, while one
is only interested in the text results of the linter.
| Elixir | mit | 5thWall/dogma |
47cc7787f74b6998724713980c182e46fb1ce73b | lib/ex_twilio/resources/connect_app.ex | lib/ex_twilio/resources/connect_app.ex | defmodule ExTwilio.ConnectApp do
@moduledoc """
Represents an ConnectApp resource in the Twilio API.
- [Twilio docs](https://www.twilio.com/docs/api/rest/connect-apps)
"""
defstruct sid: nil,
date_created: nil,
date_updated: nil,
account_sid: nil,
permissions:... | defmodule ExTwilio.ConnectApp do
@moduledoc """
Represents an ConnectApp resource in the Twilio API.
- [Twilio docs](https://www.twilio.com/docs/iam/connect-apps/api)
"""
defstruct sid: nil,
date_created: nil,
date_updated: nil,
account_sid: nil,
permissions: ... | Update redirect link to ConnectApp API | Update redirect link to ConnectApp API
| Elixir | mit | danielberkompas/ex_twilio,danielberkompas/ex_twilio |
ec0c35de9dece77004074cd20ffc12153081e854 | mix.exs | mix.exs | defmodule BeamieBot.Mixfile do
use Mix.Project
def project do
[
app: :beamie_bot,
version: "0.5.0",
elixir: ">= 0.14.1 and < 2.0.0",
deps: deps
]
end
def application do
[
mod: {BeamieBot, []},
applications: [:logger, :inets, :crypto, :ssl, :chatty]
]
end
... | defmodule BeamieBot.Mixfile do
use Mix.Project
def project do
[
app: :beamie_bot,
version: "0.6.0",
elixir: "~> 1.0",
deps: deps
]
end
def application do
[
mod: {BeamieBot, []},
applications: [:logger, :inets, :crypto, :ssl, :chatty]
]
end
defp deps do
... | Update project version and Elixir version requirement | Update project version and Elixir version requirement
| Elixir | mit | alco/beamie_bot |
22b6c29894a0f93b4ac5200dc362336b6a58d284 | lib/gittp/commit.ex | lib/gittp/commit.ex | defmodule Gittp.Commit do
defstruct content: "", checksum: "", path: "", commit_message: "", author: "system <system@gittp>"
require Logger
def from(%{"path" => path, "content" => content, "commit_message" => commit_message} = params) do
commit = %Gittp.Commit{path: path, content: content, commit_... | defmodule Gittp.Commit do
defstruct content: "", checksum: "", path: "", commit_message: "", author: "system <system@gittp>"
require Logger
def from(%{"path" => path, "content" => content, "commit_message" => commit_message} = params) do
commit = %Gittp.Commit{path: path, content: content, commit_... | Fix checksum ingestion on POST update | Fix checksum ingestion on POST update
| Elixir | mit | Soluto/gittp,itaym2/gittp,Soluto/gittp,itaym2/gittp,Soluto/gittp |
ca760ef5a6a20424901f6c7d548754069576464e | lib/badging/endpoint.ex | lib/badging/endpoint.ex | defmodule Badging.Endpoint do
use Phoenix.Endpoint, otp_app: :badging
socket "/socket", Badging.UserSocket
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phoenix.digest
# when deploying your static files in production.
plug Plug.Static,
... | defmodule Badging.Endpoint do
use Phoenix.Endpoint, otp_app: :badging
socket "/socket", Badging.UserSocket
# Serve at "/" the static files from "priv/static" directory.
#
# You should set gzip to true if you are running phoenix.digest
# when deploying your static files in production.
plug Plug.Static,
... | Remove Plug.Session because it is unused | Remove Plug.Session because it is unused
| Elixir | mit | DNNX/badging |
e8c0def5e90f8f52b62c74c0dac38b6dc41ce49b | lib/jumubase_web/schema/schema.ex | lib/jumubase_web/schema/schema.ex | defmodule JumubaseWeb.Schema do
use Absinthe.Schema
alias JumubaseWeb.ContestResolver
import_types Absinthe.Type.Custom
query do
field :contests, non_null_list_of(:contest) do
description "The contests with public timetables."
resolve &ContestResolver.public_contests/2
end
end
object ... | defmodule JumubaseWeb.Schema do
use Absinthe.Schema
alias JumubaseWeb.ContestResolver
import_types Absinthe.Type.Custom
query do
field :contests, non_null_list_of(:contest) do
description "The contests with public timetables."
resolve &ContestResolver.public_contests/2
end
end
object ... | Make Contest fields non-nullable in GraphQL | Make Contest fields non-nullable in GraphQL
| Elixir | mit | richeterre/jumubase-phoenix,richeterre/jumubase-phoenix |
18c573540ebbe1f494e56bf3c06a0a3b89019bfd | lib/web/controllers/frontend_controller.ex | lib/web/controllers/frontend_controller.ex | defmodule PhoenixFrontendDeploys.FrontendController do
use PhoenixFrontendDeploys.Web, :controller
alias PhoenixFrontendDeploys.IndexAgent
def index(conn, _params) do
conn
|> send_file(200, get_index)
end
defp get_index, do: IndexAgent.get
end
| defmodule PhoenixFrontendDeploys.FrontendController do
use Phoenix.Controller
alias PhoenixFrontendDeploys.IndexAgent
def index(conn, _params) do
conn
|> send_file(200, get_index)
end
defp get_index, do: IndexAgent.get
end
| Use Phoenix.Controller rather the custom | Use Phoenix.Controller rather the custom
| Elixir | mit | mfeckie/phoenix_frontend_deploys,mfeckie/phoenix_frontend_deploys |
6db28e1728c522f7d31cc4b16cfb97ba21d3e013 | priv/templates/talon.new/config/talon.exs | priv/templates/talon.new/config/talon.exs | use Mix.Config
config :talon, resources: [
],
module: <%= base %>,
messages_backend: <%= base %>.<%= web_namespace %>Gettext,
theme: "<%= theme %>",
<%= if web_namespace == "" do %>
web_namespace: nil,
<% else %>
web_namespace: Web,
<% end %>
schema_adapter: Talon.Schema.Adapters.Ecto
| use Mix.Config
config :talon, resources: [
],
dashboard: nil,
module: <%= base %>,
messages_backend: <%= base %>.<%= web_namespace %>Gettext,
theme: "<%= theme %>",
<%= if web_namespace == "" do %>
web_namespace: nil,
<% else %>
web_namespace: Web,
<% end %>
schema_adapter: Talon.Schema.Adapters.... | Add dashboard to Talon config | Add dashboard to Talon config | Elixir | mit | talonframework/talon,talonframework/talon |
11f3560a2b52cd7af8089bc09c6d7d66d3ab0c6b | lib/meditate.ex | lib/meditate.ex | defmodule Mix.Tasks.Meditate do
use Mix.Task
alias Options
def run(args) do
Application.ensure_all_started(:elixir_koans)
Code.compiler_options(ignore_module_conflict: true)
Watcher.start
Options.start(args)
Options.initial_koan
|> ok?
|> Runner.modules_to_run
|> Tracker.start
... | defmodule Mix.Tasks.Meditate do
use Mix.Task
alias Options
def run(args) do
Application.ensure_all_started(:elixir_koans)
Code.compiler_options(ignore_module_conflict: true)
{:ok, watcher} = Watcher.start
Process.monitor(watcher)
Options.start(args)
Options.initial_koan
|> ok?
|... | Monitor watcher and wait for it to exit | Monitor watcher and wait for it to exit
This allows the parent process to exit when the watcher completes the
full koan run.
| Elixir | mit | elixirkoans/elixir-koans,samstarling/elixir-koans |
96a82eca8c3f13fdc7a1a349c6425f0568b8d7ef | lib/course_planner/enum.ex | lib/course_planner/enum.ex | defmodule CoursePlanner.Enum do
@moduledoc """
Behaviour to represent Enum with mapping to timestamp
"""
defmacro __using__(_) do
quote do
@behaviour Ecto.Type
@behaviour CoursePlanner.Enum
@callback valid_types :: [String.t]
def cast(value) do
if Enum.member?(valid_types(), ... | defmodule CoursePlanner.Enum do
@moduledoc """
Behaviour to represent Enum with mapping to timestamp
"""
@callback valid_types :: [String.t]
defmacro __using__(_) do
quote do
@behaviour Ecto.Type
@behaviour CoursePlanner.Enum
def cast(value) do
if Enum.member?(valid_types(), v... | Fix warning about inexistent behaviour CoursePlanner.Enum | Fix warning about inexistent behaviour CoursePlanner.Enum
Callback definition was in the wrong place
| Elixir | mit | digitalnatives/course_planner,digitalnatives/course_planner,digitalnatives/course_planner |
409f7faece3e39f26e8b816362700e8648f23ea5 | lib/classlab/utils/string_extensions.ex | lib/classlab/utils/string_extensions.ex | defmodule Classlab.Utils.StringExtensions do
@doc """
Replaces special characters in a string so that it may be used as part of a ‘pretty’ URL.
"""
def parameterize(str, sep \\ "-") do
str
|> transliterate()
|> String.downcase
|> String.replace(~r/[^a-z0-9\-_]+/, sep)
|> String.replace(~r/#... | defmodule Classlab.Utils.StringExtensions do
@moduledoc"""
A collection of utilities for string manipulation.
"""
@doc """
Replaces special characters in a string so that it may be used as part of a ‘pretty’ URL.
"""
def parameterize(str, sep \\ "-") do
str
|> transliterate()
|> String.downca... | Add moduledoc for string extensions | Add moduledoc for string extensions
| Elixir | mit | classlab/classlab,classlab/classlab |
de72b4e3b0d7aee1a7a68046b1a34d37be73d137 | lib/ex_unit/lib/ex_unit/runner_stats.ex | lib/ex_unit/lib/ex_unit/runner_stats.ex | defmodule ExUnit.RunnerStats do
@moduledoc false
use GenServer
def init(_opts) do
{:ok, %{total: 0, failures: 0, skipped: 0}}
end
def stats(pid) do
GenServer.call(pid, :stats, :infinity)
end
def handle_call(:stats, _from, map) do
{:reply, map, map}
end
def handle_cast({:test_finished,... | defmodule ExUnit.RunnerStats do
@moduledoc false
use GenServer
def init(_opts) do
{:ok, %{total: 0, failures: 0, skipped: 0}}
end
def stats(pid) do
GenServer.call(pid, :stats, :infinity)
end
def handle_call(:stats, _from, map) do
{:reply, map, map}
end
def handle_cast({:test_finished,... | Clarify variable content in ExUnit.RunnerStats | Clarify variable content in ExUnit.RunnerStats
| Elixir | apache-2.0 | lexmag/elixir,kelvinst/elixir,michalmuskala/elixir,pedrosnk/elixir,gfvcastro/elixir,lexmag/elixir,pedrosnk/elixir,beedub/elixir,antipax/elixir,joshprice/elixir,ggcampinho/elixir,gfvcastro/elixir,ggcampinho/elixir,kimshrier/elixir,kimshrier/elixir,elixir-lang/elixir,antipax/elixir,beedub/elixir,kelvinst/elixir |
3f823b656d3c84305a019e0a7aa8a09e09f8682f | web/views/setup_view.ex | web/views/setup_view.ex | defmodule EspiDni.SetupView do
use EspiDni.Web, :view
alias EspiDni.Team
alias EspiDni.GoogleAnalyticsClient
def web_properties(%Team{} = team) do
GoogleAnalyticsClient.get_properties(team)
|> Enum.map(&{&1.name, &1.defaultProfileId})
end
def team_changeset(%Team{} = team) do
EspiDni.Team.cha... | defmodule EspiDni.SetupView do
use EspiDni.Web, :view
alias EspiDni.Team
alias EspiDni.GoogleAnalyticsClient
alias EspiDni.GoogleWebProperty
def web_properties(%Team{} = team) do
team
|> GoogleAnalyticsClient.get_properties
|> Enum.map(&select_options(&1))
end
def team_changeset(%Team{} = t... | Use updates web property logic better output | Use updates web property logic better output
Shows more details to user to decide which web property to choose
| Elixir | mit | edenspiekermann/espi-dni,edenspiekermann/espi-dni |
b395a7933c0278f4e39f5cf800e00cb0bfb91160 | test/integration/adapters/sendgrid_test.exs | test/integration/adapters/sendgrid_test.exs | defmodule Swoosh.Integration.Adapters.SendgridTest do
use ExUnit.Case, async: true
import Swoosh.Email
@moduletag integration: true
setup_all do
config = [api_key: System.get_env("SENDGRID_API_KEY"), domain: System.get_env("SENDGRID_DOMAIN")]
{:ok, config: config}
end
test "simple deliver", %{co... | defmodule Swoosh.Integration.Adapters.SendgridTest do
use ExUnit.Case, async: true
import Swoosh.Email
@moduletag integration: true
setup_all do
config = [api_key: System.get_env("SENDGRID_API_KEY"), domain: System.get_env("SENDGRID_DOMAIN")]
{:ok, config: config}
end
test "simple deliver", %{co... | Add @ in Sendgrid integration tests | Add @ in Sendgrid integration tests
| Elixir | mit | swoosh/swoosh,dbulic/swoosh |
56edc2f8c7851bec5bc70441b1bff8560556fc75 | lib/wobserver/web/router/base.ex | lib/wobserver/web/router/base.ex | defmodule Wobserver.Web.Router.Base do
@moduledoc ~S"""
Base Router module, includes standard helpers and plugs.
"""
defmacro __using__(_opts) do
quote do
use Plug.Router
import Wobserver.Web.Router.Helper, only: [send_json_resp: 2]
plug :match
plug :dispatch
end
end
end
| defmodule Wobserver.Web.Router.Base do
@moduledoc ~S"""
Base Router module, includes standard helpers and plugs.
"""
defmacro __using__(_opts) do
quote do
use Plug.Router
@doc false
@spec init(opts :: Plug.opts) :: Plug.opts
def init(opts) do
opts
end
@doc fals... | Remove doc from Plug.Router init/call. | Remove doc from Plug.Router init/call.
| Elixir | mit | shinyscorpion/wobserver,shinyscorpion/wobserver |
c43c011b3bc8b8660f5d783c5b3c7081777f5d64 | lib/ex_twilio/resources/address.ex | lib/ex_twilio/resources/address.ex | defmodule ExTwilio.Address do
@moduledoc """
Represents an Address resource in the Twilio API.
- [Twilio docs](https://www.twilio.com/docs/api/rest/addresses)
"""
defstruct sid: nil,
account_sid: nil,
friendly_name: nil,
customer_name: nil,
street: nil,
... | defmodule ExTwilio.Address do
@moduledoc """
Represents an Address resource in the Twilio API.
- [Twilio docs](https://www.twilio.com/docs/usage/api/address)
"""
defstruct sid: nil,
account_sid: nil,
friendly_name: nil,
customer_name: nil,
street: nil,
... | Update redirect to Address API | Update redirect to Address API
| Elixir | mit | danielberkompas/ex_twilio,danielberkompas/ex_twilio |
acaf4cb806927887eaefa2a8340e1ed6ad14e4ab | test/tesla/middleware/decode_rels_test.exs | test/tesla/middleware/decode_rels_test.exs | defmodule Tesla.Middleware.DecodeRelsTest do
use ExUnit.Case
alias Tesla.Env
defmodule Client do
use Tesla
plug Tesla.Middleware.DecodeRels
adapter fn _env ->
%Env{headers: %{
"Link" => ~s(<https://api.github.com/resource?page=2>; rel="next",
<https://api.github.com/resource?... | defmodule Tesla.Middleware.DecodeRelsTest do
use ExUnit.Case
defmodule Client do
use Tesla
plug Tesla.Middleware.DecodeRels
adapter fn env ->
case env.url do
"/rels" ->
%{env | headers: %{
"Link" => ~s(<https://api.github.com/resource?page=2>; rel="next",
... | Test DecodeRels without Link header | Test DecodeRels without Link header | Elixir | mit | monterail/tesla,teamon/tesla |
ab9525ec9c4272b516babd08c4af77d32cfa3333 | lib/leather_web/endpoint.ex | lib/leather_web/endpoint.ex | defmodule LeatherWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :leather
socket "/socket", LeatherWeb.UserSocket
plug Plug.Static,
at: "/", from: :leather, gzip: System.get_env("GZIP_ENABLED") === "true" || false,
only: ~w(css fonts images js favicon.ico robots.txt)
if code_reloading? do
socket "... | defmodule LeatherWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :leather
socket "/socket", LeatherWeb.UserSocket
plug Plug.Static,
at: "/",
cache_control_for_etags: "public, max-age=31536000",
from: :leather,
gzip: System.get_env("GZIP_ENABLED") === "true" || false,
only: ~w(css fonts images... | Add cache control for assets. | Add cache control for assets.
| Elixir | mit | nicksergeant/leather,nicksergeant/leather |
fbbe4469a0b17c3e6fba1394456e0310199b73c0 | mix.exs | mix.exs | defmodule WebDriver.Mixfile do
use Mix.Project
def project do
[ app: :webdriver,
version: "0.4.1",
source_url: "https://github.com/stuart/elixir-webdriver",
homepage_url: "http://stuart.github.io/elixir-webdriver",
deps: deps(Mix.env)
]
end
# Configuration for the OTP applicati... | defmodule WebDriver.Mixfile do
use Mix.Project
def project do
[ app: :webdriver,
version: "0.4.1",
source_url: "https://github.com/stuart/elixir-webdriver",
homepage_url: "http://stuart.github.io/elixir-webdriver",
deps: deps(Mix.env)
]
end
# Configuration for the OTP applicati... | Move ex_doc dep to dev only | Move ex_doc dep to dev only
| Elixir | mit | stuart/elixir-webdriver,fazibear/elixir-webdriver,stuart/elixir-webdriver,fazibear/elixir-webdriver |
dc52373ad855b41f3fea02673e167ebdbafad395 | api/lib/worker/mapper.ex | api/lib/worker/mapper.ex | defmodule Worker.Mapper do
def process, do: fn change -> process(change) end
def process(change = %{ doc: %{ resource: %{ type: "Project" }}}) do
id = change.doc.resource.identifier
change = put_in(change.doc.resource.id, id)
put_in(change.id, id)
|> rename_type_to_category
end
def process(cha... | defmodule Worker.Mapper do
def process, do: fn change -> process(change) end
def process(change = %{ doc: %{ resource: %{ type: "Project" }}}) do
id = change.doc.resource.identifier
change = put_in(change.doc.resource.id, id)
put_in(change.id, id)
|> rename_type_to_category
end
def process(cha... | Replace unused variable with underscore | Replace unused variable with underscore
| Elixir | apache-2.0 | dainst/idai-field-web,dainst/idai-field-web,dainst/idai-field-web |
c7cd17fea8f0318e80e799fe6c05042d5bfd7092 | test/integration/adapters/smtp_test.exs | test/integration/adapters/smtp_test.exs | defmodule Swoosh.Integration.Adapters.SMTPTest do
use ExUnit.Case, async: true
import Swoosh.Email
@moduletag integration: true
setup_all do
config = [
relay: System.get_env("SMTP_RELAY"),
username: System.get_env("SMTP_USERNAME"),
password: System.get_env("SMTP_PASSWORD"),
domain... | defmodule Swoosh.Integration.Adapters.SMTPTest do
use ExUnit.Case, async: true
import Swoosh.Email
@moduletag integration: true
setup_all do
config = [
relay: System.get_env("SMTP_RELAY"),
username: System.get_env("SMTP_USERNAME"),
password: System.get_env("SMTP_PASSWORD"),
domain... | Add @ in SMTP integration tests | Add @ in SMTP integration tests
| Elixir | mit | dbulic/swoosh,swoosh/swoosh |
c5071b4e17caf0ad8b7875df0e72e7bc4a20a1b0 | lib/pullhub.ex | lib/pullhub.ex | defmodule Pullhub do
use Application
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec
# Define workers and child supervisors to be supervised
children = [
# Start the Ecto repository
... | defmodule Pullhub do
use Application
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec
# Define workers and child supervisors to be supervised
children = [
# Start the Ecto repository
... | Add repo fetcher to supervision tree for it to be started with app | Add repo fetcher to supervision tree for it to be started with app
| Elixir | mit | substancelab/pullhub,substancelab/pullhub,substancelab/pullhub |
7add94efe852cd2f3aa8a42c76822d7ea9ff8b0e | lib/phoenix/endpoint/server.ex | lib/phoenix/endpoint/server.ex | defmodule Phoenix.Endpoint.Server do
# The supervisor for the underlying handlers.
@moduledoc false
@handler Phoenix.Endpoint.CowboyHandler
use Supervisor
def start_link(otp_app, endpoint) do
if endpoint.config(:server) do
Supervisor.start_link(__MODULE__, {otp_app, endpoint})
else
:igno... | defmodule Phoenix.Endpoint.Server do
# The supervisor for the underlying handlers.
@moduledoc false
@handler Phoenix.Endpoint.CowboyHandler
use Supervisor
def start_link(otp_app, endpoint) do
if endpoint.config(:server) do
Supervisor.start_link(__MODULE__, {otp_app, endpoint})
else
:igno... | Raise an error when the port in the config is nil. | Raise an error when the port in the config is nil.
A nil port can happen by default in the prod environment when the
PORT environment variable doesn't exist.
| Elixir | mit | doomspork/phoenix,Gazler/phoenix,milafrerichs/phoenix,brucify/phoenix,nshafer/phoenix,dmarkow/phoenix,bsmr-erlang/phoenix,0x00evil/phoenix,kholbekj/phoenix,mobileoverlord/phoenix,michalmuskala/phoenix,omotenko/phoenix_auth,0x00evil/phoenix,phoenixframework/phoenix,eksperimental/phoenix,andrewvy/phoenix,ephe-meral/phoen... |
1d7b00d2208dd4c63ba7218c5ac9130db0f19817 | .formatter.exs | .formatter.exs | # Used by "mix format"
[
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
]
| # Used by "mix format"
[
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"],
line_length: 100
]
| Support line length out to 100 characters | Support line length out to 100 characters
| Elixir | mit | lee-dohm/meal-tracker,lee-dohm/meal-tracker |
d6a420fca9e755b61f82dba2340a933cbabb20bf | lib/farmbot/celery_script/ast/node/toggle_pin.ex | lib/farmbot/celery_script/ast/node/toggle_pin.ex | defmodule Farmbot.CeleryScript.AST.Node.TogglePin do
@moduledoc false
use Farmbot.CeleryScript.AST.Node
alias Farmbot.CeleryScript.AST.Node
allow_args [:pin_number]
use Farmbot.Logger
def execute(%{pin_number: num}, _, env) do
env = mutate_env(env)
case Farmbot.BotState.get_pin_value(num) do
... | defmodule Farmbot.CeleryScript.AST.Node.TogglePin do
@moduledoc false
use Farmbot.CeleryScript.AST.Node
alias Farmbot.CeleryScript.AST.Node
allow_args [:pin_number]
use Farmbot.Logger
def execute(%{pin_number: num}, _, env) do
env = mutate_env(env)
case Farmbot.BotState.get_pin_value(num) do
... | Fix toggle pin if a pin is analog | Fix toggle pin if a pin is analog
| Elixir | mit | FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os |
218f24208fef0bc2b858975d2b145f377ca48319 | lib/remote_retro_web/channels/presence_utils.ex | lib/remote_retro_web/channels/presence_utils.ex | defmodule RemoteRetroWeb.PresenceUtils do
@moduledoc """
Helpers for retro user presence.
"""
alias RemoteRetroWeb.Presence
alias RemoteRetro.User
alias Phoenix.Token
def track_timestamped(%{assigns: assigns} = socket) do
case Token.verify(socket, "user", assigns.user_token, max_age: 86_400) do
... | defmodule RemoteRetroWeb.PresenceUtils do
@moduledoc """
Helpers for retro user presence.
"""
alias RemoteRetroWeb.Presence
alias RemoteRetro.User
alias Phoenix.Token
def track_timestamped(%{assigns: assigns} = socket) do
case Token.verify(socket, "user", assigns.user_token, max_age: 86_400) do
... | Handle expired presence tokens case | Handle expired presence tokens case
- generalize error case such that it catches expired and invalid tokens
| Elixir | mit | stride-nyc/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro |
f692cf210042f2341fa69f149dc9ba83d1bcba1b | farmbot_os/platform/target/network/presetup.ex | farmbot_os/platform/target/network/presetup.ex | defmodule FarmbotOS.Platform.Target.Network.PreSetup do
@moduledoc """
VintageNet technology responsible for doing nothing,
but isn't the NULL technology
"""
@behaviour VintageNet.Technology
alias VintageNet.Interface.RawConfig
@impl true
def normalize(config), do: config
@impl true
def to_raw_c... | defmodule FarmbotOS.Platform.Target.Network.PreSetup do
@moduledoc """
VintageNet technology responsible for doing nothing,
but isn't the NULL technology
"""
@behaviour VintageNet.Technology
alias VintageNet.Interface.RawConfig
@impl true
def normalize(config), do: config
@impl true
def to_raw_c... | Fix some breaking changes involved in vintage_net 0.7x => 0.9x upgrade | Fix some breaking changes involved in vintage_net 0.7x => 0.9x upgrade
| Elixir | mit | FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os |
fa498b6b89769ac3ff0f3cc6f00ea16c80446763 | lib/ex_twilio/resources/sip_credential.ex | lib/ex_twilio/resources/sip_credential.ex | defmodule ExTwilio.SipCredential do
@moduledoc """
Represents an SIP Credential in the Twilio API.
- [Twilio docs](https://www.twilio.com/docs/voice/sip/api/sip-credentiallist-resource#subresources)
"""
defstruct sid: nil,
account_sid: nil,
friendly_name: nil,
ip_address:... | defmodule ExTwilio.SipCredential do
@moduledoc """
Represents an SIP Credential in the Twilio API.
- [Twilio docs](https://www.twilio.com/docs/api/rest/credential-list#subresources)
"""
defstruct sid: nil,
account_sid: nil,
friendly_name: nil,
ip_address: nil,
... | Revert "Update redirect to SipCredential API" | Revert "Update redirect to SipCredential API"
This reverts commit 3e0beb896e6521d3e921a6aa018cd051e245e8ae.
| Elixir | mit | danielberkompas/ex_twilio,danielberkompas/ex_twilio |
2f6bb95fe50f9e17c5b901795eabed89d1d54f2c | mix.exs | mix.exs | defmodule Swoosh.Mixfile do
use Mix.Project
def project do
[app: :swoosh,
version: "0.0.1",
elixir: "~> 1.2",
elixirc_paths: elixirc_paths(Mix.env),
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps,
description: description,
package: packag... | defmodule Swoosh.Mixfile do
use Mix.Project
def project do
[app: :swoosh,
version: "0.0.1",
elixir: "~> 1.2",
elixirc_paths: elixirc_paths(Mix.env),
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps,
description: description,
package: packag... | Add the next US presidents important commentary. | Add the next US presidents important commentary.
| Elixir | mit | dbulic/swoosh,swoosh/swoosh,dighjd12/swoosh |
db5c2829f6cbe40b9b0fe6dfe5292b8d2abe3a79 | lib/farmbot/celery_script/ast/arg/pin_io_mode.ex | lib/farmbot/celery_script/ast/arg/pin_io_mode.ex | defmodule Farmbot.CeleryScript.AST.Arg.PinIoMode do
@moduledoc false
@behaviour Farmbot.CeleryScript.AST.Arg
def decode(0x0), do: :input
def decode(0x2), do: :input_pullup
def decode(0x1), do: :output
def encode(:input), do: 0x0
def encode(:input_pullup), do: 0x2
def encode(:output), do: 0x1
end
| defmodule Farmbot.CeleryScript.AST.Arg.PinIoMode do
@moduledoc false
@behaviour Farmbot.CeleryScript.AST.Arg
def decode(0x0), do: {:ok, :input}
def decode(0x2), do: {:ok, :input_pullup}
def decode(0x1), do: {:ok, :output}
def encode(:input), do: {:ok, 0x0}
def encode(:input_pullup), do: {:ok, 0x2}
def... | Fix pin io mode type. | Fix pin io mode type.
| Elixir | mit | FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os |
2131af23092ca43382befb16dbd84c507c505469 | nerves/target/bootstrap/network/tzdata_task.ex | nerves/target/bootstrap/network/tzdata_task.ex | defmodule Farmbot.Target.Network.TzdataTask do
use GenServer
@fb_data_dir Path.join(Application.get_env(:farmbot, :data_path), "tmp_downloads")
@timer_ms round(1.2e+6) # 20 minutes
def start_link(_, _) do
GenServer.start_link(__MODULE__, [], [name: __MODULE__])
end
def init([]) do
send self(), :d... | defmodule Farmbot.Target.Network.TzdataTask do
use GenServer
@fb_data_dir Path.join(Application.get_env(:farmbot, :data_path), "tmp_downloads")
@timer_ms round(1.2e+6) # 20 minutes
def start_link(_, _) do
GenServer.start_link(__MODULE__, [], [name: __MODULE__])
end
def init([]) do
send self(), :d... | Fix tzdata for real this time | Fix tzdata for real this time
| Elixir | mit | FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os |
6843302fb9a7bcf7eb58fe5e888872af6ee8fc25 | test/models/models/message_test.exs | test/models/models/message_test.exs | defmodule SlackCoder.Models.MessageTest do
use SlackCoder.ModelCase
alias SlackCoder.Models.Message
@valid_attrs %{message: "some content", slack: "some content", user: "some content"}
@invalid_attrs %{}
test "changeset with valid attributes" do
changeset = Message.changeset(%Message{}, @valid_attrs)
... | defmodule SlackCoder.Models.MessageTest do
use SlackCoder.ModelCase
alias SlackCoder.Models.Message
@valid_attrs %{message: "some content", slack: "some content", user: "some content"}
@invalid_attrs %{}
test "changeset with valid attributes" do
changeset = Message.changeset(%Message{}, @valid_attrs)
... | Fix test so it can be deployed. | Fix test so it can be deployed.
| Elixir | mit | mgwidmann/slack_coder,mgwidmann/slack_coder,mgwidmann/slack_coder,mgwidmann/slack_coder |
66247cb86493c092b614dfdfd06affee3bcef2ed | web/controllers/project_controller.ex | web/controllers/project_controller.ex | defmodule CodeCorps.ProjectController do
use CodeCorps.Web, :controller
use JaResource
import CodeCorps.Helpers.Query, only: [slug_finder: 2]
alias CodeCorps.Project
plug :load_and_authorize_changeset, model: Project, only: [:create]
plug :load_and_authorize_resource, model: Project, only: [:update]
pl... | defmodule CodeCorps.ProjectController do
use CodeCorps.Web, :controller
use JaResource
import CodeCorps.Helpers.Query, only: [slug_finder: 2]
alias CodeCorps.Project
plug :load_and_authorize_changeset, model: Project, only: [:create]
plug :load_and_authorize_resource, model: Project, only: [:update]
pl... | Update project controller to take website correctly | Update project controller to take website correctly
| Elixir | mit | code-corps/code-corps-api,crodriguez1a/code-corps-api,code-corps/code-corps-api,crodriguez1a/code-corps-api |
1f72feed5c12d02ffde65fbec7eb7d5344bc345a | priv/repo/migrations/20160711232831_account_belongs_to_participant.exs | priv/repo/migrations/20160711232831_account_belongs_to_participant.exs | defmodule ParticipateApi.Repo.Migrations.AccountBelongsToParticipant do
use Ecto.Migration
def change do
alter table(:accounts) do
add :participant_id, :integer
end
end
end
| defmodule ParticipateApi.Repo.Migrations.AccountBelongsToParticipant do
use Ecto.Migration
def change do
alter table(:accounts) do
add :participant_id, references(:participants, on_delete: :delete_all)
end
end
end
| Change migration adding participant_id to accounts, so accounts are deleted on participant deletion | Change migration adding participant_id to accounts, so accounts are deleted on participant deletion
| Elixir | mit | participateapp/api,oliverbarnes/participate-new-api,oliverbarnes/participate-api |
cade6d5f4f1bd0d1a19078ed362c14e3a4dcdba8 | api/lib/api_web/views/resource_view.ex | api/lib/api_web/views/resource_view.ex | defmodule ApiWeb.ResourceView do
use ApiWeb, :view
alias ApiWeb.ResourceView
def render("index.json", %{resources: resources}) do
%{data: render_many(resources, ResourceView, "resource.json")}
end
def render("resource.json", %{resource: %{ "type" => type, "identifier" => identifier }}) do
%{type: ty... | defmodule ApiWeb.ResourceView do
use ApiWeb, :view
alias ApiWeb.ResourceView
def render("index.json", %{resources: resources}) do
%{data: render_many(resources, ResourceView, "resource.json")}
end
def render("resource.json", %{resource: %{"id" => id, "type" => type, "identifier" => identifier,
... | Add id & shortDescription to resource output | Add id & shortDescription to resource output
| Elixir | apache-2.0 | dainst/idai-field-web,dainst/idai-field-web,dainst/idai-field-web |
72b158891a822cc0bcd5d4df99cc58673f40c387 | lib/cobalt/models/message.ex | lib/cobalt/models/message.ex | defmodule Message do
use Ecto.Model
use Cobalt.ModelUtils
queryable "messages" do
field :body, :string
field :type, :string
field :user_id, :integer
field :created_at, :datetime
belongs_to :room, Room
belongs_to :user, User
end
end | defmodule Message do
use Ecto.Model
use Cobalt.ModelUtils
queryable "messages" do
field :body, :string
field :type, :string
field :created_at, :datetime
belongs_to :room, Room
belongs_to :user, User
end
end | Remove explicit user_id declaration from Message; | Remove explicit user_id declaration from Message;
| Elixir | mit | louishawkins/mogo-chat,sashafklein/bloc-mogo,HashNuke/mogo-chat,HashNuke/mogo-chat,HashNuke/mogo-chat,louishawkins/mogo-chat,louishawkins/mogo-chat,sashafklein/bloc-mogo,di-stars/mogo-chat,di-stars/mogo-chat,sashafklein/bloc-mogo,di-stars/mogo-chat |
80e6942ca95caefb5717851e826fdcaa1cdd1a6e | lib/mix/lib/mix/tasks/clean.ex | lib/mix/lib/mix/tasks/clean.ex | defmodule Mix.Tasks.Clean do
use Mix.Task
@shortdoc "Deletes generated application files"
@recursive true
@moduledoc """
Deletes generated application files.
This command deletes all build artifacts for the current project.
Dependencies' build files are cleaned if the `--deps` option is given.
By de... | defmodule Mix.Tasks.Clean do
use Mix.Task
@shortdoc "Deletes generated application files"
@recursive true
@moduledoc """
Deletes generated application files.
This command deletes all build artifacts for the current project.
Dependencies' sources and build files are cleaned only if the
`--deps` option... | Clarify the use of --deps option | Clarify the use of --deps option
| Elixir | apache-2.0 | kimshrier/elixir,pedrosnk/elixir,pedrosnk/elixir,ggcampinho/elixir,kimshrier/elixir,antipax/elixir,kelvinst/elixir,lexmag/elixir,kelvinst/elixir,joshprice/elixir,ggcampinho/elixir,michalmuskala/elixir,beedub/elixir,antipax/elixir,lexmag/elixir,gfvcastro/elixir,gfvcastro/elixir,elixir-lang/elixir,beedub/elixir |
ff172c3c528c0c9b44d0739a4a24fc9db6802e8c | apps/baumeister/mix.exs | apps/baumeister/mix.exs | defmodule Baumeister.Mixfile do
use Mix.Project
def project do
[app: :baumeister,
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.3",
build_embedded: Mix.env == :prod,
... | defmodule Baumeister.Mixfile do
use Mix.Project
def project do
[app: :baumeister,
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.3",
build_embedded: Mix.env == :prod,
... | Add yaml_elixir for parsing YAML files | Add yaml_elixir for parsing YAML files
| Elixir | apache-2.0 | alfert/baumeister,alfert/baumeister,alfert/baumeister |
f858f0555c4823bbde276bc95cf95dc9872d3cd6 | lib/tasks/end_to_end.ex | lib/tasks/end_to_end.ex | defmodule Mix.Tasks.EndToEnd do
@moduledoc false
use Mix.Task
@shortdoc "Runs feature tests"
def run(_) do
compile_js()
System.cmd(
"mix",
["test", "--only", "feature_test", "--color"],
into: IO.stream(:stdio, :line)
)
end
defp compile_js do
System.cmd("npm", ["run", "dep... | defmodule Mix.Tasks.EndToEnd do
@moduledoc false
use Mix.Task
@shortdoc "Runs feature tests"
def run(_) do
compile_js()
System.cmd(
"mix",
["test", "test/features/", "--only", "feature_test", "--color"],
into: IO.stream(:stdio, :line)
)
end
defp compile_js do
System.cmd("... | Update mix e2e task to only look at tests in test/features/ | Update mix e2e task to only look at tests in test/features/
- when solely relying on '--only feature_test', we get somewhat confusing output about 30+ skipped tests, because we're technically skipping the unit tests. By scoping the call to the directory we care about, we get less confusing output.
| Elixir | mit | samdec11/remote_retro,stride-nyc/remote_retro,tnewell5/remote_retro,stride-nyc/remote_retro,tnewell5/remote_retro,stride-nyc/remote_retro |
bcd539c24c732502ebeac718dc9c68850b97e736 | lib/pairs_one_web/controllers/healthcheck_controller.ex | lib/pairs_one_web/controllers/healthcheck_controller.ex | defmodule PairsOneWeb.HealthcheckController do
use PairsOneWeb.Web, :controller
def index(conn, _params) do
json(conn, %{
port: System.get_env("PORT"),
release_sha: Application.get_env(:pairs_one, :release_sha)
})
end
def crash(_conn, _params) do
raise "Intentional crash"
end
def ... | defmodule PairsOneWeb.HealthcheckController do
use PairsOneWeb.Web, :controller
def index(conn, _params) do
:ok = Exredis.Api.set(:redis, "foo", "bar")
json(conn, %{
port: System.get_env("PORT"),
release_sha: Application.get_env(:pairs_one, :release_sha)
})
end
def crash(_conn, _param... | Check Redis connection during healthcheck | Check Redis connection during healthcheck
| Elixir | mit | mxgrn/pairs.one,mxgrn/pairs.one,mxgrn/pairs.one |
95618c077c1da3f2674fb6fa4855a14c8e6df17a | mix.exs | mix.exs | defmodule Trot.Mixfile do
use Mix.Project
@version "0.3.0"
def project do
[app: :trot,
version: @version,
elixir: "~> 1.0",
deps: deps,
name: "Trot",
docs: [readme: "README.md", main: "README",
source_url: "https://github.com/hexedpackets/trot"],
# Hex
descrip... | defmodule Trot.Mixfile do
use Mix.Project
@version "0.3.0"
def project do
[app: :trot,
version: @version,
elixir: "~> 1.0",
deps: deps,
name: "Trot",
docs: [readme: "README.md", main: "README",
source_ref: "v#{@version}",
source_url: "https://github.com/hexed... | Add link to tag in github | Add link to tag in github
| Elixir | apache-2.0 | hexedpackets/trot |
e34e39c30a092b0210d966253ae74de9998b7465 | .iex.exs | .iex.exs | import_file_if_available("~/.iex.exs")
alias Tilex.{
Channel,
Developer,
Liking,
Post,
Repo,
}
| import_file_if_available("~/.iex.exs")
alias Tilex.{
Channel,
Developer,
Liking,
Post,
Repo,
}
# Allow developer to reload IEx session with `R.reload!`.
defmodule R do
def reload! do
Mix.Task.reenable "compile.elixir"
Application.stop(Mix.Project.config[:app])
Mix.Task.run "compile.elixir"
... | Allow developer to reload IEx session | Allow developer to reload IEx session
| Elixir | mit | hashrocket/tilex,hashrocket/tilex,hashrocket/tilex |
64c3900407c3b4b5456b404682776beef83adbb9 | priv/repo/migrations/20140712183014_create_posts.exs | priv/repo/migrations/20140712183014_create_posts.exs | defmodule Repo.Migrations.CreatePosts do
use Ecto.Migration
def up do
"""
CREATE TABLE IF NOT EXISTS post (
id SERIAL,
title varchar(255),
content varchar(255)
)
"""
end
def down do
"DROP TABLE post"
end
end
| defmodule Repo.Migrations.CreatePosts do
use Ecto.Migration
def up do
"""
CREATE TABLE IF NOT EXISTS post (
id SERIAL,
title varchar(255),
content text
)
"""
end
def down do
"DROP TABLE post"
end
end
| Change content column to text | Change content column to text
| Elixir | mit | marcioj/elixir_blog |
c0ce4affb25cf678794270cf73554b030c1c5966 | lib/appsignal/error/backend.ex | lib/appsignal/error/backend.ex | defmodule Appsignal.Error.Backend do
@tracer Application.get_env(:appsignal, :appsignal_tracer, Appsignal.Tracer)
@span Application.get_env(:appsignal, :appsignal_span, Appsignal.Span)
@behaviour :gen_event
def init(opts), do: {:ok, opts}
def handle_event({:error, gl, {_, _, _, metadata} = event}, state) w... | defmodule Appsignal.Error.Backend do
@tracer Application.get_env(:appsignal, :appsignal_tracer, Appsignal.Tracer)
@span Application.get_env(:appsignal, :appsignal_span, Appsignal.Span)
@behaviour :gen_event
def init(opts), do: {:ok, opts}
def handle_event({:error, gl, {_, _, _, metadata}}, state) when node... | Remove unused variable in Error.Backend.handle_event/2 | Remove unused variable in Error.Backend.handle_event/2
| Elixir | mit | appsignal/appsignal-elixir,appsignal/appsignal-elixir,appsignal/appsignal-elixir,appsignal/appsignal-elixir |
357bb4f914a6e46d3d14e7fd8e79cfdafea30125 | lib/elixir/test/elixir/fixtures/dialyzer/remote_call.ex | lib/elixir/test/elixir/fixtures/dialyzer/remote_call.ex | defmodule Dialyzer.RemoteCall do
_ = Application.load(:dialyzer)
case Application.spec(:dialyzer, :vsn) do
~c(3.) ++ _ ->
@dialyzer {:no_return, [map_var: 0]}
@dialyzer {:no_match, [map_var: 0, mod_var: 0, mod_var: 1]}
~c(2.) ++ _ ->
@dialyzer {:no_fail_call, [map_var: 0]}
_ ->
:... | defmodule Dialyzer.RemoteCall do
_ = Application.load(:dialyzer)
case Application.spec(:dialyzer, :vsn) do
~c(2.) ++ _ ->
@dialyzer {:no_fail_call, [map_var: 0]}
three when three < ~c(3.0.2) ->
# regression introduced in 3.0 for map warnings fixed in 3.0.2
@dialyzer {:no_match, [map_var: 0... | Update dialyzer tests for OTP-19.1/dialyzer-3.0.2 | Update dialyzer tests for OTP-19.1/dialyzer-3.0.2
| Elixir | apache-2.0 | gfvcastro/elixir,antipax/elixir,lexmag/elixir,elixir-lang/elixir,pedrosnk/elixir,kelvinst/elixir,gfvcastro/elixir,kimshrier/elixir,kimshrier/elixir,antipax/elixir,joshprice/elixir,ggcampinho/elixir,lexmag/elixir,ggcampinho/elixir,beedub/elixir,beedub/elixir,pedrosnk/elixir,kelvinst/elixir,michalmuskala/elixir |
69aff938c69f36bc904c2f027c9cf84fff78b305 | mix.exs | mix.exs | defmodule Serum.Mixfile do
use Mix.Project
def project do
[app: :serum,
version: "0.9.0",
elixir: "~> 1.2",
escript: [main_module: Serum.Cmdline],
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps()]
end
def application do
[applications: [:lo... | defmodule Serum.Mixfile do
use Mix.Project
def project do
[app: :serum,
version: "0.9.0",
elixir: "~> 1.2",
escript: [main_module: Serum.Cmdline],
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps()]
end
def application do
[applications: [:lo... | Remove fs from app list -- start it when the server starts | Remove fs from app list -- start it when the server starts
| Elixir | mit | Dalgona/Serum |
397a2d014e4679e81be9d809f13d94e319b7f973 | farmbot_os/test/farmbot_os/syscalls/check_update_test.exs | farmbot_os/test/farmbot_os/syscalls/check_update_test.exs | defmodule FarmbotOS.SysCalls.CheckUpdateTest do
use ExUnit.Case, async: true
# use Mimic
# setup :verify_on_exit!
alias FarmbotOS.SysCalls.CheckUpdate
test "in_progress?" do
File.write!("temp1", "lol")
assert CheckUpdate.in_progress?("temp1")
File.rm!("temp1")
refute CheckUpdate.in_progress?(... | defmodule FarmbotOS.SysCalls.CheckUpdateTest do
use ExUnit.Case, async: true
# use Mimic
# setup :verify_on_exit!
test "in_progress?" do
File.write!("temp1", "lol")
assert FarmbotOS.UpdateSupport.in_progress?("temp1")
File.rm!("temp1")
refute FarmbotOS.UpdateSupport.in_progress?("temp1")
end
... | Fix test failure due to module renaming | Fix test failure due to module renaming
| Elixir | mit | FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os |
c960949fa6d8e8d62c117e6fe8d11d5056526f86 | web/controllers/page_controller.ex | web/controllers/page_controller.ex | require Logger
defmodule OAuth2Example.PageController do
use OAuth2Example.Web, :controller
plug :action
def index(conn, _params) do
Logger.info "Displaying index page"
render conn, "index.html"
end
end
| require Logger
defmodule OAuth2Example.PageController do
use OAuth2Example.Web, :controller
plug :action
def index(conn, _params) do
Logger.debug "Displaying index page"
Logger.debug inspect(conn)
render conn, "index.html"
end
end
| Add logging to inspect the connection just prior to displaying the index page | Add logging to inspect the connection just prior to displaying the index page
| Elixir | mit | wsmoak/phoenix_oauth2_example |
4e13dd0016716f8c279ad58f8dea036fb2721331 | web/plugs/analytics_identify.ex | web/plugs/analytics_identify.ex | defmodule CodeCorps.Plug.AnalyticsIdentify do
@moduledoc """
Plug used to identify the current user on Segment.com using `CodeCorps.Analytics.Segment`.
"""
def init(opts), do: opts
def call(conn, _opts) do
if current_user = conn.assigns[:current_user] do
CodeCorps.Analytics.Segment.identify(curr... | defmodule CodeCorps.Plug.AnalyticsIdentify do
@moduledoc """
Plug used to identify the current user on Segment.com using `CodeCorps.Analytics.Segment`.
"""
def init(opts), do: opts
def call(conn, _opts), do: conn |> identify
defp identify(%{assigns: %{current_user: user}} = conn) do
CodeCorps.Analy... | Refactor AnalyticsIdentify plug to use pattern matching | Refactor AnalyticsIdentify plug to use pattern matching
Made private
| Elixir | mit | code-corps/code-corps-api,crodriguez1a/code-corps-api,code-corps/code-corps-api,crodriguez1a/code-corps-api |
9712823fe6c63c49fbcb8cafca874c472ae8e11d | lib/chess/auth/error_handler.ex | lib/chess/auth/error_handler.ex | defmodule Chess.Auth.ErrorHandler do
@moduledoc false
import Plug.Conn
def auth_error(conn, {_type, _reason}, _opts) do
conn
|> Phoenix.Controller.put_flash(:info, "You must be logged in")
|> Phoenix.Controller.redirect(to: "/")
|> halt()
end
end
| defmodule Chess.Auth.ErrorHandler do
@moduledoc false
use ChessWeb, :controller
import Plug.Conn
def auth_error(conn, {_type, _reason}, _opts) do
conn
|> put_flash(:info, "You must be logged in")
|> redirect(to: "/")
|> halt()
end
end
| Make error handler a controller | Make error handler a controller
| Elixir | mit | danbee/chess,danbee/chess,danbee/chess |
f0e79a0f282d68af7ba50eb2563b911dfa70b14c | lib/farmbot/farmware/installer/repository/farmbot_repository.ex | lib/farmbot/farmware/installer/repository/farmbot_repository.ex | defmodule Farmbot.Farmware.Installer.Repository.Farmbot do
@moduledoc false
@behaviour Farmbot.Farmware.Installer.Repository
def url, do: "https://raw.githubusercontent.com/FarmBot-Labs/farmware_manifests/a9f391fd309f61de5da4d181418032aab08e31a6/manifest.json"
end
| defmodule Farmbot.Farmware.Installer.Repository.Farmbot do
@moduledoc false
@behaviour Farmbot.Farmware.Installer.Repository
def url, do: "https://raw.githubusercontent.com/FarmBot-Labs/farmware_manifests/master/manifest.json"
end
| Change repo url back to upstream | Change repo url back to upstream
| Elixir | mit | FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os |
34b66f0302b1843acdde98ead588341bb9c7d6f5 | apps/ello_events/lib/ello_events/mark_notifications_as_read.ex | apps/ello_events/lib/ello_events/mark_notifications_as_read.ex | defmodule Ello.Events.MarkNotificationsAsRead do
use Ello.Events.Sidekiq
defstruct [
user_id: nil,
last_notification_time: 0,
]
def args(map) do
[
Map.from_struct(map),
]
end
end
| defmodule Ello.Events.MarkNotificationsAsRead do
use Ello.Events.Sidekiq
defstruct [
user_id: nil,
last_notification_time: 0,
]
def args(struct) do
[
user: struct.user_id,
last_notification_time: struct.last_notification_time,
]
end
end
| Fix mark notifications as read. | Fix mark notifications as read.
| Elixir | mit | ello/apex,ello/apex,ello/apex |
029ecafd2cedbce6fc087611882a12eb55dfcab8 | mix.exs | mix.exs | defmodule ExNcurses.Mixfile do
use Mix.Project
def project do
[app: :ex_ncurses,
version: "0.0.2",
elixir: "~> 1.1",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
compilers: [:elixir_make] ++ Mix.compilers,
make_clean: ["clean"],
deps: deps]
end
# ... | defmodule ExNcurses.Mixfile do
use Mix.Project
def project do
[app: :ex_ncurses,
version: "0.0.2",
elixir: "~> 1.1",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
compilers: [:elixir_make] ++ Mix.compilers,
make_clean: ["clean"],
deps: deps()]
end
... | Fix warnings on Elixir 1.4 | Fix warnings on Elixir 1.4
| Elixir | mit | jfreeze/ex_ncurses,jfreeze/ex_ncurses |
a179b658003f52ec7051898657a0919cad05311f | mix.exs | mix.exs | defmodule Credo.Mixfile do
use Mix.Project
def project do
[
app: :credo,
version: "0.6.1",
elixir: "~> 1.1",
escript: [main_module: Credo.CLI],
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps(),
test_coverage: [tool: Coverex.Task],... | defmodule Credo.Mixfile do
use Mix.Project
def project do
[
app: :credo,
version: "0.6.1",
elixir: "~> 1.1",
escript: [main_module: Credo.CLI],
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps(),
test_coverage: [tool: Coverex.Task],... | Update HEx description for Credo package | Update HEx description for Credo package
| Elixir | mit | rrrene/credo,rrrene/credo |
c8b2590598e54abc0ae77fbbc323f8ad1dcc32da | lib/meal_tracker/commands/add.ex | lib/meal_tracker/commands/add.ex | defmodule MealTracker.Commands.Add do
@moduledoc """
Add an entry to a daily food log.
```
track add [options] ENTRY
```
By default, it adds the entry to the food log for the current date.
## Command-line options
* `--for DATE` - Allows adding the entry to the food log for a given date
"""
use ... | defmodule MealTracker.Commands.Add do
@moduledoc """
Add an entry to a daily food log.
```
track add [options] ENTRY
```
By default, it adds the entry to the food log for the current date.
## Command-line options
* `--for DATE` - Allows adding the entry to the food log for a given date
`DATE` mus... | Add note about required format for DATE | :memo: Add note about required format for DATE
| Elixir | mit | lee-dohm/meal-tracker,lee-dohm/meal-tracker |
04f7cf71c0595097d596b26700e59366642014fb | lib/asciinema/emails/email.ex | lib/asciinema/emails/email.ex | defmodule Asciinema.Emails.Email do
use Bamboo.Phoenix, view: AsciinemaWeb.EmailView
import Bamboo.Email
def signup_email(email_address, signup_url) do
hostname = instance_hostname()
base_email()
|> to(email_address)
|> subject("Welcome to #{hostname}")
|> render("signup.text", signup_url: s... | defmodule Asciinema.Emails.Email do
use Bamboo.Phoenix, view: AsciinemaWeb.EmailView
import Bamboo.Email
def signup_email(email_address, signup_url) do
hostname = instance_hostname()
base_email()
|> to(email_address)
|> subject("Welcome to #{hostname}")
|> render("signup.text", signup_url: s... | Use instance's hostname in default reply-to address | Use instance's hostname in default reply-to address
| Elixir | apache-2.0 | asciinema/asciinema-server,asciinema/asciinema-server,asciinema/asciinema-server,asciinema/asciinema-server |
1ddcc1d49e34da2a4905636aa7ff4d9689ffeb00 | web/controllers/page_controller.ex | web/controllers/page_controller.ex | defmodule MrRebase.PageController do
use MrRebase.Web, :controller
def index(conn, _params) do
access_token = get_session(conn, :access_token)
user = get_session(conn, :user)
if access_token do
repositories = Tentacat.Repositories.list_users(user.login)
end
render conn, "index.html", %{... | defmodule MrRebase.PageController do
use MrRebase.Web, :controller
def index(conn, _params) do
access_token = get_session(conn, :access_token)
user = get_session(conn, :user)
if access_token do
client = Tentacat.Client.new(%{access_token: access_token})
repositories = repositories_for_logi... | Return max number of repositories | Return max number of repositories
| Elixir | mit | wojtekmach/mr-rebase,wojtekmach/mr-rebase |
93e00c3f603ce40716f4554bd32ad0d97d61979c | test/test_helper.exs | test/test_helper.exs | ExUnit.start()
case :gen_tcp.connect('localhost', 6379, []) do
{:ok, socket} ->
:gen_tcp.close(socket)
{:error, reason} ->
msg = "Cannot connect to Redis (http://localhost:6379): #{:inet.format_error(reason)}"
IO.puts :stderr, IO.ANSI.format([:red, msg])
System.halt(1)
end
defmodule Redix.TestHelp... | ExUnit.start()
case :gen_tcp.connect('localhost', 6379, []) do
{:ok, socket} ->
:gen_tcp.close(socket)
{:error, reason} ->
Mix.raise "Cannot connect to Redis (http://localhost:6379): #{:inet.format_error(reason)}"
end
defmodule Redix.TestHelpers do
def silence_log(fun) do
Logger.remove_backend :cons... | Use `Mix.raise` insted of `IO.puts` + `System.exit(1)` | Use `Mix.raise` insted of `IO.puts` + `System.exit(1)`
| Elixir | mit | whatyouhide/redix |
a6c2727a771dde0a112714fcd9cba1961323aaec | web/view.ex | web/view.ex | defmodule OAuth2Example.View do
use Phoenix.View, root: "web/templates"
# The quoted expression returned by this block is applied
# to this module and all other views that use this module.
using do
quote do
# Import common functionality
import OAuth2Example.Router.Helpers
# Use Phoenix.HT... | defmodule OAuth2Example.View do
use Phoenix.View, root: "web/templates"
# The quoted expression returned by this block is applied
# to this module and all other views that use this module.
using do
quote do
# Import common functionality
import OAuth2Example.Router.Helpers
# Use Phoenix.HT... | Remove Flash module from base View | Remove Flash module from base View
| Elixir | mit | scrogson/oauth2_example,cdegroot/clueless,cdegroot/clueless,cdegroot/clueless,phoenix-examples/oauth2_example,scrogson/oauth2_example,wsmoak/phoenix_oauth2_example |
5c0d7e8ad018edc9d0a72d0071ce01b85f27d368 | lib/phoenix/template/eex_engine.ex | lib/phoenix/template/eex_engine.ex | defmodule Phoenix.Template.EExEngine do
@moduledoc """
The Phoenix engine that handles the `.eex` extension.
"""
@behaviour Phoenix.Template.Engine
def compile(path, name) do
EEx.compile_file(path, engine: engine_for(name), line: 1, trim: true)
end
defp engine_for(name) do
case Phoenix.Template... | defmodule Phoenix.Template.EExEngine do
@moduledoc """
The Phoenix engine that handles the `.eex` extension.
"""
@behaviour Phoenix.Template.Engine
def compile(path, name) do
EEx.compile_file(path, engine: engine_for(name), line: 1)
end
defp engine_for(name) do
case Phoenix.Template.format_enco... | Revert "Trim whitespace on EEx engines when Elixir >= 1.1" | Revert "Trim whitespace on EEx engines when Elixir >= 1.1"
Let's save this for Phoenix v1.1 as it may break test suites
This reverts commit b820aa122c50358e707738b2d6900fda83593247.
| Elixir | mit | ephe-meral/phoenix,michalmuskala/phoenix,y-yagi/phoenix,manukall/phoenix,evax/phoenix,pap/phoenix,DavidAlphaFox/phoenix,foxnewsnetwork/phoenix,mitchellhenke/phoenix,korobkov/phoenix,eksperimental/phoenix,Gazler/phoenix,keathley/phoenix,andrewvy/phoenix,lono-devices/phoenix,vic/phoenix,Rumel/phoenix,Smulligan85/phoenix,... |
e9c6fd38ff14937c2f437dfb6d0e44bb7b0f6b4e | lib/gn_server/router/submit.ex | lib/gn_server/router/submit.ex | # Contains the data submission routes
defmodule GnServer.Router.Submit do
use Maru.Router
# plug CORSPlug, origin: ["*"]
IO.puts "Setup submit routing"
alias GnServer.Data.UpdateStore, as: UpdateStore
# alias GnServer.Logic.Assemble, as: Assemble
# Test with:
# echo -e -n "hello world" |curl -X PUT... | # Contains the data submission routes
defmodule GnServer.Router.Submit do
use Maru.Router
# plug CORSPlug, origin: ["*"]
IO.puts "Setup submit routing"
alias GnServer.Data.UpdateStore, as: UpdateStore
# alias GnServer.Logic.Assemble, as: Assemble
# Test with:
# echo -e -n "hello world" |curl -X PUT... | Add upload route, basic uploading functionality | Add upload route, basic uploading functionality
| Elixir | agpl-3.0 | chfi/gn_server,genenetwork/gn_server |
9437bcab78cada33163b20e295a4462199985b44 | backend/apps/serverboards/priv/repo/migrations/20170522202029_notification-text-body.exs | backend/apps/serverboards/priv/repo/migrations/20170522202029_notification-text-body.exs | defmodule :"Elixir.Serverboards.Repo.Migrations.Notification-text-body" do
use Ecto.Migration
def change do
alter table :notifications_notification do
modify :body, :text
end
end
end
| defmodule :"Elixir.Serverboards.Repo.Migrations.Notification-text-body" do
use Ecto.Migration
def up do
alter table :notifications_notification do
modify :body, :text
end
end
def down do
alter table :notifications_notification do
modify :body, :varchar, max_length: 256
end
end
end... | Fix down alter notification text migration | Fix down alter notification text migration
| Elixir | apache-2.0 | serverboards/serverboards,serverboards/serverboards,serverboards/serverboards,serverboards/serverboards,serverboards/serverboards |
d186d1ac9451373ddef852d427ce14c0381eed1a | web/controllers/auth_controller.ex | web/controllers/auth_controller.ex | defmodule Pullhub.AuthController do
require Logger
use Pullhub.Web, :controller
plug Ueberauth
alias Ueberauth.Strategy.Helpers
def index(conn, _params) do
render(conn, "index.html", layout: {Pullhub.LayoutView, "auth_layout.html"})
end
def request(conn, _params) do
render(conn, "request.html",... | defmodule Pullhub.AuthController do
require Logger
use Pullhub.Web, :controller
plug Ueberauth
alias Ueberauth.Strategy.Helpers
def index(conn, _params) do
render(conn, "index.html", layout: {Pullhub.LayoutView, "auth_layout.html"})
end
def request(conn, _params) do
render(conn, "request.html",... | Stop showing user id and email after login | Stop showing user id and email after login
| Elixir | mit | substancelab/pullhub,substancelab/pullhub,substancelab/pullhub |
a39fd577ba4b49885baa37f4b9a6ac078174f20d | lib/csv/defaults.ex | lib/csv/defaults.ex | defmodule CSV.Defaults do
@moduledoc ~S"""
The module defaults of CSV.
"""
defmacro __using__(_) do
quote do
@separator ?,
@newline_character ?\n
@newline <<@newline_character::utf8>>
@carriage_return_character ?\r
@carriage_return <<@carriage_return_character::utf8>>
@e... | defmodule CSV.Defaults do
@moduledoc ~S"""
The module defaults of CSV.
"""
defmacro __using__(_) do
quote do
@separator ?,
@newline_character ?\n
@newline <<@newline_character::utf8>>
@carriage_return_character ?\r
@carriage_return <<@carriage_return_character::utf8>>
@e... | Remove leftover default for :`strip_fields` | Remove leftover default for :`strip_fields` | Elixir | mit | beatrichartz/csv,beatrichartz/csv |
dee69b2dc2d46937c5a38a5dc7d619c1f3cc10ac | lib/tilex/slack.ex | lib/tilex/slack.ex | defmodule Tilex.Slack do
def notify(post, developer, _, url) do
endpoint = System.get_env("slack_post_endpoint")
text = "#{developer.username} created a new post <#{url}|#{post.title}>"
spawn(
fn ->
HTTPoison.post("https://hooks.slack.com" <> endpoint, "{\"text\": \"#{text}\"}")
end
... | defmodule Tilex.Slack do
def notify(post, developer, channel, url) do
endpoint = System.get_env("slack_post_endpoint")
text = "#{developer.username} created a new post <#{url}|#{post.title}> ##{channel.twitter_hashtag}"
spawn(
fn ->
HTTPoison.post("https://hooks.slack.com" <> endpoint, "{\"... | Add channel hashtag to Slack post | Add channel hashtag to Slack post
Close #73
| Elixir | mit | hashrocket/tilex,hashrocket/tilex,hashrocket/tilex |
69016f4933633cda56b46f0402bef4c9d12ba0b3 | test/mmdb2/result_test.exs | test/mmdb2/result_test.exs | defmodule Geolix.Adapter.MMDB2.ResultTest do
use ExUnit.Case, async: true
alias Geolix.Adapter.MMDB2.Result
defp result_for(type), do: Result.to_struct(type, %{}, nil).__struct__
test "unknown type is unmodified" do
data = %{foo: :bar}
assert data == Result.to_struct("invalid-type", data, nil)
end... | defmodule Geolix.Adapter.MMDB2.ResultTest do
use ExUnit.Case, async: true
alias Geolix.Adapter.MMDB2.Result
test "unknown type is unmodified" do
assert %{foo: :bar} = Result.to_struct("invalid-type", %{foo: :bar}, nil)
end
test "type to struct mapping" do
assert %Result.City{} = Result.to_struct("G... | Clean up result struct conversion test | Clean up result struct conversion test
| Elixir | apache-2.0 | elixir-geolix/adapter_mmdb2,elixir-geolix/adapter_mmdb2 |
2c0b14f02f8efcb2168ffd09dd4ec264e11724bc | lib/elixir_base.ex | lib/elixir_base.ex | defmodule ElixirBase do
end
| defmodule ElixirBase do
@moduledoc """
Entry point of library/application.
"""
def start(_type, _args) do
System.halt 0
end
end
| Add start function to main module | Add start function to main module
| Elixir | mit | fs/elixir-base |
caa664fbdb734f8bd2a1da74bea0c0f91d9f6027 | api/lib/api/images/router.ex | api/lib/api/images/router.ex | defmodule Api.Images.Router do
use Plug.Router
alias Api.Documents.Index
import Api.RouterUtils
plug :match
plug Api.Documents.ReadableProjectsPlug
plug :dispatch
get "/:project/:id" do
IO.puts "#{project}:#{id}"
result = Api.Images.CantaloupeAdapter.get(project, id)
# IO.inspect result
... | defmodule Api.Images.Router do
use Plug.Router
alias Api.Documents.Index
import Api.RouterUtils
plug :match
plug Api.Documents.ReadableProjectsPlug
plug :dispatch
get "/:project/:id" do
with {:ok, %{body: image_data}} <- Api.Images.CantaloupeAdapter.get(project, id) do
conn
|> put_resp... | Use with instead of case | Use with instead of case
| Elixir | apache-2.0 | dainst/idai-field-web,dainst/idai-field-web,dainst/idai-field-web |
b0cb09b6322ceac46db766caa5e93ed28e3ded30 | mix.exs | mix.exs | defmodule Floki.Mixfile do
use Mix.Project
@description "Floki is a simple HTML parser that enables search for nodes using CSS selectors."
@version "0.19.2"
def project do
[
app: :floki,
name: "Floki",
version: @version,
description: @description,
elixir: ">= 1.3.0",
pa... | defmodule Floki.Mixfile do
use Mix.Project
@description "Floki is a simple HTML parser that enables search for nodes using CSS selectors."
@version "0.19.2"
def project do
[
app: :floki,
name: "Floki",
version: @version,
description: @description,
elixir: ">= 1.3.0",
pa... | Include HTML entities to the applications list | Include HTML entities to the applications list
This should enable the app to run correctly in production.
It fixes https://github.com/philss/floki/issues/163
| Elixir | mit | philss/floki,philss/floki |
7de824d9c716530f91837ac19ced376e41e64f63 | lib/tesla/middleware/path_params.ex | lib/tesla/middleware/path_params.ex | defmodule Tesla.Middleware.PathParams do
@moduledoc """
Use templated URLs with separate params.
Useful when logging or reporting metric per URL.
## Example usage
```
defmodule MyClient do
use Tesla
plug Tesla.Middleware.BaseURl, "https://api.example.com"
plug Tesla.Middleware.Logger # or so... | defmodule Tesla.Middleware.PathParams do
@moduledoc """
Use templated URLs with separate params.
Useful when logging or reporting metric per URL.
## Example usage
```
defmodule MyClient do
use Tesla
plug Tesla.Middleware.BaseURl, "https://api.example.com"
plug Tesla.Middleware.Logger # or so... | Change regular expresion to avoid trying to replace port in url | Change regular expresion to avoid trying to replace port in url
| Elixir | mit | teamon/tesla,monterail/tesla |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.