Current section

37 Versions

Jump to

Compare versions

8 files changed
+28 additions
-26 deletions
  @@ -10,11 +10,11 @@ the same name and author.
10 10
11 11 ## Installation and Configuration
12 12
13 - 1. Add thesis to your `mix.exs`:
13 + #### 1. Add thesis to your `mix.exs`:
14 14
15 15 ```elixir
16 16 def deps do
17 - [{:thesis, "~> 0.0.1"}]
17 + [{:thesis, "~> 0.0.3"}]
18 18 end
19 19
20 20 def application do
  @@ -22,10 +22,10 @@ def application do
22 22 end
23 23 ```
24 24
25 - 2. Run `mix thesis.install`
25 + #### 2. Run `mix thesis.install`
26 26
27 - This will add Thesis to your `package.json`, `config.exs`, generate
28 - a migration, and generate an authorization module.
27 + This will add Thesis to your `package.json`, `config.exs`, and `web.ex`,
28 + and generate a migration and an authorization module.
29 29
30 30 ## Making Pages Editable
  @@ -26,7 +26,7 @@
26 26 <<"mix.exs">>,<<"README.md">>,<<"package.json">>]}.
27 27 {<<"licenses">>,[<<"MIT">>]}.
28 28 {<<"links">>,
29 - [{<<"Docs">>,<<"https://hexdocs.pm/thesis/0.0.3/api-reference.html">>},
29 + [{<<"Docs">>,<<"https://hexdocs.pm/thesis/0.0.4/api-reference.html">>},
30 30 {<<"GitHub">>,<<"https://github.com/infinite_red/thesis">>}]}.
31 31 {<<"maintainers">>,
32 32 [<<"Jamon Holmgren">>,<<"Ken Miller">>,<<"Daniel Berkompas">>]}.
  @@ -52,4 +52,4 @@
52 52 [{<<"app">>,<<"plug">>},
53 53 {<<"optional">>,false},
54 54 {<<"requirement">>,<<"~> 1.0">>}]}]}.
55 - {<<"version">>,<<"0.0.3">>}.
55 + {<<"version">>,<<"0.0.4">>}.
  @@ -43,14 +43,11 @@ defmodule Mix.Tasks.Thesis.Install do
43 43
44 44 def thesis_web do
45 45 status_msg("updating", "web/web.exs")
46 - view_pattern = "def view do\n quote do"
47 - router_pattern = "def router do\n quote do"
48 46 dest_file_path = Path.join [File.cwd! | ~w(web web.ex)]
49 47 File.read!(dest_file_path)
50 48 |> insert_controller
51 49 |> insert_view
52 50 |> insert_router
53 - |> IO.puts
54 51 |> overwrite_file(dest_file_path)
55 52 end
  @@ -8,11 +8,9 @@ defmodule Thesis.ApiController do
8 8 json conn, %{pages: {}}
9 9 end
10 10
11 - def js(conn, _params) do
12 - text conn, File.read!(thesis_js_source_path)
13 - end
11 + def assets(conn, _params), do: conn
14 12
15 - def update(conn, %{"contents" => contents, "page" => page} = params) do
13 + def update(conn, %{"contents" => contents, "page" => page} = _params) do
16 14 store.update(page, contents)
17 15 json conn, %{}
18 16 end
  @@ -2,6 +2,7 @@ defmodule Thesis.Controller do
2 2
3 3 defmacro __using__(_) do
4 4 quote do
5 + use Phoenix.Controller
5 6 plug Thesis.Controller.Plug
6 7 end
7 8 end
Loading more files…