Browse Source

Clean up code and update Elixir

The setup script was using instructions for running
Phoenix with Elixir v1.0.5 but the Elixir being used
was still v1.0.4. Therefore we updated Elixir and
removed now unecessary setup from the application code.
José Valim 10 years ago
parent
commit
6cbc8c536e

+ 1 - 3
frameworks/Elixir/phoenix/config/prod.exs

@@ -27,9 +27,7 @@ config :hello, Hello.Repo,
 # Where those two env variables point to a file on
 # Where those two env variables point to a file on
 # disk for the key and cert.
 # disk for the key and cert.
 
 
-
-# Do not pring debug messages in production
-config :logger, level: :info
+config :logger, level: :error
 
 
 # ## Using releases
 # ## Using releases
 #
 #

+ 0 - 2
frameworks/Elixir/phoenix/web/controllers/page_controller.ex

@@ -4,8 +4,6 @@ defmodule Hello.PageController do
   alias Hello.Fortune
   alias Hello.Fortune
 
 
   plug :action
   plug :action
-  plug :scrub_params, "world" when action in [:create, :update]
-
 
 
   def index(conn, _params) do
   def index(conn, _params) do
     json conn, %{"TE Benchmarks\n" => "Started"}
     json conn, %{"TE Benchmarks\n" => "Started"}

+ 0 - 18
frameworks/Elixir/phoenix/web/router.ex

@@ -1,20 +1,7 @@
 defmodule Hello.Router do
 defmodule Hello.Router do
   use Hello.Web, :router
   use Hello.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 "/", Hello do
   scope "/", Hello do
-    pipe_through :browser # Use the default browser stack
-
     get "/json", PageController, :_json
     get "/json", PageController, :_json
     get "/db", PageController, :db
     get "/db", PageController, :db
     get "/queries", PageController, :queries
     get "/queries", PageController, :queries
@@ -23,9 +10,4 @@ defmodule Hello.Router do
     get "/plaintext", PageController, :plaintext
     get "/plaintext", PageController, :plaintext
     get "/", PageController, :index
     get "/", PageController, :index
   end
   end
-
-  # Other scopes may use custom stacks.
-  # scope "/api", Hello do
-  #   pipe_through :api
-  # end
 end
 end

+ 1 - 1
toolset/setup/linux/languages/elixir.sh

@@ -8,7 +8,7 @@ RETCODE=$(fw_exists ${IROOT}/elixir.installed)
   return 0; }
   return 0; }
 
 
 ELIXIR_HOME=$IROOT/elixir
 ELIXIR_HOME=$IROOT/elixir
-VERSION="1.0.4-1"
+VERSION="1.0.5-2"
 RELEASE="trusty"
 RELEASE="trusty"
 ARCH="amd64"
 ARCH="amd64"