Skip to content

Commit

Permalink
v0.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
grych committed May 4, 2017
1 parent 42e3600 commit 2647127
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 10 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 0.3.4 (2017-05-04)

Bug fixes:

* `execute!` allows string as the method with parameters
* reverted back the timeout for `execjs/2` - it caused troubles and it is not really needed; in case of the
connectivity failure the whole Drab will die anyway

## 0.3.3 (2017-05-03)

* precompile Drab templates for better performance; user templates are still interpreted on the fly
Expand Down
1 change: 1 addition & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Changes:
* disconnect after inactive time might be hard to survive when you broadcast changes (Safari)
* remove Query from the default, rename it to Drab.JQuery
* new default module, not jQuery based
* execute(:method, params) does not work when the method have more than 1 parameter

## Bugs or features?
* Drab.Socket steals all `connect` callbacks. Bad Drab
3 changes: 1 addition & 2 deletions lib/drab.ex
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,7 @@ defmodule Drab do
events_to_disable_while_processing: Application.get_env(:drab, :events_to_disable_while_processing, ["click"]),
disable_controls_when_disconnected: Application.get_env(:drab, :disable_controls_when_disconnected, true),
socket: Application.get_env(:drab, :socket, "/socket"),
drab_store_storage: Application.get_env(:drab, :drab_store_storage, :session_storage),
timeout: Application.get_env(:drab, :timeout, 5000)
drab_store_storage: Application.get_env(:drab, :drab_store_storage, :session_storage)
}
end
end
2 changes: 0 additions & 2 deletions lib/drab/core.ex
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ defmodule Drab.Core do
receive do
{:got_results_from_client, reply} ->
reply
after Drab.config[:timeout] ->
raise Drab.Timeout
end
end

Expand Down
6 changes: 6 additions & 0 deletions lib/drab/query.ex
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,12 @@ defmodule Drab.Query do
"""
end

defp build_js(selector, method, type) when is_binary(method) and type == :execute do
"""
$('#{selector}').#{method}
"""
end

defp singular(method) do
# returns singular version of plural atom
List.zip([@methods_plural ++ @methods_with_argument_plural, @methods ++ @methods_with_argument])[method] || method
Expand Down
5 changes: 0 additions & 5 deletions lib/drab/timeout.ex

This file was deleted.

2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defmodule Drab.Mixfile do
use Mix.Project
@version "0.3.3"
@version "0.3.4"

def project do
[app: :drab,
Expand Down

0 comments on commit 2647127

Please sign in to comment.