nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: phoenixframework/phoenix
Pull request #2490 (2017-09-12 16:27:31)

Remove whitespace If Ecto is not included on phx.new --umbrella
Before:

```elixir
    Supervisor.start_link([

    ], strategy: :one_for_one, name: MyApp.Supervisor)
```

After:

```elixir
    Supervisor.start_link([], strategy: :one_for_one, name: MyApp.Supervisor)
```

josevalim: Beautiful, please go ahead and merge it.  :D

Patch:
diff --git a/guides/docs/routing.md b/guides/docs/routing.md
index 410548aa8..20535916b 100644
--- a/guides/docs/routing.md
+++ b/guides/docs/routing.md
@@ -231,7 +231,7 @@ defmodule BackgroundJob.Router do
 
   get "/", do: send_resp(conn, 200, "Welcome to #{conn.assigns.name}")
   get "/active", do: send_resp(conn, 200, "5 Active Jobs")
-  get "/pending", do: send_resp(conn, 200, "3 Active Jobs")
+  get "/pending", do: send_resp(conn, 200, "3 Pending Jobs")
   match _, do: send_resp(conn, 404, "Not found")
 end
 ```
diff --git a/installer/templates/phx_umbrella/apps/app_name/lib/app_name/application.ex b/installer/templates/phx_umbrella/apps/app_name/lib/app_name/application.ex
index 595f4fbf6..350e892ff 100644
--- a/installer/templates/phx_umbrella/apps/app_name/lib/app_name/application.ex
+++ b/installer/templates/phx_umbrella/apps/app_name/lib/app_name/application.ex
@@ -12,8 +12,12 @@ defmodule <%= app_module %>.Application do
   def start(_type, _args) do
     import Supervisor.Spec, warn: false
 
+    <%= if ecto do %>
     Supervisor.start_link([
-      <%= if ecto do %>supervisor(<%= app_module %>.Repo, []),<% end %>
+      supervisor(<%= app_module %>.Repo, []),
     ], strategy: :one_for_one, name: <%= app_module %>.Supervisor)
+    <% else %>
+    Supervisor.start_link([], strategy: :one_for_one, name: <%= app_module %>.Supervisor)
+    <% end %>
   end
 end


Test patch:
diff --git a/installer/test/phx_new_umbrella_test.exs b/installer/test/phx_new_umbrella_test.exs
index caaf72229..fd7d8f940 100644
--- a/installer/test/phx_new_umbrella_test.exs
+++ b/installer/test/phx_new_umbrella_test.exs
@@ -73,6 +73,7 @@ defmodule Mix.Tasks.Phx.New.UmbrellaTest do
       end
 
       assert_file app_path(@app, "lib/#{@app}/application.ex"), ~r/defmodule PhxUmb.Application do/
+      assert_file app_path(@app, "lib/#{@app}/application.ex"), ~r/supervisor\(PhxUmb.Repo, \[\]\)/
       assert_file app_path(@app, "lib/#{@app}.ex"), ~r/defmodule PhxUmb do/
       assert_file app_path(@app, "mix.exs"), ~r/mod: {PhxUmb.Application, \[\]}/
       assert_file app_path(@app, "test/test_helper.exs")
@@ -218,6 +219,8 @@ defmodule Mix.Tasks.Phx.New.UmbrellaTest do
       assert_file web_path(@app, "config/test.exs"), &refute(&1 =~ config)
       assert_file web_path(@app, "config/prod.secret.exs"), &refute(&1 =~ config)
 
+      assert_file app_path(@app, "lib/#{@app}/application.ex"), ~r/Supervisor.start_link\(\[\]/
+
       # No HTML
       assert File.exists?(web_path(@app, "test/#{@app}_web/controllers"))
       assert File.exists?(web_path(@app, "lib/#{@app}_web/controllers"))
Repository: phoenixframework/phoenix
Pull request #2918 (2018-06-20 03:54:32)

Correct grammar for prompt messages
Add missing "to"s and refine usage of "prefer".


Patch:
diff --git a/lib/mix/tasks/phx.gen.context.ex b/lib/mix/tasks/phx.gen.context.ex
index a49437c25..99f7d1d8a 100644
--- a/lib/mix/tasks/phx.gen.context.ex
+++ b/lib/mix/tasks/phx.gen.context.ex
@@ -12,7 +12,7 @@ defmodule Mix.Tasks.Phx.Gen.Context do
   The context is an Elixir module that serves as an API boundary for
   the given resource. A context often holds many related resources.
   Therefore, if the context already exists, it will be augmented with
-  functions for the given resource. 
+  functions for the given resource.
 
   > Note: A resource may also be split
   > over distinct contexts (such as Accounts.User and Payments.User).
@@ -248,14 +248,15 @@ defmodule Mix.Tasks.Phx.Gen.Context do
       The #{inspect context.module} context currently has #{function_count} functions and
       #{file_count} files in its directory.
 
-        * It's ok to have multiple resources in the same context as
+        * It's OK to have multiple resources in the same context as
           long as they are closely related
         * If they are not closely related, another context probably works better
 
-      If you are not sure, prefer a new context over adding to the existing one.
+      If you are not sure, prefer creating a new context over adding to the
+      existing one.
 
       """
-      unless Mix.shell.yes?("Would you like proceed?") do
+      unless Mix.shell.yes?("Would you like to proceed?") do
         System.halt()
       end
     end


Test patch:
diff --git a/test/mix/tasks/phx.gen.context_test.exs b/test/mix/tasks/phx.gen.context_test.exs
index 97212d9a0..fed3ca876 100644
--- a/test/mix/tasks/phx.gen.context_test.exs
+++ b/test/mix/tasks/phx.gen.context_test.exs
@@ -150,7 +150,7 @@ defmodule Mix.Tasks.Phx.Gen.ContextTest do
 
       assert_received {:mix_shell, :info, ["You are generating into an existing context" <> notice]}
       assert notice =~ "Phoenix.Blog context currently has 6 functions and\n2 files in its directory"
-      assert_received {:mix_shell, :yes?, ["Would you like proceed?"]}
+      assert_received {:mix_shell, :yes?, ["Would you like to proceed?"]}
 
       assert_file "lib/phoenix/blog/comment.ex", fn file ->
         assert file =~ "field :title, :string"