exoteric 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 :script
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 %>
@@ -1,5 +1,5 @@
1
1
  module Exoteric
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
 
4
4
  def self.version
5
5
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exoteric
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: