<|start_filename|>examples/auto_update/test/auto_update_test.exs<|end_filename|>
defmodule AutoUpdateTest do
  use ExUnit.Case
  doctest AutoUpdate

  test "greets the world" do
    assert AutoUpdate.hello() == :world
  end
end


<|start_filename|>examples/simple_script/lib/simple_script.ex<|end_filename|>
defmodule SimpleScript do
  use Bakeware.Script

  @impl Bakeware.Script
  def main(args) do
    args
    |> parse_args()
    |> response()
    |> IO.puts()
  end

  defp parse_args(args) do
    {opts, word, _} =
      args
      |> OptionParser.parse(switches: [upcase: :boolean])

    {opts, List.to_string(word)}
  end

  defp response({opts, word}) do
    if opts[:upcase], do: String.upcase(word), else: word
  end
end


<|start_filename|>examples/scenic_app/mix.exs<|end_filename|>
defmodule ScenicApp.MixProject do
  use Mix.Project
  @app :scenic_app

  def project do
    [
      app: @app,
      version: "0.1.0",
      elixir: "~> 1.7",
      build_embedded: true,
      start_permanent: Mix.env() == :prod,
      deps: deps(),
      releases: [{@app, release()}],
      preferred_cli_env: [release: :prod]
    ]
  end

  # Run "mix help compile.app" to learn about applications.
  def application do
    [
      mod: {ScenicApp, []},
      extra_applications: [:crypto]
    ]
  end

  # Run "mix help deps" to learn about dependencies.
  defp deps do
    [
      {:scenic, "~> 0.10"},
      {:scenic_driver_glfw, "~> 0.10", targets: :host},
      {:bakeware, path: "../../bakeware", runtime: false}
    ]
  end

  defp release do
    [
      overwrite: true,
      cookie: "#{@app}_cookie",
      steps: [:assemble, &Bakeware.assemble/1],
      strip_beams: Mix.env() == :prod
    ]
  end
end
