Permalink
Browse files

Update to elixir master

  • Loading branch information...
1 parent b9963c4 commit 76fb79994940431a32b8d11c83e68f491b093831 @josevalim josevalim committed Sep 19, 2012
View
@@ -138,7 +138,7 @@ defmodule Dynamo.App do
@doc false
defmacro normalize_options(mod) do
- dynamo = Module.read_attribute(mod, :config)[:dynamo]
+ dynamo = Module.get_attribute(mod, :config)[:dynamo]
root = Dynamo.root
source = dynamo[:source_paths]
@@ -190,7 +190,7 @@ defmodule Dynamo.App do
@doc false
def default_filters(mod) do
filters = []
- dynamo = Module.read_attribute(mod, :config)[:dynamo]
+ dynamo = Module.get_attribute(mod, :config)[:dynamo]
public_route = dynamo[:public_route]
public_root = case dynamo[:public_root] do
@@ -215,7 +215,7 @@ defmodule Dynamo.App do
@doc false
defmacro define_view_paths(module) do
- dynamo = Module.read_attribute(module, :config)[:dynamo]
+ dynamo = Module.get_attribute(module, :config)[:dynamo]
view_paths = dynamo[:view_paths]
{ compiled, runtime } =
@@ -52,7 +52,7 @@ defmodule Dynamo.App.Config do
@doc false
defmacro before_compile(mod) do
- initializers = Module.read_attribute(mod, :initializers)
+ initializers = Module.get_attribute(mod, :initializers)
quote location: :keep do
def start do
@@ -55,8 +55,8 @@ defmodule Dynamo.Router.Callbacks do
@doc false
defmacro before_compile(module) do
- prepare = Module.read_attribute(module, :__prepare_callbacks)
- finalize = Module.read_attribute(module, :__finalize_callbacks)
+ prepare = Module.get_attribute(module, :__prepare_callbacks)
+ finalize = Module.get_attribute(module, :__finalize_callbacks)
prepare = Enum.reduce prepare, quote(do: { :ok, conn }), fn(callback, acc) ->
compile_callback(callback, acc, function(:compile_prepare, 3))
@@ -21,7 +21,7 @@ defmodule Dynamo.Router.Fetch do
@doc false
defmacro before_compile(module) do
- fetch = Module.read_attribute(module, :__fetch)
+ fetch = Module.get_attribute(module, :__fetch)
if fetch do
code = Enum.reduce fetch, quote(do: conn), fn(x, acc) ->
@@ -69,7 +69,7 @@ defmodule Dynamo.Router.Filters do
@doc false
defmacro before_compile(module) do
- filters = Module.read_attribute(module, :__filters)
+ filters = Module.get_attribute(module, :__filters)
code = quote(do: super(conn))
code = Enum.reduce(filters, code, compile_filter(&1, &2))
@@ -20,8 +20,8 @@ defmodule Dynamo.Utils.Once do
target = __CALLER__.module
expanded = Macro.expand module, __CALLER__
- unless List.member?(Module.read_attribute(target, :__use_once), expanded) do
- Module.add_attribute(target, :__use_once, expanded)
+ unless List.member?(Module.get_attribute(target, :__use_once), expanded) do
+ Module.put_attribute(target, :__use_once, expanded)
quote do
use unquote(module)

0 comments on commit 76fb799

Please sign in to comment.