exoteric 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/exoteric/api.rb +4 -7
- data/lib/exoteric/version.rb +1 -1
- metadata +1 -1
data/lib/exoteric/api.rb
CHANGED
@@ -27,7 +27,10 @@ module Exoteric
|
|
27
27
|
counter = Counter.new(params)
|
28
28
|
@count = counter.count(*networks)
|
29
29
|
|
30
|
-
erb
|
30
|
+
erb <<-SCRIPT
|
31
|
+
var Exoteric={c:<%= @count.to_json %>, count: function(sn){return this.c[sn] || 0;}};
|
32
|
+
<% unless @callback.empty? %><%= @callback %>();<% end %>
|
33
|
+
SCRIPT
|
31
34
|
rescue => e
|
32
35
|
status 500
|
33
36
|
return { :error => e.to_s }.to_json
|
@@ -36,9 +39,3 @@ module Exoteric
|
|
36
39
|
|
37
40
|
end
|
38
41
|
end
|
39
|
-
|
40
|
-
__END__
|
41
|
-
|
42
|
-
@@ script
|
43
|
-
var Exoteric={c:<%= @count.to_json %>, count: function(sn){return this.c[sn] || 0;}};
|
44
|
-
<% unless @callback.empty? %><%= @callback %>();<% end %>
|
data/lib/exoteric/version.rb
CHANGED