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 |
|---|---|---|---|---|---|---|---|---|---|
26e99fa2dd81aa87b99abf95df67e6f0f1b307d4 | mix.exs | mix.exs | defmodule Mix.Tasks.Compile.Ws281x do
def run(_) do
0 = Mix.Shell.IO.cmd("make priv/rpi_ws281x")
Mix.Project.build_structure
:ok
end
end
defmodule Nerves.IO.Neopixel.Mixfile do
use Mix.Project
def project, do: [
app: :nerves_io_neopixel,
version: "0.2.0",
description: "Drive WS2812B \"... | defmodule Mix.Tasks.Compile.Ws281x do
def run(_) do
0 = Mix.Shell.IO.cmd("make priv/rpi_ws281x")
Mix.Project.build_structure
:ok
end
end
defmodule Nerves.IO.Neopixel.Mixfile do
use Mix.Project
def project, do: [
app: :nerves_io_neopixel,
version: "0.2.0",
description: "Drive WS2812B \"... | Remove the rel folder from the Hex package | Remove the rel folder from the Hex package
| Elixir | mit | GregMefford/nerves_io_neopixel,alexrothenberg/nerves_neopixel,GregMefford/nerves_neopixel |
4a30f8e5f7fd568db972dedfb4361338953fff00 | mix.exs | mix.exs | defmodule Tzdata.Mixfile do
use Mix.Project
def project do
[app: :tzdata,
name: "tzdata",
version: "0.1.6",
elixir: "~> 1.0 or ~> 1.1",
package: package,
description: description,
deps: deps]
end
def application do
[applications: [:httpoison, :logger],
mod: {Tzdata.Ap... | defmodule Tzdata.Mixfile do
use Mix.Project
def project do
[app: :tzdata,
name: "tzdata",
version: "0.5.0-dev",
elixir: "~> 1.0 or ~> 1.1",
package: package,
description: description,
deps: deps]
end
def application do
[applications: [:httpoison, :logger],
mod: {Tzdat... | Change version for ETS/auto. Skipping 0.2 through 0.4 to make way for breaking changes while keeping old structure. | Change version for ETS/auto. Skipping 0.2 through 0.4
to make way for breaking changes while keeping old structure.
| Elixir | mit | PSPDFKit-labs/tzdata,falood/tzdata |
078da9388601dd7c082ac9c6b2857e595921c069 | lib/elixir/lib/uri/parser.ex | lib/elixir/lib/uri/parser.ex | defmodule URI.Parser do
@moduledoc """
Defines the behavior for each URI.Parser.
Check URI.HTTP for a possible implementation.
"""
use Behaviour
@doc """
Responsible for parsing extra URL information.
"""
defcallback parse(uri_info)
@doc """
Responsible for returning the default port.
"""
d... | defmodule URI.Parser do
@moduledoc """
Defines the behavior for each URI.Parser.
Check URI.HTTP for a possible implementation.
"""
use Behaviour
@doc """
Responsible for parsing extra URL information.
"""
defcallback parse(uri_info :: URI.Info.t), do: URI.Info.t
@doc """
Responsible for returni... | Use new callbacks in URI.Parser | Use new callbacks in URI.Parser
| Elixir | apache-2.0 | kelvinst/elixir,joshprice/elixir,gfvcastro/elixir,kimshrier/elixir,ggcampinho/elixir,lexmag/elixir,antipax/elixir,antipax/elixir,beedub/elixir,kelvinst/elixir,lexmag/elixir,beedub/elixir,ggcampinho/elixir,elixir-lang/elixir,pedrosnk/elixir,michalmuskala/elixir,gfvcastro/elixir,kimshrier/elixir,pedrosnk/elixir |
e9b1e47e95460e6f841c41cbe23f5d254f16f1aa | lib/ex_twilio/resources/sip_ip_access_control_list.ex | lib/ex_twilio/resources/sip_ip_access_control_list.ex | defmodule ExTwilio.SipIpAccessControlList do
@moduledoc """
Represents an SIP IPAccessControlList in the Twilio API.
- [Twilio docs](https://www.twilio.com/docs/api/rest/ip-access-control-list)
"""
defstruct sid: nil,
account_sid: nil,
friendly_name: nil,
date_created: ni... | defmodule ExTwilio.SipIpAccessControlList do
@moduledoc """
Represents an SIP IPAccessControlList in the Twilio API.
- [Twilio docs](https://www.twilio.com/docs/voice/sip/api/sip-ipaccesscontrollist-resource)
"""
defstruct sid: nil,
account_sid: nil,
friendly_name: nil,
d... | Update redirect to SipIpAccessControllList API | Update redirect to SipIpAccessControllList API
| Elixir | mit | danielberkompas/ex_twilio,danielberkompas/ex_twilio |
7630cb382df65748723b683f884d8f757ac8cdf3 | lib/pullhub/fetchers/repo_fetcher.ex | lib/pullhub/fetchers/repo_fetcher.ex | defmodule Pullhub.RepoFetcher do
require Logger
use GenServer
alias Pullhub.Repo
alias Pullhub.Repository
def start_link do
GenServer.start_link(__MODULE__, %{})
end
def init(state) do
schedule_work() # Schedule work to be performed at some point
{:ok, state}
end
def handle_info(:work... | defmodule Pullhub.RepoFetcher do
require Logger
use GenServer
alias Pullhub.Repo
alias Pullhub.User
alias Pullhub.Repository
alias Pullhub.RepositoriesService
def start_link do
GenServer.start_link(__MODULE__, %{})
end
def init(state) do
schedule_work()
{:ok, state}
end
def handle... | Make repo fetcher download and store user repositories | Make repo fetcher download and store user repositories
| Elixir | mit | substancelab/pullhub,substancelab/pullhub,substancelab/pullhub |
f335871ed6ecd98ee259d7d8287c6c8b34a9cc26 | mix.exs | mix.exs | defmodule MarcoPolo.Mixfile do
use Mix.Project
@version "0.1.0"
@supported_protocol 28
def project do
[app: :marco_polo,
version: @version,
elixir: "~> 1.0",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
aliases: ["test.all": "test --include scripting --incl... | defmodule MarcoPolo.Mixfile do
use Mix.Project
@version "0.1.0"
@supported_protocol 28
def project do
[app: :marco_polo,
version: @version,
elixir: "~> 1.0",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
# Testing
aliases: ["test.all": "test --include... | Add hex metadata to the Mixfile | Add hex metadata to the Mixfile
Added description, contributors and so on.
| Elixir | apache-2.0 | MyMedsAndMe/marco_polo,linearregression/marco_polo |
37e36c4f85ae88c7a4a73817a8d1dd9abe9a9705 | time_tracker_backend/web/resolvers/user_resolver.ex | time_tracker_backend/web/resolvers/user_resolver.ex | defmodule TimeTrackerBackend.UserResolver do
def all(_args, _info) do
{:ok, TimeTrackerBackend.Repo.all(TimeTrackerBackend.User)}
end
end
| defmodule TimeTrackerBackend.UserResolver do
alias TimeTrackerBackend.{Repo, User}
def all(_args, _info) do
{:ok, Repo.all(User)}
end
end
| Add some aliases in UserResolver | Add some aliases in UserResolver
| Elixir | mit | knewter/time-tracker,knewter/time-tracker |
70556de26317b72e4a089dec935cc529b6025d88 | lib/mogo_chat/app_config.ex | lib/mogo_chat/app_config.ex | defmodule AppConfig do
defmacro read_db_config do
cond do
database_url = System.get_env("DB_URL") ->
database_url
File.exists?("config/database.json")->
{:ok, config_json} = File.read "config/database.json"
{:ok, config} = JSEX.decode config_json
database_url = config[... | defmodule AppConfig do
defmacro read_db_config do
cond do
System.get_env("STACK") == "cedar" ->
quote do
def url do
System.get_env("DATABASE_URL")
end
end
File.exists?("config/database.json")->
{:ok, config_json} = File.read "config/database.js... | Check if heroku and use DATABASE_URL env var in read_db_config macro | Check if heroku and use DATABASE_URL env var in read_db_config macro
| Elixir | mit | sashafklein/bloc-mogo,sashafklein/bloc-mogo,di-stars/mogo-chat,di-stars/mogo-chat,louishawkins/mogo-chat,HashNuke/mogo-chat,di-stars/mogo-chat,louishawkins/mogo-chat,HashNuke/mogo-chat,louishawkins/mogo-chat,HashNuke/mogo-chat,sashafklein/bloc-mogo |
9cd3aaea622419e01399187496d2391741349e9f | exercises/hamming/hamming.exs | exercises/hamming/hamming.exs | defmodule Hamming do
@doc """
Returns number of differences between two strands of DNA, known as the Hamming Distance.
## Examples
iex> Hamming.hamming_distance('AAGTCATA', 'TAGCGATC')
{:ok, 4}
"""
@spec hamming_distance([char], [char]) :: non_neg_integer
def hamming_distance(strand1, strand2) do
en... | defmodule Hamming do
@doc """
Returns number of differences between two strands of DNA, known as the Hamming Distance.
## Examples
iex> Hamming.hamming_distance('AAGTCATA', 'TAGCGATC')
{:ok, 4}
"""
@spec hamming_distance([char], [char]) :: {:ok, non_neg_integer} | {:error, String.t()}
def hamming_dist... | Fix the spec for Hamming problem. | Fix the spec for Hamming problem.
| Elixir | mit | exercism/xelixir |
4dc3af720bf672637f18d45b218595546ff62e3b | mix.exs | mix.exs | defmodule NervesSystemLinkit.Mixfile do
use Mix.Project
@version Path.join(__DIR__, "VERSION")
|> File.read!
|> String.strip
def project do
[app: :nerves_system_linkit,
version: @version,
elixir: "~> 1.2",
compilers: Mix.compilers ++ [:nerves_system],
description: description,
... | defmodule NervesSystemLinkit.Mixfile do
use Mix.Project
@version Path.join(__DIR__, "VERSION")
|> File.read!
|> String.strip
def project do
[app: :nerves_system_linkit,
version: @version,
elixir: "~> 1.2",
compilers: Mix.compilers ++ [:nerves_system],
description: description(),
... | Clean up bare function warnings for Elixir 1.4. | Clean up bare function warnings for Elixir 1.4.
| Elixir | apache-2.0 | brucepom/nerves_system_linkit_wifi_ap,brucepom/nerves_system_linkit_wifi_ap |
2db6f0b29e6099d3ee7d486f1bff5dd365c1bd65 | lib/phoenix/router/router.ex | lib/phoenix/router/router.ex | defmodule Phoenix.Router do
use GenServer.Behaviour
alias Phoenix.Plugs
alias Phoenix.Router.Options
alias Phoenix.Adapters.Cowboy
defmacro __using__(plug_adapter_options \\ []) do
quote do
use Phoenix.Router.Mapper
use Phoenix.Adapters.Cowboy
import unquote(__MODULE__)
@before_c... | defmodule Phoenix.Router do
use GenServer.Behaviour
alias Phoenix.Plugs
alias Phoenix.Router.Options
alias Phoenix.Adapters.Cowboy
defmacro __using__(plug_adapter_options \\ []) do
quote do
use Phoenix.Router.Mapper
use Phoenix.Adapters.Cowboy
import unquote(__MODULE__)
@before_c... | Add stop/shutdown task to Router | Add stop/shutdown task to Router
| Elixir | mit | hsavit1/phoenix,Fluxuous/phoenix,dmarkow/phoenix,ACPK/phoenix,stevedomin/phoenix,justnoxx/phoenix,sadiqmmm/phoenix,ephe-meral/phoenix,dmarkow/phoenix,mobileoverlord/phoenix,Smulligan85/phoenix,Eventacular/phoenix,kevinold/phoenix,Kosmas/phoenix,jeffkreeftmeijer/phoenix,ephe-meral/phoenix,lancehalvorsen/phoenix,michalmu... |
41aa5f1f1d4f4c466ed358d397208a6a228c5eb7 | lib/ex_twilio/resources/queue.ex | lib/ex_twilio/resources/queue.ex | defmodule ExTwilio.Queue do
@moduledoc """
Represents an Queue resource in the Twilio API.
- [Twilio docs](https://www.twilio.com/docs/api/rest/queues)
"""
defstruct sid: nil,
friendly_name: nil,
current_size: nil,
max_size: nil,
average_wait_time: nil
use ... | defmodule ExTwilio.Queue do
@moduledoc """
Represents an Queue resource in the Twilio API.
- [Twilio docs](https://www.twilio.com/docs/voice/api/queue-resource)
"""
defstruct sid: nil,
friendly_name: nil,
current_size: nil,
max_size: nil,
average_wait_time: ni... | Update redirect to Queue API | Update redirect to Queue API
| Elixir | mit | danielberkompas/ex_twilio,danielberkompas/ex_twilio |
9b7a17da8b8660fa224499770196a79af6d4b95a | config/config.exs | config/config.exs | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config
# Configures the endpoint
config :evercam_media, EvercamMedia.Endpoint,
url: [host:... | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config
# Configures the endpoint
config :evercam_media, EvercamMedia.Endpoint,
check_origi... | Disable origin checks for all environments | Disable origin checks for all environments
| Elixir | agpl-3.0 | shankardevy/evercam-media,shankardevy/evercam-media,shankardevy/evercam-media |
799e410df4637fecf297527ec40f950c7ebdabfa | web/models/auth_handler.ex | web/models/auth_handler.ex | defmodule EspiDni.AuthHandler do
@moduledoc """
Create or retreive the team and user from an auth request
"""
alias Ueberauth.Auth
alias EspiDni.TeamFromAuth
alias EspiDni.UserFromAuth
def init_from_auth(%Auth{} = auth) do
with {:ok, team} <- TeamFromAuth.find_or_create(auth),
{:ok, user} <... | defmodule EspiDni.AuthHandler do
@moduledoc """
Create or retreive the team and user from an auth request
"""
alias Ueberauth.Auth
alias EspiDni.TeamFromAuth
alias EspiDni.UserFromAuth
def init_from_auth(%Auth{} = auth) do
with {:ok, team} <- TeamFromAuth.find_or_create(auth),
{:ok, user} <... | Handle errors when creating team/user | Handle errors when creating team/user
| Elixir | mit | edenspiekermann/espi-dni,edenspiekermann/espi-dni |
9e3a98f1a122dd3328864dd8e8f2de1c03d84518 | lib/redix/uri.ex | lib/redix/uri.ex | defmodule Redix.URI do
@moduledoc false
@spec opts_from_uri(binary) :: Keyword.t()
def opts_from_uri(uri) when is_binary(uri) do
%URI{host: host, port: port, scheme: scheme} = uri = URI.parse(uri)
unless scheme == "redis" do
raise ArgumentError, "expected scheme to be redis://, got: #{scheme}://"
... | defmodule Redix.URI do
@moduledoc false
@spec opts_from_uri(binary) :: Keyword.t()
def opts_from_uri(uri) when is_binary(uri) do
%URI{host: host, port: port, scheme: scheme} = uri = URI.parse(uri)
unless scheme == "redis" do
raise ArgumentError, "expected scheme to be redis://, got: #{scheme}://"
... | Allow Redis URIs with empty host/port | Allow Redis URIs with empty host/port
Closes #110.
| Elixir | mit | whatyouhide/redix |
dae68db0b6212acf6cf7312fbfcaf310979427ed | test/lib/course_planner/notifier_test.exs | test/lib/course_planner/notifier_test.exs | defmodule CoursePlanner.NotifierTest do
use CoursePlanner.ModelCase
doctest CoursePlanner.Notifier
import CoursePlanner.Factory
import Swoosh.TestAssertions
alias CoursePlanner.{Notifier, Notifications, User}
test "save notification to send later" do
user = insert(:user)
notification = Notificati... | defmodule CoursePlanner.NotifierTest do
use CoursePlanner.ModelCase
doctest CoursePlanner.Notifier
import CoursePlanner.Factory
import Swoosh.TestAssertions
alias CoursePlanner.{Notifier, Notifications, User}
test "save notification to send later" do
user = insert(:user)
notification = Notificati... | Add test to direct notification. | Add test to direct notification.
| Elixir | mit | digitalnatives/course_planner,digitalnatives/course_planner,digitalnatives/course_planner |
29f2f6e016e5cb0ba44909b7e52e0517ae631a47 | lib/espi_dni/bot_supervisor.ex | lib/espi_dni/bot_supervisor.ex | defmodule EspiDni.BotSupervisor do
use Supervisor
alias EspiDni.Repo
alias EspiDni.Team
alias EspiDni.SlackRtm
def start_link do
Supervisor.start_link(__MODULE__, :ok)
end
def init(:ok) do
children = for team <- Repo.all(Team), do: worker(SlackRtm, [team.token])
supervise(children, strategy:... | defmodule EspiDni.BotSupervisor do
use Supervisor
alias EspiDni.Repo
alias EspiDni.Team
alias EspiDni.SlackRtm
# A simple module attribute that stores the supervisor name
@name EspiDni.BotSupervisor
def start_link do
Supervisor.start_link(__MODULE__, :ok, name: @name)
end
def start_bot(token) d... | Update bot supervisor to allow dynamic bot children | Update bot supervisor to allow dynamic bot children
| Elixir | mit | edenspiekermann/espi-dni,edenspiekermann/espi-dni |
2b386bc8546bd7eceba1cfb5a36ecb509dad91b4 | lib/dogma/util/ast_node.ex | lib/dogma/util/ast_node.ex | defmodule Dogma.Util.ASTNode do
@moduledoc"""
Utility functions for analyzing and categorizing AST nodes
"""
@sigil_chars "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
@doc """
Returns true if the node x is a literal
iex> Dogma.Util.ASTNode.literal?( "foo" )
true
iex> Dogma.Uti... | defmodule Dogma.Util.ASTNode do
@moduledoc """
Utility functions for analyzing and categorizing AST nodes
"""
@sigil_chars "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
@doc """
Returns true if the node x is a literal
## Examples:
iex> Dogma.Util.ASTNode.literal?( "foo" )
true
... | Clean up code in Dogma.Util.ASTNode | Clean up code in Dogma.Util.ASTNode
This cleans up some code to adhere to the style guide we are sometimes
referring to.
| Elixir | mit | rrrene/dogma,meadsteve/dogma,simonewebdesign/dogma,timbuchwaldt/dogma,5thWall/dogma |
ba05e9fa1f24328df1a2dd2bf31b50e3aec36f39 | config/travis.exs | config/travis.exs | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :ifires_sunshine_battleacademy, IfiresSunshineBattleacademy.Web.Endpoint,
http: [port: 4001],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
# Configur... | use Mix.Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :ifires_sunshine_battleacademy, IfiresSunshineBattleacademy.Web.Endpoint,
http: [port: 4001],
server: false
# Print only warnings and errors during test
config :logger, level: :warn
# Configur... | Use sandbox pool in test. | Use sandbox pool in test.
| Elixir | apache-2.0 | djdduty/sunshines_battleacademy,fire/sunshines_battleacademy,djdduty/sunshines_battleacademy,fire/sunshines_battleacademy |
567879c31056824d7423cfc855a8d8c2f6a2e393 | test/integration/public_channel_test.exs | test/integration/public_channel_test.exs | defmodule Poxa.Integration.PublicChannelTest do
use ExUnit.Case
setup_all do
:ok = Pusher.start
:application.set_env(:pusher, :host, "http://localhost")
:application.set_env(:pusher, :port, "8080")
:application.set_env(:pusher, :app_id, "app_id")
:application.set_env(:pusher, :app_key, "app_key... | defmodule Poxa.Integration.PublicChannelTest do
use ExUnit.Case
setup_all do
:ok = Pusher.start
:application.set_env(:pusher, :host, "http://localhost")
:application.set_env(:pusher, :port, "8080")
:application.set_env(:pusher, :app_id, "app_id")
:application.set_env(:pusher, :app_key, "app_key... | Raise timeout on assert_receive for integration test | Raise timeout on assert_receive for integration test
| Elixir | mit | edgurgel/poxa,theinventor/rs-poxa,edgurgel/poxa,joshk/poxa,edgurgel/poxa,RobertoSchneiders/poxa,waffleio/poxa,waffleio/poxa,joshk/poxa,RobertoSchneiders/poxa |
b82b308eecf7f899fd801ecb1f9b9525d24fbeff | mix.exs | mix.exs | defmodule Cobalt.Mixfile do
use Mix.Project
def project do
[ app: :cobalt,
version: "0.0.1",
build_per_environment: true,
dynamos: [Cobalt.Dynamo],
compilers: [:elixir, :dynamo, :app],
deps: deps ]
end
# Configuration for the OTP application
def application do
[ applica... | defmodule Cobalt.Mixfile do
use Mix.Project
def project do
[ app: :cobalt,
version: "0.0.1",
build_per_environment: true,
dynamos: [Cobalt.Dynamo],
compilers: [:elixir, :dynamo, :app],
deps: deps ]
end
# Configuration for the OTP application
def application do
[ applica... | Add bcrypt to the list of applications to start | Add bcrypt to the list of applications to start
| Elixir | mit | di-stars/mogo-chat,di-stars/mogo-chat,sashafklein/bloc-mogo,sashafklein/bloc-mogo,louishawkins/mogo-chat,louishawkins/mogo-chat,HashNuke/mogo-chat,louishawkins/mogo-chat,HashNuke/mogo-chat,sashafklein/bloc-mogo,HashNuke/mogo-chat,di-stars/mogo-chat |
eea29c68bedaa593401b83291a3bd46a7ed98fe4 | mix.exs | mix.exs | defmodule Export.Mixfile do
use Mix.Project
def project do
[
app: :export,
description: "Erlport wrapper for Elixir",
package: package(),
version: "0.1.0",
elixir: "~> 1.2",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps(),
... | defmodule Export.Mixfile do
use Mix.Project
def project do
[
app: :export,
description: "Erlport wrapper for Elixir",
package: package(),
version: "0.1.0",
elixir: "~> 1.2",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps(),
... | Add erlport to dependent application | Add erlport to dependent application
| Elixir | mit | fazibear/export,fazibear/export |
66163f35dbe1ae3f6de1688e1bfd9f0bb3a9e571 | test/plugs/authenticated_test.exs | test/plugs/authenticated_test.exs | defmodule AuthenticatedTest do
use ExUnit.Case, async: true
use Plug.Test
alias Addict.Plugs.Authenticated, as: Auth
@session_opts Plug.Session.init [
store: :cookie,
key: "_test",
encryption_salt: "abcdefgh",
signing_salt: "abcdefgh"
]
@authenticated_opts Auth.init []
setup_all do
... | defmodule AuthenticatedTest do
use ExUnit.Case, async: true
use Plug.Test
alias Addict.Plugs.Authenticated, as: Auth
@session_opts Plug.Session.init [
store: :cookie,
key: "_test",
encryption_salt: "abcdefgh",
signing_salt: "abcdefgh"
]
@authenticated_opts Auth.init []
setup_all do
... | Fix failing test on authenticated tests | Fix failing test on authenticated tests
| Elixir | mit | suranyami/addict,altenwald/addict,pap/addict,trenpixster/addict,trenpixster/addict,esbullington/addict |
117fc9f27c4ce060007cf9eff2a2f5f47f69f33c | web/router.ex | web/router.ex | defmodule Streakable.Router do
use Streakable.Web, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json"]
end
pipeline :with_session do
... | defmodule Streakable.Router do
use Streakable.Web, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json"]
end
pipeline :with_session do
... | Add routing for logined user | Add routing for logined user
| Elixir | mit | streakable/streakable,streakable/streakable,streakable/streakable |
b8196fc7f82230110f9098937253eb2aec2d4739 | lib/oauth2_example/endpoint.ex | lib/oauth2_example/endpoint.ex | defmodule OAuth2Example.Endpoint do
use Phoenix.Endpoint, otp_app: :o_auth2_example
plug Plug.Static,
at: "/", from: :o_auth2_example
plug Plug.Logger
plug Phoenix.CodeReloader
plug Plug.Parsers,
parsers: [:urlencoded, :multipart, :json],
pass: ["*/*"],
json_decoder: Poison
plug Plug.Me... | defmodule OAuth2Example.Endpoint do
use Phoenix.Endpoint, otp_app: :o_auth2_example
plug Plug.Static,
at: "/", from: :o_auth2_example,
only: ~w(css js images)
plug Plug.Logger
plug Phoenix.CodeReloader
plug Plug.Parsers,
parsers: [:urlencoded, :multipart, :json],
pass: ["*/*"],
json_de... | Update Plug.Static with `:only` option | Update Plug.Static with `:only` option
| Elixir | mit | wsmoak/phoenix_oauth2_example,cdegroot/clueless,cdegroot/clueless,phoenix-examples/oauth2_example,cdegroot/clueless,scrogson/oauth2_example,scrogson/oauth2_example |
07fe6fa9ab9dce388974f0a6017c99bcc3c41c36 | test/xee/theme_server_test.exs | test/xee/theme_server_test.exs | defmodule Xee.ThemeServerTest do
use ExUnit.Case
alias Xee.ThemeServer, as: ThemeServer
setup do
ThemeServer.start_link()
on_exit fn ->
case Process.whereis(ThemeServer) do
pid when is_pid(pid) -> Process.exit(pid, :kill)
_ -> nil
end
end
:ok
end
test "register an... | defmodule Xee.ThemeServerTest do
use ExUnit.Case
alias Xee.ThemeServer, as: ThemeServer
setup do
on_exit fn ->
Agent.stop(ThemeServer)
ThemeServer.start_link()
end
:ok
end
test "register and get" do
assert :ok == ThemeServer.register(:a, :A)
assert :ok == ThemeServer.register... | Fix the test of ThemeServer | Fix the test of ThemeServer
| Elixir | mit | xeejp/xee,xeejp/xee,xeejp/xee,xeejp/xee,xeejp/xee |
5e6e385b889e4047786602ab4dcf79f9974ed1c0 | lib/api/endpoint.ex | lib/api/endpoint.ex | defmodule API.Endpoint do
@moduledoc """
Phoenix Endpoint for gateway_api application.
"""
use Phoenix.Endpoint, otp_app: :gateway_api
require Logger
# Allow acceptance tests to run in concurrent mode
if Confex.get(:gateway_api, :sql_sandbox) do
plug Phoenix.Ecto.SQL.Sandbox
end
# Code reloading... | defmodule API.Endpoint do
@moduledoc """
Phoenix Endpoint for gateway_api application.
"""
use Phoenix.Endpoint, otp_app: :gateway_api
require Logger
# Allow acceptance tests to run in concurrent mode
if Confex.get(:gateway_api, :sql_sandbox) do
plug Phoenix.Ecto.SQL.Sandbox
end
# Code reloading... | Add template to server priv/static | Add template to server priv/static
| Elixir | mit | Nebo15/tokenizer.api |
5d2a5918eb3b2b346f8f89dd7f4ee121fe1be938 | test/elixir/function_test.ex | test/elixir/function_test.ex | Code.require File.expand_path("../test_helper", __FILE__)
object FunctionTest
proto ExUnit::Case
def arity_test
0 = (-> 'a).arity
1 = (-> (a) a).arity
2 = (-> (a,b) a + b).arity
end
def anonymous_function_test
fun = _.arity
'Function = fun.__parent_name__
1 = fun(-> (a) a)
sum = ... | Code.require File.expand_path("../test_helper", __FILE__)
object FunctionTest
proto ExUnit::Case
def arity_test
0 = (-> 'a).arity
1 = (-> (a) a).arity
2 = (-> (a,b) a + b).arity
end
def anonymous_function_test
fun = _.arity
'Function = fun.__parent_name__
1 = fun(-> (a) a)
sum = ... | Add tests for match arg. | Add tests for match arg.
| Elixir | apache-2.0 | pedrosnk/elixir,ggcampinho/elixir,gfvcastro/elixir,beedub/elixir,beedub/elixir,lexmag/elixir,kimshrier/elixir,kelvinst/elixir,kimshrier/elixir,lexmag/elixir,ggcampinho/elixir,semahawk/elixir,gfvcastro/elixir,michalmuskala/elixir,pedrosnk/elixir,elixir-lang/elixir,joshprice/elixir,antipax/elixir,antipax/elixir,kelvinst/... |
59a5f25f38097e8f42ab649e2adb9fb153fa7027 | priv/repo/migrations/20151225053919_create_user.exs | priv/repo/migrations/20151225053919_create_user.exs | defmodule Xee.Repo.Migrations.CreateUser do
use Ecto.Migration
def change do
create table(:user) do
add :name, :string
add :crypted_password, :string
timestamps
end
end
end
| defmodule Xee.Repo.Migrations.CreateUser do
use Ecto.Migration
def change do
create table(:user) do
add :name, :string, null: false;
add :crypted_password, :string, null: false;
timestamps
end
# add unique constraints to user.name
create unique_index(:user, [:name])
end
end
| Modify migration file to add unique constraint to all fields. | Modify migration file to add unique constraint to all fields.
| Elixir | mit | xeejp/xee,xeejp/xee,xeejp/xee,xeejp/xee,xeejp/xee |
c3b3926cd54ea2cc6e7a0426cb3ef44c0a5fd31e | test/strava/club_test.exs | test/strava/club_test.exs | defmodule Strava.ClubTest do
use ExUnit.Case, async: false
use ExVCR.Mock, adapter: ExVCR.Adapter.Hackney
doctest Strava.Club
setup_all do
HTTPoison.start
end
test "retrieve club" do
use_cassette "club/retrieve#1" do
club = Strava.Club.retrieve(1)
assert club != nil
assert club... | defmodule Strava.ClubTest do
use ExUnit.Case, async: false
use ExVCR.Mock, adapter: ExVCR.Adapter.Hackney
doctest Strava.Club
setup_all do
HTTPoison.start
end
test "retrieve club" do
use_cassette "club/retrieve#1" do
club = Strava.Club.retrieve(1)
assert club != nil
assert club... | Include `match_requests_on: [:query]` for list club members unit tests | Include `match_requests_on: [:query]` for list club members unit tests
| Elixir | mit | slashdotdash/strava |
d67cae7a3eeb7f31df3b6a45c720ec154978def7 | apps/lexibomb_server/lib/word_list/word_list.ex | apps/lexibomb_server/lib/word_list/word_list.ex | defmodule LexibombServer.WordList do
@moduledoc """
Manages access to the list of valid gameplay words.
The default word list is based on Mendel Leo Cooper's
_[Yet Another Word List](https://github.com/elasticdog/yawl)_ (YAWL) project.
"""
@doc """
Starts an agent linked to the current process to store ... | defmodule LexibombServer.WordList do
@moduledoc """
Manages access to the list of valid gameplay words.
"""
@doc """
Starts an agent linked to the current process to store a normalized version
of `word_list`.
The default word list is based on Mendel Leo Cooper's
_[Yet Another Word List](https://github... | Move description of YAWL to the start_link function documentation | Move description of YAWL to the start_link function documentation
| Elixir | isc | elasticdog/lexibomb |
39cf0ae5a0d067aaf6d1c06ae7f1b7af40e13b23 | apps/baumeister_web/test/build_context/builds_project_test.exs | apps/baumeister_web/test/build_context/builds_project_test.exs | defmodule BaumeisterWeb.Web.Test.Builds.Project do
@moduledoc """
Tests of Projects and Builds within the Builds-Context.
"""
use BaumeisterWeb.Web.ModelCase
alias BaumeisterWeb.Web.Builds.Project
alias BaumeisterWeb.Web.Builds.Build
alias BaumeisterWeb.Web.Builds
require Logger
test "insert a proje... | defmodule BaumeisterWeb.Web.Test.Builds.Project do
@moduledoc """
Tests of Projects and Builds within the Builds-Context.
"""
use BaumeisterWeb.Web.ModelCase
alias BaumeisterWeb.Builds.Project
alias BaumeisterWeb.Builds.Build
alias BaumeisterWeb.Builds
require Logger
test "insert a project" do
f... | Use the proper namespace for modules from the Builds-Context | Use the proper namespace for modules from the Builds-Context
| Elixir | apache-2.0 | alfert/baumeister,alfert/baumeister,alfert/baumeister |
c11652510339df164fc6b0d9e2901c2f2aad5e9a | web/views/repository_view.ex | web/views/repository_view.ex | defmodule Pullhub.RepositoryView do
use Pullhub.Web, :view
def user_has_repo_checked(repository) do
repository.enabled
end
end
| defmodule Pullhub.RepositoryView do
use Pullhub.Web, :view
end
| Remove user_has_repo_checked in repository view | Remove user_has_repo_checked in repository view
It was so simple so It's now been moved into the template
| Elixir | mit | substancelab/pullhub,substancelab/pullhub,substancelab/pullhub |
30eee3dc6163a4ffcd2477983c4d6eb1e21314e3 | test/elixir/eex/engine_test.exs | test/elixir/eex/engine_test.exs | Code.require_file "../../test_helper", __FILE__
defmodule EEx::EngineTest do
use ExUnit::Case
require EEx::Engine, as: E
test "handle text" do
assert_equal {:"<>", 0, [[], "foo"]}, E.handle_text([], "foo")
end
test "handle equal expression" do
assert_equal {:"<>", 0, [[],{:to_binary,0,[:foo]}]}, E.... | Code.require_file "../../test_helper", __FILE__
defmodule EEx::EngineTest do
use ExUnit::Case
require EEx::Engine, as: E
test "handle text" do
assert_equal {:"<>", 0, ["", "foo"]}, E.handle_text("", "foo")
end
test "handle equal expression" do
assert_equal {:"<>", 0, ["",{:to_binary,0,[:foo]}]}, E.... | Use blank string as buffer | Use blank string as buffer
| Elixir | apache-2.0 | antipax/elixir,kelvinst/elixir,pedrosnk/elixir,kimshrier/elixir,lexmag/elixir,pedrosnk/elixir,gfvcastro/elixir,ggcampinho/elixir,antipax/elixir,beedub/elixir,kelvinst/elixir,michalmuskala/elixir,lexmag/elixir,ggcampinho/elixir,beedub/elixir,joshprice/elixir,gfvcastro/elixir,elixir-lang/elixir,kimshrier/elixir |
866f102d0d793d26df7bf49150e32c93aa7aa417 | apps/ello_grandstand/lib/ello_grandstand/client/http.ex | apps/ello_grandstand/lib/ello_grandstand/client/http.ex | defmodule Ello.Grandstand.Client.HTTP do
alias Ello.Grandstand.{Impression, Client}
@behaviour Client
use HTTPoison.Base
@doc """
Get %Impressions{} from grandstand api.
"""
def fetch_impressions(path, params) do
params = Enum.map(params, fn({k, v}) -> {Atom.to_string(k), v} end)
opts = [
p... | defmodule Ello.Grandstand.Client.HTTP do
alias Ello.Grandstand.{Impression, Client}
@behaviour Client
use HTTPoison.Base
@doc """
Get %Impressions{} from grandstand api.
"""
def fetch_impressions(path, params) do
params = Enum.map(params, fn({k, v}) -> {Atom.to_string(k), v} end)
opts = [
p... | Handle 204 responses for daily impressions | Handle 204 responses for daily impressions
| Elixir | mit | ello/apex,ello/apex,ello/apex |
a9927a95431023a808c3f9d9ffaa2f8ee3912f17 | apps/poker/test/deck_test.exs | apps/poker/test/deck_test.exs | defmodule Poker.DeckTest do
use ExUnit.Case, async: true
alias Poker.Deck
describe "Deck.new/0" do
setup do: [deck: Deck.new()]
test "deck has 52 cards", %{deck: deck} do
assert Enum.count(deck) == 52
end
test "is without duplicates", %{deck: deck} do
assert deck |> Enum.uniq() |> ... | defmodule Poker.DeckTest do
use ExUnit.Case, async: true
alias Poker.Deck
describe "Deck.new/0" do
setup do: [deck: Deck.new()]
test "deck has 52 cards", %{deck: deck} do
assert Enum.count(deck) == 52
end
test "is without duplicates", %{deck: deck} do
assert deck |> Enum.uniq() |> ... | Add test for count of values | Add test for count of values
| Elixir | mit | thetamind/elixir_phoenix_poker,thetamind/elixir_phoenix_poker |
7ef6fc4ec9636ddd9cdfef7efed399b8516aeb4f | apps/webapp/config/dev.exs | apps/webapp/config/dev.exs | use Mix.Config
require System
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :webapp, Webapp.Endpoint,
http:... | use Mix.Config
require System
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :webapp, Webapp.Endpoint,
http:... | Remove unused commented code from webapp | Remove unused commented code from webapp
| Elixir | mit | iporaitech/pwr2-docker,iporaitech/pwr2-docker |
8cec9e6e742c75a948a4af51004094eeebb0617c | apps/reddit/mix.exs | apps/reddit/mix.exs | defmodule Reddit.Mixfile do
use Mix.Project
def project do
[app: :reddit,
version: "0.0.1",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.1",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps]
end
# Configuration for the... | defmodule Reddit.Mixfile do
use Mix.Project
def project do
[app: :reddit,
version: "0.0.1",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.1",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps]
end
# Configuration for the... | Fix missing dependency on exactor | Fix missing dependency on exactor
| Elixir | mit | joekain/ds_p9 |
1cabff62f0402e4f52348660124ecbb590243dd7 | mix.exs | mix.exs | defmodule ExDocDash.Mixfile do
use Mix.Project
def project do
[
app: :ex_doc_dash,
version: "0.3.0",
elixir: "~> 1.0",
deps: deps,
description: description,
package: package,
name: "ExDocDash",
docs: [extras: ["README.md"]],
source_url: "https://github.com/JonGretar/ExDocDash",
homepa... | defmodule ExDocDash.Mixfile do
use Mix.Project
def project do
[
app: :ex_doc_dash,
version: "0.3.0",
elixir: "~> 1.0",
deps: deps,
description: description,
package: package,
name: "ExDocDash",
docs: [extras: ["README.md"]],
source_url: "https://github.com/JonGretar/ExDocDash",
homepa... | Remove earmark dependency since ExDoc already defines it | Remove earmark dependency since ExDoc already defines it
Starting in v 0.12.0, ExDoc has Earmark as a dependency. Since it's used only indirectly here by calling ExDoc.Markdown.to_html/1, we can leave it to ExDoc. | Elixir | mit | JonGretar/ExDocDash |
05ce523abc7f086ae044a62d1ea767882a1251b6 | test/wallaby/session_test.exs | test/wallaby/session_test.exs | defmodule Wallaby.SessionTest do
use Wallaby.ServerCase, async: true
use Wallaby.DSL
setup do
{:ok, session} = Wallaby.start_session
on_exit fn ->
Wallaby.end_session(session)
end
{:ok, %{session: session}}
end
test "click through to another page", %{server: server, session: session}... | defmodule Wallaby.SessionTest do
use Wallaby.ServerCase, async: false
use Wallaby.DSL
setup do
{:ok, session} = Wallaby.start_session
on_exit fn ->
Wallaby.end_session(session)
end
{:ok, %{session: session}}
end
test "click through to another page", %{server: server, session: session... | Set async false for session Test | Set async false for session Test
This test can't be async because it involves changing the global
application state.
| Elixir | mit | keathley/wallaby,aaronrenner/wallaby,keathley/wallaby,aaronrenner/wallaby |
929ebc7f4a85b6cc9c57a7302967030ecec5e585 | test/appsignal/error/backend_test.exs | test/appsignal/error/backend_test.exs | defmodule Appsignal.Error.BackendTest do
use ExUnit.Case, async: true
import ExUnit.CaptureIO
alias Appsignal.{Error.Backend, Span, WrappedNif, Test}
setup do
WrappedNif.start_link()
Test.Tracer.start_link()
:ok
end
test "is added as a Logger backend" do
assert {:error, :already_present} =... | defmodule Appsignal.Error.BackendTest do
use ExUnit.Case, async: true
import AppsignalTest.Utils
import ExUnit.CaptureIO
alias Appsignal.{Error.Backend, Span, WrappedNif, Test}
setup do
WrappedNif.start_link()
Test.Tracer.start_link()
:ok
end
test "is added as a Logger backend" do
assert... | Use until/1 to wait for created spans in BackendTest | Use until/1 to wait for created spans in BackendTest
| Elixir | mit | appsignal/appsignal-elixir,appsignal/appsignal-elixir,appsignal/appsignal-elixir,appsignal/appsignal-elixir |
b828ec0c7252d68bab8ff2e388574ccdf14429a5 | mix.exs | mix.exs | defmodule Quark.Mixfile do
use Mix.Project
def project do
[
app: :quark,
name: "Quark",
description: "Common combinators for Elixir",
version: "2.0.0",
elixir: "~> 1.3",
package: [
maintainers: ["Brooklyn Zelenka"],
licenses: ["MIT"],
links: ... | defmodule Quark.Mixfile do
use Mix.Project
def project do
[
app: :quark,
name: "Quark",
description: "Common combinators for Elixir",
version: "2.0.0",
elixir: "~> 1.3",
package: [
maintainers: ["Brooklyn Zelenka"],
licenses: ["MIT"],
links: ... | Add Credo to dev env | Add Credo to dev env
| Elixir | mit | robot-overlord/quark |
5899118327f5164dafbe6d9bb92f404dbca5d40b | mix.exs | mix.exs | defmodule Bmark.Mixfile do
use Mix.Project
def project do
[app: :bmark,
version: "1.0.2",
elixir: "~> 1.0",
deps: deps,
description: description,
package: package]
end
def application do
[applications: [:logger]]
end
defp deps do
[
{:inch_ex, only: :docs},
... | defmodule Bmark.Mixfile do
use Mix.Project
def project do
[app: :bmark,
version: "1.0.2",
elixir: "~> 1.0",
deps: deps,
description: description,
package: package]
end
def application do
[applications: [:logger]]
end
defp deps do
[
{:inch_ex, only: :docs},
... | Update package to new format | Update package to new format
contributors -> maintainers
| Elixir | mit | joekain/bmark |
1107e38f44a7ad0c9287f6238527eccda2a7d84c | hosts.ex | hosts.ex | [all:vars]
# OpenStack release. Valid value is one of 'kilo,liberty,mitaka,newton' and so on
openstack_release=newton
[controller]
192.168.220.78
192.168.220.79
192.168.220.80
[compute]
192.168.220.90
192.168.220.91
192.168.220.92
192.168.220.93
[ceph]
192.168.220.150
192.168.220.151
192.168.220.152
192.168.220.153
| [all:vars]
# OpenStack release. Valid value is one of 'kilo,liberty,mitaka,newton' and so on
openstack_release=newton
os_admin_username=admin
os_admin_password=password
os_admin_project_name=admin
os_auth_url=http://192.168.220.100:5000/v2.0
[controller]
192.168.220.78
192.168.220.79
192.168.220.80
[compute]
192.168.... | Add example openstack auth variables to host.ex | Add example openstack auth variables to host.ex
| Elixir | apache-2.0 | jonjozwiak/openstack-detective,vvaldez/openstack-detective |
d10eef6a56dc2e2dd0910eb524d300590de8428d | lib/ircbot/hooks/ping_hook.ex | lib/ircbot/hooks/ping_hook.ex | defmodule PingHook do
@replies [
"pong", "shpunk", "spank", "pork", "dong",
]
@num_replies Enum.count(@replies)
def run(sender, text) do
case String.downcase(text) do
"ping" ->
if sender == "nox" do
{:reply, sender, "<3"}
else
{:reply, sender, Enum.at(@replies,... | defmodule PingHook do
@replies [
"pong", "shpunk", "spank", "pork", "dong",
]
@num_replies Enum.count(@replies)
def run(sender, text) do
case String.downcase(text) do
"ping" ->
if sender == "nox" do
{:reply, sender, "<3"}
else
{:reply, sender, Enum.at(@replies,... | Fix a case clause bug in PingHook | Fix a case clause bug in PingHook | Elixir | mit | alco/beamie_bot |
82c924e6870aca6ee389443c153d4538e609d207 | test/scrapex/selector_test.exs | test/scrapex/selector_test.exs | defmodule Scrapex.SelectorTest do
use ExUnit.Case
alias Scrapex.Selector
test "parse CSS selector" do
href = HTTPoison.get!("http://localhost:9090/example.com.html").body
|> Selector.select("a[href^=http]")
|> Selector.extract("href")
assert href === ["http://www.iana.org/domains/example"]
end... | defmodule Scrapex.SelectorTest do
use ExUnit.Case
alias Scrapex.Selector
test "parse CSS selector" do
href = HTTPoison.get!("http://localhost:9090/example.com.html").body
|> Selector.select("a[href^=http]")
|> Selector.extract("href")
assert href === ["http://www.iana.org/domains/example"]
end... | Test for extracting text content | Test for extracting text content
| Elixir | mit | sntran/scrapex |
18cb0274ad179512d46e8e6c913644ffd8b9bc94 | iex.exs | iex.exs | IEx.configure(
default_prompt: "%prefix>",
history_size: -1,
colors: [
eval_result: [:cyan, :bright]
]
)
| IEx.configure(
default_prompt: "%prefix>",
history_size: -1,
colors: [
eval_result: [:cyan, :bright]
]
)
if Node.alive? do
IEx.configure(default_prompt: "%prefix(%node):%counter>")
else
IEx.configure(default_prompt: "%prefix:%counter>")
end
| Change IEx prompt based on Node.alive? | Change IEx prompt based on Node.alive?
| Elixir | mit | mattdbridges/dotfiles,mattdbridges/dotfiles |
0050e021328a6c48381fbc8b8a8a38bfd371eecb | lib/menu_planner/accounts/user.ex | lib/menu_planner/accounts/user.ex | defmodule MenuPlanner.Accounts.User do
use Ecto.Schema
schema "accounts_users" do
field :email, :string
field :name, :string
field :password_hash, :string
timestamps()
end
end
| defmodule MenuPlanner.Accounts.User do
use Ecto.Schema
schema "accounts_users" do
field :email, :string
field :name, :string
field :password, :string, virtual: true
field :password_hash, :string
timestamps()
end
end
| Add password virtual field on User schema | Add password virtual field on User schema
| Elixir | mit | KZeillmann/MenuPlanner,KZeillmann/MenuPlanner |
2d26475f0447909509943a37dd13b5fe36a973b5 | farmbot_ext/test/farmbot_ext/bootstrap_test.exs | farmbot_ext/test/farmbot_ext/bootstrap_test.exs | defmodule FarmbotExt.BootstrapTest do
require Helpers
use ExUnit.Case, async: false
use Mimic
alias FarmbotExt.Bootstrap
setup :verify_on_exit!
setup :set_mimic_global
test "performs a factory reset if the email is wrong" do
expect(FarmbotExt.Bootstrap.Authorization, :authorize_with_password, 1, fn
... | defmodule FarmbotExt.BootstrapTest do
require Helpers
use ExUnit.Case, async: false
use Mimic
alias FarmbotExt.Bootstrap
setup :verify_on_exit!
setup :set_mimic_global
test "performs a factory reset if the email is wrong" do
expect(FarmbotExt.Bootstrap.Authorization, :authorize_with_password, 1, fn
... | Fix failing test in farmbot_ext | Fix failing test in farmbot_ext
| Elixir | mit | FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os |
1b2ba8bc61c923d72023e18f8d66231d94470595 | lib/meal_tracker/commands/list.ex | lib/meal_tracker/commands/list.ex | defmodule MealTracker.Commands.List do
@moduledoc """
Handles the `track list` command.
"""
alias MealTracker.Config
@doc """
Executes the command.
"""
def run(_options) do
files =
Config.root()
|> File.ls!()
|> Enum.map(fn file_name -> String.slice(file_name, 0..-4) end)
IO... | defmodule MealTracker.Commands.List do
@moduledoc """
Handles the `track list` command.
"""
alias MealTracker.Config
@doc """
Executes the command.
"""
def run(_options) do
files =
Config.root()
|> File.ls!()
|> Enum.map(fn file_name -> String.slice(file_name, 0..-4) end)
|... | Print each log file on its own line | Print each log file on its own line
| Elixir | mit | lee-dohm/meal-tracker,lee-dohm/meal-tracker |
a1c202e02e653afbb18d728fc04f3c32de40a720 | lib/mix/test/mix/deps_test.exs | lib/mix/test/mix/deps_test.exs | Code.require_file "../../test_helper.exs", __FILE__
defmodule Mix.DepsTest do
use MixTest.Case
defmodule DepsApp do
def project do
[
deps: [
{ :ok, "0.1.0", github: "elixir-lang/ok" },
{ :invalidvsn, "0.2.0", path: "deps/invalidvsn" },
{ :invalidapp, "0.1.0"... | Code.require_file "../../test_helper.exs", __FILE__
defmodule Mix.DepsTest do
use MixTest.Case
defmodule DepsApp do
def project do
[
deps: [
{ :ok, "0.1.0", github: "elixir-lang/ok" },
{ :invalidvsn, "0.2.0", path: "deps/invalidvsn" },
{ :invalidapp, "0.1.0"... | Clean up Mix.project after setting it | Clean up Mix.project after setting it
| Elixir | apache-2.0 | joshprice/elixir,beedub/elixir,kimshrier/elixir,lexmag/elixir,lexmag/elixir,beedub/elixir,gfvcastro/elixir,antipax/elixir,kimshrier/elixir,kelvinst/elixir,antipax/elixir,michalmuskala/elixir,gfvcastro/elixir,kelvinst/elixir,pedrosnk/elixir,pedrosnk/elixir,ggcampinho/elixir,elixir-lang/elixir,ggcampinho/elixir |
13ac38b88175bfd4c948342326639f8639c6e4d4 | src/elixir/lib/mix/tasks/copy_json.ex | src/elixir/lib/mix/tasks/copy_json.ex | defmodule Mix.Tasks.Ifsc.CopyJson do
use Mix.Task
def run(_) do
File.mkdir_p!("priv/ifsc-data")
Enum.map(
~w(banknames.json IFSC.json sublet.json),
&(File.copy("src/" <> &1, "priv/ifsc-data/" <> &1))
)
end
end
| defmodule Mix.Tasks.Ifsc.CopyJson do
use Mix.Task
def run(_) do
File.mkdir_p!("priv/ifsc-data")
Enum.map(
~w(banknames.json IFSC.json sublet.json banks.json),
&(File.copy("src/" <> &1, "priv/ifsc-data/" <> &1))
)
end
end
| Copy banks.json to elixir release | Copy banks.json to elixir release
| Elixir | mit | razorpay/ifsc,razorpay/ifsc,razorpay/ifsc,razorpay/ifsc,razorpay/ifsc |
f9ba88898aa557240d4a9ab45c1ee7d7ff168ace | mix.exs | mix.exs | defmodule UpsideDownLeds.Mixfile do
use Mix.Project
def project do
[app: :upside_down_leds,
version: "0.1.0",
elixir: "~> 1.3",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps()]
end
# Configuration for the OTP application
#
# Type "mix help com... | defmodule UpsideDownLeds.Mixfile do
use Mix.Project
def project do
[app: :upside_down_leds,
version: "0.1.0",
elixir: "~> 1.3",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps()]
end
# Configuration for the OTP application
#
# Type "mix help com... | Add extwitter as an application | Add extwitter as an application
| Elixir | mit | FiniteMonkeys/UpsideDownLEDs |
e18b82bc5319b3799f20cdeda7a745a54347152b | test/test_helper.exs | test/test_helper.exs | ExUnit.start()
{:ok, _} = Application.ensure_all_started(:wallaby)
Application.put_env(:wallaby, :base_url, TilexWeb.Endpoint.url())
| ExUnit.configure(exclude: [pending: true])
ExUnit.start()
{:ok, _} = Application.ensure_all_started(:wallaby)
Application.put_env(:wallaby, :base_url, TilexWeb.Endpoint.url())
| Exclude pending `@tag :pending` tests | Exclude pending `@tag :pending` tests
Co-authored-by: Chris Erin <616b74d5888ada3e51dc8f8c8c98902b4a8a2d03@gmail.com>
Co-authored-by: Dorian Karter <5bbd56c484f1ca3e1862b50ee145320cef5c9084@users.noreply.github.com>
| Elixir | mit | hashrocket/tilex,hashrocket/tilex,hashrocket/tilex |
925f6ba2f764c1579adb86da5da7eb20486c4c30 | test/koans/map_sets_koans_test.exs | test/koans/map_sets_koans_test.exs | defmodule MapSetsTest do
use ExUnit.Case
import TestHarness
test "MapSets" do
answers = [
true,
{:multiple, [true, false]},
true,
false,
5,
false,
true,
3,
7,
[1, 2, 3, 4, 5],
]
test_all(MapSets, answers)
end
end | defmodule MapSetsTest do
use ExUnit.Case
import TestHarness
test "MapSets" do
answers = [
{:multiple, [true, false]},
3,
true,
true,
false,
5,
false,
true,
7,
[1, 2, 3, 4, 5],
]
test_all(MapSets, answers)
end
end | Change order of answers to make unit tests pass | Change order of answers to make unit tests pass
| Elixir | mit | samstarling/elixir-koans,elixirkoans/elixir-koans |
a6bcd89e7ac7e838528aa4d6f1e96b846f6ff4a0 | lib/koans.ex | lib/koans.ex | defmodule Koans do
defmacro koan(name, body) do
compiled_name = String.to_atom(name)
mangled_body = ASTMangler.expand(body, quote do: answer)
quote do
@koans unquote(compiled_name)
def unquote(compiled_name)(answer \\ :nothing) do
try do
if answer == :nothing do
... | defmodule Koans do
defmacro koan(name, body) do
compiled_name = String.to_atom(name)
mangled_body = ASTMangler.expand(body, quote do: answer)
quote do
@koans unquote(compiled_name)
def unquote(compiled_name)() do
try do
unquote(body)
:ok
rescue
e i... | Split koan into two functions with different arity | Split koan into two functions with different arity
| Elixir | mit | samstarling/elixir-koans,elixirkoans/elixir-koans |
dfeb7c5ebb8db38c3aa89483f9597dfd21e2a3ce | lib/tesla/middleware/timeout.ex | lib/tesla/middleware/timeout.ex | defmodule Tesla.Middleware.Timeout do
@behaviour Tesla.Middleware
@moduledoc """
Timeout http request after X seconds.
### Example
```
defmodule MyClient do
use Tesla
plug Tesla.Middleware.Timeout, timeout: 2_000
end
"""
@timeout_error %Tesla.Error{
reason: :timeout,
message: "#{__... | defmodule Tesla.Middleware.Timeout do
@behaviour Tesla.Middleware
@moduledoc """
Timeout http request after X seconds.
### Example
```
defmodule MyClient do
use Tesla
plug Tesla.Middleware.Timeout, timeout: 2_000
end
"""
@timeout_error %Tesla.Error{
reason: :timeout,
message: "#{__... | Replace Task.shutdown in favor to Process.exit to be compatible with Elixir 1.3 | Replace Task.shutdown in favor to Process.exit to be compatible with Elixir 1.3
| Elixir | mit | teamon/tesla,monterail/tesla |
83a9bc8b5a04c307b798a4807b5935849224b87d | apps/ello_v2/web/controllers/following_post_controller.ex | apps/ello_v2/web/controllers/following_post_controller.ex | defmodule Ello.V2.FollowingPostController do
use Ello.V2.Web, :controller
alias Ello.Stream
alias Ello.Core.{Network}
alias Ello.V2.PostView
plug Ello.Auth.RequireUser
def index(conn, params) do
stream = fetch_stream(conn, params)
conn
|> track_post_view(stream.posts, stream_kind: "following")... | defmodule Ello.V2.FollowingPostController do
use Ello.V2.Web, :controller
alias Ello.Stream
alias Ello.Core.{Network}
alias Ello.V2.PostView
plug Ello.Auth.RequireUser
def index(conn, params) do
stream = fetch_stream(conn, params)
conn
|> track_post_view(stream.posts, stream_kind: "following")... | Add api/v2 to pagination link. | Add api/v2 to pagination link.
| Elixir | mit | ello/apex,ello/apex,ello/apex |
4f5283161727afe6846e6e619e24a78bb6339791 | test/mmdb2/loader_error_test.exs | test/mmdb2/loader_error_test.exs | defmodule Geolix.Adapter.MMDB2.Database.LoaderErrorTest do
use ExUnit.Case, async: false
import ExUnit.CaptureLog
alias Geolix.Adapter.MMDB2
@fixture_path Path.expand("../fixtures", __DIR__)
test "error if database contains no metadata" do
path = Path.join([@fixture_path, ".gitignore"])
db = %{id:... | defmodule Geolix.Adapter.MMDB2.Database.LoaderErrorTest do
use ExUnit.Case, async: false
import ExUnit.CaptureLog
alias Geolix.Adapter.MMDB2
test "error if database contains no metadata" do
db = %{id: :nometa_database, adapter: MMDB2, source: __ENV__.file}
log =
capture_log(fn ->
asser... | Remove unnecessary fixture path expansion | Remove unnecessary fixture path expansion
| Elixir | apache-2.0 | elixir-geolix/adapter_mmdb2,elixir-geolix/adapter_mmdb2 |
a34dde853f9d09db792a859666cdea91e958d849 | lib/RespHelper.ex | lib/RespHelper.ex | defmodule RespHelper do
import Plug.Conn
def http_404(conn) do
conn
|> put_resp_content_type("text/html")
|> send_resp(404, "<h1>Not Found</h1>")
end
end
| defmodule RespHelper do
import Plug.Conn
def default_headers(conn) do
# https://www.owasp.org/index.php/List_of_useful_HTTP_headers
conn
|> put_resp_header("x-frame-options", "deny")
|> put_resp_header("x-xss-protection", "1; mode=block")
|> put_resp_header("x-content-type-options", "nosniff")
... | Add default headers for conn | Add default headers for conn
| Elixir | mit | upbit/zserver |
36c922d6e2b662eee8c2dc10cb53855a80c6db14 | lib/serum/util.ex | lib/serum/util.ex | defmodule Serum.Util do
@moduledoc """
This module provides some frequently used shortcut functions. These functions
are inlined by the compiler.
"""
@doc "Prints a warning message to stderr."
@spec warn(binary) :: Macro.t()
defmacro warn(str) do
quote do
IO.puts(:stderr, "\x1b[33m * #{unquote... | defmodule Serum.Util do
@moduledoc """
This module provides some frequently used shortcut functions. These functions
are inlined by the compiler.
"""
@doc "Prints a warning message to stderr."
@spec warn(binary) :: Macro.t()
defmacro warn(str) do
quote do
IO.puts(:stderr, "\x1b[33m * #{unquote(... | Remove unused macros from Serum.Util | Remove unused macros from Serum.Util
| Elixir | mit | Dalgona/Serum |
db56e271d9fe36f663c8c0baac7df680e214d9c8 | api/lib/api/router.ex | api/lib/api/router.ex | defmodule Api.Router do
# todo move this artifact to the top leve (let it be just 'Router')
use Plug.Router
plug :match
plug(Plug.Parsers,
parsers: [:json],
pass: ["application/json"],
json_decoder: Poison
)
plug :dispatch
forward("/api/documents", to: Api.Documents.Router)
forward("/api... | defmodule Api.Router do
# todo move this artifact to the top leve (let it be just 'Router')
use Plug.Router
plug :match
plug(Plug.Parsers,
parsers: [:json],
pass: ["application/json"],
json_decoder: Poison
)
plug :dispatch
forward("/api/documents", to: Api.Documents.Router)
forward("/api... | Remove reference to deleted shapes api endpoint | Remove reference to deleted shapes api endpoint
| Elixir | apache-2.0 | dainst/idai-field-web,dainst/idai-field-web,dainst/idai-field-web |
6c56bb8682f7b4c4c2cbe7464f0fed77c19a82fd | lib/elixir/test/doc_test.exs | lib/elixir/test/doc_test.exs | ExUnit.start []
defmodule KernelTest do
use ExUnit.Case, async: true
doctest Kernel
doctest Kernel.SpecialForms
doctest Access.List
doctest Binary.Chars.List
doctest Binary.Inspect.Atom
doctest Binary.Inspect.BitString
doctest Binary.Inspect.List
doctest Binary.Inspect.Tuple
doctest Binary.Inspect.... | ExUnit.start []
defmodule KernelTest do
use ExUnit.Case, async: true
doctest Access.List
doctest Binary.Chars.List
doctest Binary.Inspect.Atom
doctest Binary.Inspect.BitString
doctest Binary.Inspect.List
doctest Binary.Inspect.Number
doctest Binary.Inspect.Regex
doctest Binary.Inspect.Tuple
doctes... | Put doc tests in alphabetical order | Put doc tests in alphabetical order
| Elixir | apache-2.0 | ggcampinho/elixir,beedub/elixir,lexmag/elixir,joshprice/elixir,lexmag/elixir,kimshrier/elixir,kimshrier/elixir,antipax/elixir,ggcampinho/elixir,antipax/elixir,pedrosnk/elixir,kelvinst/elixir,beedub/elixir,gfvcastro/elixir,pedrosnk/elixir,elixir-lang/elixir,gfvcastro/elixir,kelvinst/elixir,michalmuskala/elixir |
912a7f64b1a5b6844785eaf0e2770a46424f472f | apps/client/lib/client/api.ex | apps/client/lib/client/api.ex | defmodule Client.API do
def handle({:message_from, message, username}) do
# TODO: Store message in chat history
:ok
end
def handle({:send_file, username, filename}) do
chunks = read_chunks(filename, 512)
chunks_count = Enum.count chunks
IO.puts "#{chunks_count} chunks read"
chunks = Enum... | defmodule Client.API do
def handle({:message_from, message, username}) do
# TODO: Store message in chat history
:ok
end
def handle({:register, username}) do
Client.execute("user #{username}\r\n")
|> IO.inspect
:ok
end
def handle(:list) do
Client.execute("list\r\n")
|> IO.inspect... | Implement client calls for register and list | Implement client calls for register and list
| Elixir | mit | antonpetkoff/chat |
b12633ef12e923c723595725d53c2a6b9416b6f4 | lib/microcrawler/supervisor/event.ex | lib/microcrawler/supervisor/event.ex | defmodule Microcrawler.Supervisor.Event do
require Logger
use Supervisor
@server __MODULE__
def start_link do
Logger.info("Starting #{__MODULE__}")
Supervisor.start_link(@server, :ok, [name: @server])
end
def init(:ok) do
config_path = Path.join([System.user_home(), '... | defmodule Microcrawler.Supervisor.Event do
require Logger
use Supervisor
@server __MODULE__
def start_link do
Logger.info("Starting #{__MODULE__}")
Supervisor.start_link(@server, :ok, [name: @server])
end
def init(:ok) do
config_path = Path.join([System.user_home(), '... | Use supervisors instead of workers in Microcrawler.Supervisor.Event | Use supervisors instead of workers in Microcrawler.Supervisor.Event
| Elixir | mit | ApolloCrawler/microcrawler-elixir |
f0dea1a520dc71af118ddbe27576527e645f8dcd | elixir/test/gilded_rose_test.exs | elixir/test/gilded_rose_test.exs | defmodule GildedRoseTest do
use ExUnit.Case
test "begin the journey of refactoring" do
end
end
| defmodule GildedRoseTest do
use ExUnit.Case
test "begin the journey of refactoring" do
items = [%Item{name: "foo", sell_in: 0, quality: 0}]
GildedRose.update_quality(items)
%{name: firstItemName} = List.first(items)
assert "fixme" == firstItemName
end
end
| Add initial failing test for Elixir | Add initial failing test for Elixir
| Elixir | mit | emilybache/GildedRose-Refactoring-Kata,emilybache/GildedRose-Refactoring-Kata,emilybache/GildedRose-Refactoring-Kata,emilybache/GildedRose-Refactoring-Kata,emilybache/GildedRose-Refactoring-Kata,emilybache/GildedRose-Refactoring-Kata,emilybache/GildedRose-Refactoring-Kata,emilybache/GildedRose-Refactoring-Kata,emilybac... |
6e71493c010c95ed3d6887470838ad3ab06997eb | test/support/channel_case.ex | test/support/channel_case.ex | defmodule RemoteRetro.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
import other functionality to make it easier
to build and query models.
Finally, if the test case interacts with the database,
it cannot ... | defmodule RemoteRetro.ChannelCase do
@moduledoc """
This module defines the test case to be used by
channel tests.
Such tests rely on `Phoenix.ChannelTest` and also
import other functionality to make it easier
to build and query models.
Finally, if the test case interacts with the database,
it cannot ... | Enable Ecto sandbox mode for ChannelCase tests | Enable Ecto sandbox mode for ChannelCase tests
Because we’re using Ecto within our Channel, we need to allow the
channel to create a process for Ecto, per Jose’s comment:
https://github.com/elixir-ecto/ecto/issues/1319#issuecomment-196925658
| Elixir | mit | stride-nyc/remote_retro,tnewell5/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro,samdec11/remote_retro,tnewell5/remote_retro |
bcacc2e9039a4b1828fe45f33300d75b94436b6a | sum-of-multiples/sum_of_multiples.exs | sum-of-multiples/sum_of_multiples.exs | defmodule SumOfMultiples do
@doc """
Adds up all numbers from 1 to a given end number that are multiples of the factors provided.
The default factors are 3 and 5.
"""
@spec to(non_neg_integer, [non_neg_integer]) :: non_neg_integer
def to(limit, factors // [3, 5]) do
end
end | defmodule SumOfMultiples do
@doc """
Adds up all numbers from 1 to a given end number that are multiples of the factors provided.
The default factors are 3 and 5.
"""
@spec to(non_neg_integer, [non_neg_integer]) :: non_neg_integer
def to(limit, factors \\ [3, 5]) do
end
end
| Fix the incorrect slashes denoting a default value in sum-of-multiples | Fix the incorrect slashes denoting a default value in sum-of-multiples
| Elixir | mit | tjcelaya/xelixir,parkerl/xelixir,Egogre/xelixir,montague/xelixir,exercism/xelixir,wobh/xelixir,victorlcampos/xelixir,cezarykosko/xelixir,elasticdog/xelixir |
3f3f4ede17b11f58ae5fbea1dca0180ff6e1feb2 | apps/ello_serve/web/controllers/webapp/artist_invite_show_controller.ex | apps/ello_serve/web/controllers/webapp/artist_invite_show_controller.ex | defmodule Ello.Serve.Webapp.ArtistInviteShowController do
use Ello.Serve.Web, :controller
alias Ello.Core.Contest
def show(conn, %{"id" => slug}) do
case artist_invite(conn, slug) do
nil -> send_resp(conn, 404, "")
invite -> render_html(conn, %{
artist_invite: invite,
submissio... | defmodule Ello.Serve.Webapp.ArtistInviteShowController do
use Ello.Serve.Web, :controller
alias Ello.Core.Contest
def show(conn, %{"id" => slug}) do
case artist_invite(conn, slug) do
nil -> send_resp(conn, 404, "")
invite -> render_html(conn, %{
artist_invite: invite,
submissio... | Fix artist invite show logged out. | Fix artist invite show logged out.
We must always have our standard params present for our preloads to
properly execute.
| Elixir | mit | ello/apex,ello/apex,ello/apex |
c3a7f3d3b2a7552827faa40decc20c154c1a4980 | lib/nerves/io/neopixel.ex | lib/nerves/io/neopixel.ex | defmodule Nerves.IO.Neopixel do
@moduledoc false
use Application
require Logger
alias Nerves.IO.Neopixel
def start(_type, _args) do
Logger.debug "#{__MODULE__} Starting"
{:ok, self}
end
def setup(settings \\ [pin: 18, count: 1]) do
Logger.debug "#{__MODULE__} Setup(#{inspect settings})"
... | defmodule Nerves.IO.Neopixel do
@moduledoc false
use Application
require Logger
alias Nerves.IO.Neopixel
def start(_type, _args) do
Logger.debug "#{__MODULE__} Starting"
{:ok, self}
end
def setup(settings \\ [pin: 18, count: 1]) do
Logger.debug "#{__MODULE__} Setup(#{inspect settings})"
... | Remove the scanner demo from the core library | Remove the scanner demo from the core library
| Elixir | mit | alexrothenberg/nerves_neopixel,GregMefford/nerves_neopixel,GregMefford/nerves_io_neopixel |
9ad11676593dcb7871ad0b2608689012d18c5b8d | config/prod.secret.exs | config/prod.secret.exs | use Mix.Config
# In this file, we keep production configuration that
# you likely want to automate and keep it away from
# your version control system.
#
# You should document the content of this
# file or create a script for recreating it, since it's
# kept out of version control and might be hard to recover
# or rec... | use Mix.Config
# In this file, we keep production configuration that
# you likely want to automate and keep it away from
# your version control system.
#
# You should document the content of this
# file or create a script for recreating it, since it's
# kept out of version control and might be hard to recover
# or rec... | Make pool size an env var | Make pool size an env var
| Elixir | mit | az-webdevs/azwebdevs.org,az-webdevs/azwebdevs.org |
ef5b82a1032ead15e81cb23fb3f580f980ed0e4a | web/router.ex | web/router.ex | defmodule MyApp_726605.Router do
use MyApp_726605.Web, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
end
pipeline :api do
plug :accepts, ["json"]
end
scope "/", MyApp_726605 do
pipe_through :browser # Use the ... | defmodule MyApp_726605.Router do
use MyApp_726605.Web, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
end
pipeline :api do
plug :accepts, ["json"]
end
scope "/", MyApp_726605 do
pipe_through :browser # Use the ... | Add users resources to browser scope | Add users resources to browser scope
| Elixir | mit | wsmoak/my_app_726605 |
aac4244b90c2e8b728c94bf767eb31d855e80f63 | farmbot_core/priv/asset/migrations/20190926165507_force_resync_points.exs | farmbot_core/priv/asset/migrations/20190926165507_force_resync_points.exs | defmodule FarmbotCore.Asset.Repo.Migrations.ForceResyncPoints do
use Ecto.Migration
alias FarmbotCore.Asset.{Repo, Point}
def change do
for %{id: id} = point when is_integer(id) <- Repo.all(Point) do
Repo.delete!(point)
end
end
end
| defmodule FarmbotCore.Asset.Repo.Migrations.ForceResyncPoints do
use Ecto.Migration
alias FarmbotCore.Asset.{Repo, Point}
def change do
execute("TRUNCATE TABLE points;")
end
end
| Use raw SQL to prevent syntax errors in legacy migration | Use raw SQL to prevent syntax errors in legacy migration
| Elixir | mit | FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os |
4b9f5e74a8a27290a188c2547c6826a7c44b38bd | web/models/user.ex | web/models/user.ex | defmodule Asciinema.User do
use Asciinema.Web, :model
schema "users" do
field :username, :string
field :temporary_username, :string
field :email, :string
field :name, :string
field :auth_token, :string
field :theme_name, :string
field :asciicasts_private_by_default, :boolean, default: t... | defmodule Asciinema.User do
use Asciinema.Web, :model
schema "users" do
field :username, :string
field :temporary_username, :string
field :email, :string
field :name, :string
field :auth_token, :string
field :theme_name, :string
field :asciicasts_private_by_default, :boolean, default: t... | Add timestamp fields to Ecto User schema | Add timestamp fields to Ecto User schema
| Elixir | apache-2.0 | asciinema/asciinema-server,asciinema/asciinema-server,asciinema/asciinema-server,asciinema/asciinema.org,asciinema/asciinema.org,asciinema/asciinema.org,asciinema/asciinema-server,asciinema/asciinema.org |
bae4d93a782f276348180bd024559fddce035fd1 | test/lib/course_planner/tasks_test.exs | test/lib/course_planner/tasks_test.exs | defmodule CoursePlanner.TasksTest do
use CoursePlanner.ModelCase
alias CoursePlanner.{Tasks, Volunteers}
@valid_task %{name: "some content", start_time: Timex.now(), finish_time: Timex.now()}
@volunteer %{
name: "Test Volunteer",
email: "volunteer@courseplanner.com",
password: "secret",
passwo... | defmodule CoursePlanner.TasksTest do
use CoursePlanner.ModelCase
alias CoursePlanner.{Tasks, Volunteers}
import Timex
@valid_task %{name: "some content", start_time: Timex.now(), finish_time: Timex.now()}
@volunteer %{
name: "Test Volunteer",
email: "volunteer@courseplanner.com",
password: "secr... | Remove done action and status timestamps. | Remove done action and status timestamps.
| Elixir | mit | digitalnatives/course_planner,digitalnatives/course_planner,digitalnatives/course_planner |
6960f856f4d8131e5bc3de60644bdc8f2e922ebe | lib/elixir/test/elixir/io/ansi_test.exs | lib/elixir/test/elixir/io/ansi_test.exs | Code.require_file "../../test_helper.exs", __FILE__
defmodule IO.ANSITest do
use ExUnit.Case, async: true
test :boolean do
assert String.length(IO.ANSI.red(true)) > 0
assert IO.ANSI.red(false) == ""
end
end
| Code.require_file "../../test_helper.exs", __FILE__
defmodule IO.ANSITest do
use ExUnit.Case, async: true
test :escape_single do
assert IO.ANSI.escape("Hello, #[red]world!#[reset]") ==
"Hello, #{IO.ANSI.red}world!#{IO.ANSI.reset}"
assert IO.ANSI.escape("Hello, #[ red ]world!#[reset]") ==
... | Put proper IO.ANSI tests in | Put proper IO.ANSI tests in
| Elixir | apache-2.0 | gfvcastro/elixir,michalmuskala/elixir,elixir-lang/elixir,ggcampinho/elixir,ggcampinho/elixir,kimshrier/elixir,pedrosnk/elixir,beedub/elixir,beedub/elixir,kelvinst/elixir,antipax/elixir,kimshrier/elixir,kelvinst/elixir,joshprice/elixir,lexmag/elixir,pedrosnk/elixir,gfvcastro/elixir,lexmag/elixir,antipax/elixir |
4b334b14c358f142459dfb7b765ad49bbdf9f10a | test/jumubase/accounts/message_test.exs | test/jumubase/accounts/message_test.exs | defmodule Jumubase.Accounts.MessageTest do
use ExUnit.Case
use Bamboo.Test
import JumubaseWeb.AuthTestHelpers
import JumubaseWeb.Router.Helpers, only: [password_reset_url: 3]
alias Jumubase.Accounts.Message
setup do
email = "deirdre@example.com"
{:ok, %{email: email, key: gen_key(email)}}
end
... | defmodule Jumubase.Accounts.MessageTest do
use ExUnit.Case
use Bamboo.Test
import JumubaseWeb.AuthTestHelpers
import JumubaseWeb.Router.Helpers, only: [password_reset_url: 3]
alias Jumubase.Accounts.Message
setup do
email = "deirdre@example.com"
{:ok, %{email: email, key: gen_key(email)}}
end
... | Fix a failing test in Accounts.MessageTest | Fix a failing test in Accounts.MessageTest
| Elixir | mit | richeterre/jumubase-phoenix,richeterre/jumubase-phoenix |
a067816404b455bab4d9d4de7b8eb434ce320c4d | test/xee/theme_server_test.exs | test/xee/theme_server_test.exs | defmodule Xee.ThemeServerTest do
use Xee.ConnCase
alias Xee.ThemeServer, as: ThemeServer
setup do
ThemeServer.start_link()
:ok
end
test "register and get" do
assert :ok == ThemeServer.register(:a, :A)
assert :ok == ThemeServer.register(:b, :B)
assert :ok == ThemeServer.register(:c, :C)
... | defmodule Xee.ThemeServerTest do
use ExUnit.Case
alias Xee.ThemeServer, as: ThemeServer
setup do
ThemeServer.start_link()
:ok
end
test "register and get" do
assert :ok == ThemeServer.register(:a, :A)
assert :ok == ThemeServer.register(:b, :B)
assert :ok == ThemeServer.register(:c, :C)
... | Use ExUnit.Case instead of Xee.ConnCase | Use ExUnit.Case instead of Xee.ConnCase
Fix #8
| Elixir | mit | xeejp/xee,xeejp/xee,xeejp/xee,xeejp/xee,xeejp/xee |
38cbc98f81fc1ae66b9b472240575155c7600aad | test/koans/functions_koans_test.exs | test/koans/functions_koans_test.exs | defmodule FunctionsTests do
use ExUnit.Case
import TestHarness
test "Functions" do
answers = [
"Hello, World!",
3,
{:multiple, ["One and Two", "Only One"]},
{:multiple, ["Hello Hello Hello Hello Hello ", "Hello Hello "]},
{:multiple, [:entire_list, :single_thing]},
{:multi... | defmodule FunctionsTests do
use ExUnit.Case
import TestHarness
test "Functions" do
answers = [
"Hello, World!",
3,
{:multiple, ["One and Two", "Only One"]},
{:multiple, ["Hello Hello Hello Hello Hello ", "Hello Hello "]},
{:multiple, [:entire_list, :single_thing]},
{:multi... | Add test for new koan | Add test for new koan
| Elixir | mit | elixirkoans/elixir-koans,samstarling/elixir-koans |
b254c01d4b3df4cb8f2a58537785ef04d8caa512 | web/channels/user_socket.ex | web/channels/user_socket.ex | defmodule RemoteRetro.UserSocket do
use Phoenix.Socket
## Channels
channel "room:*", RemoteRetro.RoomChannel
## Transports
transport :websocket, Phoenix.Transports.WebSocket, timeout: 45_000
# transport :longpoll, Phoenix.Transports.LongPoll
# Socket params are passed from the client and can
# be use... | defmodule RemoteRetro.UserSocket do
use Phoenix.Socket
## Channels
channel "room:*", RemoteRetro.RoomChannel
## Transports
transport :websocket, Phoenix.Transports.WebSocket, timeout: 45_000
# transport :longpoll, Phoenix.Transports.LongPoll
# Socket params are passed from the client and can
# be use... | Kill unmet endpoint that was mysteriously matching in UserSocket | Kill unmet endpoint that was mysteriously matching in UserSocket
| Elixir | mit | stride-nyc/remote_retro,tnewell5/remote_retro,tnewell5/remote_retro,samdec11/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro |
4b85694837191912a41314b924a22772675db93c | gherkin/elixir/mix.exs | gherkin/elixir/mix.exs | defmodule CucumberGherkin.MixProject do
use Mix.Project
@vsn "16.0.0"
@github "https://github.com/cucumber/cucumber/tree/master/gherkin/elixir"
@name "CucumberGherkin"
def project do
[
app: :cucumber_gherkin,
version: @vsn,
name: @name,
description: description(),
package: ... | defmodule CucumberGherkin.MixProject do
use Mix.Project
@vsn "16.0.0"
@github "https://github.com/cucumber/cucumber/tree/master/gherkin/elixir"
@name "CucumberGherkin"
def project do
[
app: :cucumber_gherkin,
version: @vsn,
name: @name,
description: description(),
package: ... | Use the local messages in gherkin-elixir | [gherkin] WIP: Use the local messages in gherkin-elixir
This make the CI build to use the local cucumber-messages version
instead of the released version, but this change cannot remaing when
releasing gherkin-elixir.
| Elixir | mit | cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber,cucumber/cucumber |
a055069eff846b96c69c17142849c394f4df25e4 | lib/hound/helpers.ex | lib/hound/helpers.ex | defmodule Hound.Helpers do
@moduledoc false
defmacro __using__([]) do
quote do
import Hound
import Hound.Helpers.Cookie
import Hound.Helpers.Dialog
import Hound.Helpers.Element
import Hound.Helpers.Navigation
import Hound.Helpers.Orientation
import Hound.Helpers.Page
... | defmodule Hound.Helpers do
@moduledoc false
defmacro __using__([]) do
quote do
import Hound
import Hound.Helpers.Cookie
import Hound.Helpers.Dialog
import Hound.Helpers.Element
import Hound.Helpers.Navigation
import Hound.Helpers.Orientation
import Hound.Helpers.Page
... | Make sure that the session is ended after the test exists | Make sure that the session is ended after the test exists
| Elixir | mit | HashNuke/hound,HashNuke/hound |
bac7b131d10424231ba72ac9a003643cf22c8da3 | lib/elixir/lib/atom.ex | lib/elixir/lib/atom.ex | defmodule Atom do
@doc """
Convenience functions for working with atoms.
"""
@doc """
Converts an atom to string.
Inlined by the compiler.
"""
@spec to_string(atom) :: String.t
def to_string(atom) do
:erlang.atom_to_binary(atom, :utf8)
end
@doc """
Converts an atom to a char list.
Inli... | defmodule Atom do
@moduledoc """
Convenience functions for working with atoms.
See also `Kernel.is_atom/1`.
"""
@doc """
Converts an atom to a string.
Inlined by the compiler.
## Examples
iex> Atom.to_string(:foo)
"foo"
"""
@spec to_string(atom) :: String.t
def to_string(atom) do... | Fix some docs in the `Atom` module | Fix some docs in the `Atom` module
- Changed a `@doc` to `@moduledoc` so that the `Atom` module has a module
documentation
- Added examples to both `Atom.to_string/1` and `Atom.to_char_list/1`
| Elixir | apache-2.0 | ggcampinho/elixir,ggcampinho/elixir,gfvcastro/elixir,antipax/elixir,joshprice/elixir,antipax/elixir,lexmag/elixir,beedub/elixir,pedrosnk/elixir,kimshrier/elixir,lexmag/elixir,kelvinst/elixir,kelvinst/elixir,michalmuskala/elixir,kimshrier/elixir,elixir-lang/elixir,beedub/elixir,pedrosnk/elixir,gfvcastro/elixir |
e638bca2025ed5008519b442cc6092c141be9ac3 | mix.exs | mix.exs | defmodule Sass.Mixfile do
use Mix.Project
def project do
[
app: :sass,
version: "0.0.1",
elixir: ">= 0.14.1",
compilers: [:elixir, :sass, :app],
deps: deps(Mix.env),
package: package,
description: description
]
end
def application... | defmodule Sass.Mixfile do
use Mix.Project
def project do
[
app: :sass,
version: "0.0.1",
elixir: "~> 1.0.0",
compilers: [:elixir, :sass, :app],
deps: deps(Mix.env),
package: package,
description: description
]
end
def application,... | Bump version to work with rc1 | Bump version to work with rc1
| Elixir | mit | danielfarrell/sass.ex |
7098b809a3d7d31095d55ad93b98d9832a4676c6 | fizzbuzz/elixir/fizzbuzz/lib/fizzbuzz.ex | fizzbuzz/elixir/fizzbuzz/lib/fizzbuzz.ex | defmodule Fizzbuzz do
def main(_args) do
IO.puts "Fizzbuzz"
IO.puts "--------"
fizzbuzz
end
def fizzbuzz, do: fizzbuzz(1)
def fizzbuzz(101), do: nil
def fizzbuzz(n) when rem(n, 15) == 0 do
IO.puts "FizzBuzz"
fizzbuzz(n + 1)
end
def fizzbuzz(n) when rem(n, 5) == 0 do
IO.puts "Buzz"... | defmodule Fizzbuzz do
def main(_args) do
IO.puts "Fizzbuzz"
IO.puts "--------"
fizzbuzz
end
def fizzbuzz, do: fizzbuzz(1)
defp fizzbuzz(101), do: nil
defp fizzbuzz(n) when rem(n, 15) == 0 do
IO.puts "FizzBuzz"
fizzbuzz(n + 1)
end
defp fizzbuzz(n) when rem(n, 5) == 0 do
IO.puts "Bu... | Use private func declarations for internal funcs | Use private func declarations for internal funcs
| Elixir | mit | jbranchaud/hello-world,jbranchaud/hello-world,jbranchaud/hello-world,jbranchaud/hello-world,jbranchaud/hello-world,jbranchaud/hello-world |
2d233a095cad9099c5f8e22fd22234811956cfbc | web/views/page_view.ex | web/views/page_view.ex | defmodule MarcCx.PageView do
use MarcCx.Web, :view
end
| defmodule MarcCx.PageView do
use MarcCx.Web, :view
use Timex
alias MarcCx.Article
def format_date(%Article{:timestamp => timestamp}) do
{:ok, date} = DateFormat.parse("#{timestamp}", "{s-epoch}")
[month, day, year] =
date
|> DateFormat.format!("%B %d %Y", :strftime)
|> String.split("... | Add a format_date function to the PageView for formatting published dates from Articles | Add a format_date function to the PageView for formatting published dates from Articles
| Elixir | mit | marcaddeo/marc.cx,marcaddeo/marc.cx,marcaddeo/marc.cx |
5858ead658d264721fc49b87065bef60ba20b2cf | api/lib/worker/images/tiles_controller.ex | api/lib/worker/images/tiles_controller.ex | defmodule Api.Worker.Images.TilesController do
alias Api.Core.Config
alias Api.Worker.Images.TilesCreator
def make_tiles do
projects = Config.get(:projects)
make_tiles(projects)
end
def make_tiles(projects) do
entries = projects
|> Enum.flat_map(&tiles_for_project/1)
Enum.map(entries, &T... | defmodule Api.Worker.Images.TilesController do
alias Api.Core.Config
alias Api.Worker.Images.TilesCreator
def make_tiles do
projects = Config.get(:projects)
make_tiles(projects)
end
def make_tiles(projects) do
entries = projects
|> Enum.flat_map(&tiles_for_project/1)
Enum.map(entries, &T... | Increase max search results size in TilesController to 10000 | Increase max search results size in TilesController to 10000
| Elixir | apache-2.0 | dainst/idai-field-web,dainst/idai-field-web,dainst/idai-field-web |
3a208c650185c1a4db4b1ea56bb925dddb3d2eef | config/dev.exs | config/dev.exs | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :slax, Slax.Endpoint,
http: [port: 4000],
de... | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :slax, Slax.Endpoint,
http: [port: System.get_... | Use PORT env var if available | Use PORT env var if available
| Elixir | mit | revelrylabs/slax,revelrylabs/slax,revelrylabs/slax |
408d80cf51c3af2ab7c94538723eac913482dc61 | test/resource_test.exs | test/resource_test.exs | defmodule ResourceTest do
use ExUnit.Case
import Braise.Resource, only: [url: 1, name: 1]
test "valid resouce results in a parsed URI" do
uri = "http://crazytown.biz/api/v2"
resource = %Braise.Resource{links: [%{"href" => uri}]}
expected_url = URI.parse(uri)
{:ok, actual_url} = Braise... | defmodule ResourceTest do
use ExUnit.Case
import Braise.Resource, only: [url: 1, name: 1]
test "valid resouce results in a parsed URI" do
uri = "http://crazytown.biz/api/v2"
resource = %Braise.Resource{links: [%{"href" => uri}]}
expected_url = URI.parse(uri)
{:ok, actual_url} = url(re... | Remove warnings/errors from Resource test. | Remove warnings/errors from Resource test.
| Elixir | mit | IoraHealth/braise |
9a4c614c1a22664e1c42accbf256f2318dbe755e | web/models/team_from_auth.ex | web/models/team_from_auth.ex | defmodule EspiDni.TeamFromAuth do
@moduledoc """
Create or retreive the team from an auth request
"""
alias Ueberauth.Auth
alias EspiDni.Repo
alias EspiDni.Team
def find_or_create(%Auth{} = auth) do
auth
|> team_params
|> create_or_update
end
defp team_params(auth) do
%{
slack... | defmodule EspiDni.TeamFromAuth do
@moduledoc """
Create or retreive the team from an auth request
"""
alias Ueberauth.Auth
alias EspiDni.Repo
alias EspiDni.Team
def find_or_create(%Auth{} = auth) do
auth
|> team_params
|> create_or_update
end
defp team_params(auth) do
%{
slack... | Remove empty params from google auth response | Remove empty params from google auth response
| Elixir | mit | edenspiekermann/espi-dni,edenspiekermann/espi-dni |
45b576ef508d2614e45039eb7bbad155ecfab844 | lib/xandra/authenticator.ex | lib/xandra/authenticator.ex | defmodule Xandra.Authenticator do
@moduledoc """
A behaviour module for implementing a Cassandra authenticator.
## Examples
defmodule MyAuthenticator do
@behaviour Xandra.Authenticator
def response_body(options) do
["user:", Keyword.fetch!(options, :user), "_password:", Keyword.... | defmodule Xandra.Authenticator do
@moduledoc """
A behaviour module for implementing a Cassandra authenticator.
## Examples
defmodule MyAuthenticator do
@behaviour Xandra.Authenticator
def response_body(options) do
["user:", Keyword.fetch!(options, :user), "_password:", Keyword.... | Improve argument name in Xandra.Authenticator.response_body/1 | Improve argument name in Xandra.Authenticator.response_body/1
| Elixir | isc | lexhide/xandra |
fa630855cbb4ba61ab351f3597f26626af576447 | mix.exs | mix.exs | defmodule Mix.Tasks.Compile.Setuid do
def run(_) do
File.rm_rf! "priv"
File.mkdir "priv"
{result, _errcode} = System.cmd("make", [])
IO.binwrite(result)
end
end
defmodule Setuid.Mixfile do
use Mix.Project
@version "0.1.0"
@description """
OS module extention for setting and getting uid/... | defmodule Mix.Tasks.Compile.Setuid do
def run(_) do
File.rm_rf! "priv"
File.mkdir "priv"
{result, _errcode} = System.cmd("make", ["priv/setuid.so"], stderr_to_stdout: true)
IO.binwrite(result)
Mix.Project.build_structure
end
end
defmodule Setuid.Mixfile do
use Mix.Project
@version "0.1.... | Add build structure after compile | Add build structure after compile
| Elixir | mit | plus3x/privilegex |
63c0643c7724bc93f8fbfcc6d47b203f5f42f743 | blue_sky/config/dev.exs | blue_sky/config/dev.exs | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :blue_sky, BlueSky.Endpoint,
http: [port: 4000... | use Mix.Config
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :blue_sky, BlueSky.Endpoint,
http: [port: 4000... | Remove username and password for database | Remove username and password for database
| Elixir | mit | Rumel/bluesky,Rumel/bluesky,Rumel/bluesky |
e9d7b36e2144e418b681baa8d870596ed1160188 | lib/leather_web/models/plaid_item.ex | lib/leather_web/models/plaid_item.ex | defmodule Leather.Plaid.Item do
@moduledoc "The Plaid.Item model for Leather. https://plaid.com/docs/api/#retrieve-item"
alias Leather.Plaid.Item
import Ecto.Changeset
import Ecto.Query
use Ecto.Schema
schema "plaid_items" do
field(:institution_name, :string)
field(:plaid_access_token, :string)
... | defmodule Leather.Plaid.Item do
@moduledoc "The Plaid.Item model for Leather. https://plaid.com/docs/api/#retrieve-item"
alias Leather.Plaid.Item
import Ecto.Changeset
use Ecto.Schema
schema "plaid_items" do
field(:institution_name, :string)
field(:plaid_access_token, :string)
field(:plaid_ite... | Use custom fkey for plaid item -> plaid account. | Use custom fkey for plaid item -> plaid account.
| Elixir | mit | nicksergeant/leather,nicksergeant/leather |
64423d999f1ab00f5e254a5d8b3cb49f182ad6b0 | web/models/question.ex | web/models/question.ex | defmodule Core.Question do
use Core.Web, :model
schema "questions" do
field :title, :string
field :tags, {:array, :map}, virtual: true
many_to_many :question_tags, Core.Tag, join_through: Core.QuestionTag
timestamps()
end
@doc """
Builds a changeset based on the `struct` and `params`.
""... | defmodule Core.Question do
use Core.Web, :model
schema "questions" do
field :title, :string
many_to_many :question_tags, Core.Tag, join_through: Core.QuestionTag
field :answer, {:array, :map}, virtual: true
timestamps()
end
@doc """
Builds a changeset based on the `struct` and `params`.
... | Update model Question (param "tags" is now "answer") | Update model Question (param "tags" is now "answer")
| Elixir | mit | exacs/liqen-core,exacs/liqen-core |
4e346ec734dc3289d37b5d6fa27b64c3af07dfdf | web/views/page_view.ex | web/views/page_view.ex | defmodule MarcCx.PageView do
use MarcCx.Web, :view
use Timex
alias MarcCx.Article
def format_date(%Article{:timestamp => timestamp}) do
{:ok, date} = DateFormat.parse("#{timestamp}", "{s-epoch}")
[month, day, year] =
date
|> DateFormat.format!("%B %d %Y", :strftime)
|> String.split("... | defmodule MarcCx.PageView do
use MarcCx.Web, :view
use Timex
alias MarcCx.Article
def format_date(%Article{:timestamp => timestamp}) do
{:ok, date} = DateFormat.parse("#{timestamp}", "{s-epoch}")
[month, day, year] =
date
|> DateFormat.format!("%B %d %Y", :strftime)
|> String.split("... | Fix the ordinalization on the post dates | Fix the ordinalization on the post dates
| Elixir | mit | marcaddeo/marc.cx,marcaddeo/marc.cx,marcaddeo/marc.cx |
38bc76deebb2596ac5575cd7ca7589b4395352b2 | lib/artus/page_title.ex | lib/artus/page_title.ex | defmodule Artus.PageTitle do
@suffix "BIAS"
def page_title(assigns), do: assigns |> get |> put_suffix
defp put_suffix(nil), do: @suffix
defp put_suffix(title), do: title <> " - " <> @suffix
defp get(%{ view_module: Artus.Admin.PageView }), do: "Admin"
defp get(%{ view_module: Artus.EntryView, view_template: "s... | defmodule Artus.PageTitle do
@suffix "BIAS"
def page_title(assigns), do: assigns |> get |> put_suffix
defp put_suffix(nil), do: @suffix
defp put_suffix(title), do: title <> " - " <> @suffix
defp get(%{ view_module: Artus.Admin.PageView }), do: "Admin"
defp get(%{ view_module: Artus.EntryView, view_template: "s... | Change PageTitle to be more conservative | Change PageTitle to be more conservative
| Elixir | mit | EddyShure/artus,EddyShure/artus,EddyShure/artus |
b7723a45e2aeeb4b178605d2d3f7a8cc5c8aae50 | test/lib/agents/index_agent_test.exs | test/lib/agents/index_agent_test.exs | defmodule PhoenixFrontendDeploys.IndexAgentTest do
use ExUnit.Case
alias PhoenixFrontendDeploys.IndexAgent
setup do
set_live_file_content("index:abc123.html")
IndexAgent.update_index
:ok
end
defp set_live_file_content(index_name) do
File.write!(Path.join([Application.get_env(:phoenix_fronte... | defmodule PhoenixFrontendDeploys.IndexAgentTest do
use ExUnit.Case
alias PhoenixFrontendDeploys.IndexAgent
setup do
set_live_file_content("index:abc123.html")
IndexAgent.update_index
on_exit fn ->
set_live_file_content("index:abc123.html")
end
:ok
end
defp set_live_file_content... | Make sure the 'live' file is reset on exit | Make sure the 'live' file is reset on exit
| Elixir | mit | mfeckie/phoenix_frontend_deploys,mfeckie/phoenix_frontend_deploys |
5f5a4aac017abf11ade32173df362032a5f4e3e2 | lib/jumubase/showtime/performance_filter.ex | lib/jumubase/showtime/performance_filter.ex | defmodule Jumubase.Showtime.PerformanceFilter do
use Ecto.Schema
import Ecto.Changeset
alias Jumubase.Showtime.PerformanceFilter
@primary_key false
embedded_schema do
field :genre, :string, default: nil
field :contest_category_id, :id, default: nil
field :age_group, :string, default: nil
end
... | defmodule Jumubase.Showtime.PerformanceFilter do
use Ecto.Schema
import Ecto.Changeset
alias Jumubase.Showtime.PerformanceFilter
@primary_key false
embedded_schema do
field :genre, :string, default: nil
field :contest_category_id, :id, default: nil
field :age_group, :string, default: nil
end
... | Return map, not keyword list, from PerformanceFilter.to_filter_map/1 | Return map, not keyword list, from PerformanceFilter.to_filter_map/1
| Elixir | mit | richeterre/jumubase-phoenix,richeterre/jumubase-phoenix |
ed352cdf342a5709417289cb4df7f31a8b13c041 | farmbot_core/lib/farmbot_core/asset/query.ex | farmbot_core/lib/farmbot_core/asset/query.ex | defmodule FarmbotCore.Asset.Query do
@callback auto_sync?() :: boolean()
def auto_sync?() do
Asset.fbos_config().auto_sync
end
end
| defmodule FarmbotCore.Asset.Query do
alias FarmbotCore.Asset
@callback auto_sync?() :: boolean()
def auto_sync?() do
Asset.fbos_config().auto_sync
end
end
| Fix typo from adding test code for asset repo queries | Fix typo from adding test code for asset repo queries
| Elixir | mit | FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.