tml-rails 5.2.1 → 5.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1686ece654b47d5e607faf3a8160637470df42dc
4
- data.tar.gz: 873f2fe4d1d5f45038cecc34048861fd3a80249d
3
+ metadata.gz: f2d715700cf5cb41ea2dff069375be8b1e7748cb
4
+ data.tar.gz: 240e6fdbab67b46925a9c45b628b8941237133f4
5
5
  SHA512:
6
- metadata.gz: e0cb96e9ca1cc4f5167ce9ddcab45e6a7714b2064db7b02db211aa24d1532ede89a9b340d276caebe83cfbe0d22cb58692829b6337539ec37abc6752fb5c8805
7
- data.tar.gz: 5df1217ba2837c069216920d7e4803c077b38be7fc8aceea0af2d1293395d137ebeadecb362150f7e1109ba2ef3c8d3c13e4ba8561f5eae66f1076da1ef4435e
6
+ metadata.gz: 40e86d5314313d278e3ac88bec67a59450e42a568f7dcd39b22c4cf9962360d80fa13ba8db69872052e29c652ed9dd7e07731a24d2cb2813d0c95035440c3dd1
7
+ data.tar.gz: 8ae2bb32531ccd1214206e35b1868e7c4fe7cd7c6d370a062836490e6605adc568c8a95a9d62d31f5704855a1b8d6dbca6f57e92269aa33cee99b7c584af3c4b
@@ -1,13 +1,18 @@
1
1
  <script>
2
2
  <%
3
- agent_host = Tml.config.agent[:host] || 'https://cdn.translationexchange.com/tools/agent/' + (Tml.config.agent[:version] || 'stable') + '/agent.min.js'
3
+ agent_host = Tml.config.agent[:host] || 'https://tools.translationexchange.com/agent/agent.min.js'
4
+ if Tml.config.agent[:cache]
5
+ t = Time.now
6
+ t = t - (t.to_i % Tml.config.agent[:cache].to_i).seconds
7
+ agent_host += "?ts=#{t.to_i}"
8
+ end
4
9
  %>
5
10
  (function() {
6
11
  var script = window.document.createElement('script');
7
- script.setAttribute('id', 'tml-agent');
8
- script.setAttribute('type', 'application/javascript');
9
- script.setAttribute('src', '<%= agent_host %>');
10
- script.setAttribute('charset', 'UTF-8');
12
+ script.setAttribute('id', 'tml-agent');
13
+ script.setAttribute('type', 'application/javascript');
14
+ script.setAttribute('src', '<%= agent_host %>');
15
+ script.setAttribute('charset', 'UTF-8');
11
16
  script.onload = function() {
12
17
  Trex.init("<%=tml_application.key%>", <%=Tml.config.agent.to_json.html_safe%>);
13
18
  };
@@ -30,5 +30,5 @@
30
30
  #++
31
31
 
32
32
  module TmlRails
33
- VERSION = '5.2.1'
33
+ VERSION = '5.2.2'
34
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tml-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.1
4
+ version: 5.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Berkovich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-25 00:00:00.000000000 Z
11
+ date: 2015-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails