tml-rails 5.2.5 → 5.2.7

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: 1286b00fbe3f1e6e044085e0616c05e915f5f4a5
4
- data.tar.gz: 256b426a15d8d6f29474a3da8493dae78be39dfe
3
+ metadata.gz: c6b47a76c76790abf803730c425e68876938c354
4
+ data.tar.gz: 54ccda8dbe9f4efb4caba514961d4129effa943b
5
5
  SHA512:
6
- metadata.gz: 9a7c3c326bab9b041bc5fce4d9805c0f1eb7f03390a7de60d8a884de9050c69d613bc0a9c44efae3ede09ae9f5a029239e9f093f782f1a9b1a2d843ecf45d548
7
- data.tar.gz: 23b9f5da25b901977a45032d2c0123e0601d4d99caac404aecc8fce1a6b7307347c72141520dda9ad3763062787d554d4c0daea2883a94fce7a7752472867a77
6
+ metadata.gz: b5c3859299b769e356a778568934c7aa8955efc60739fbe14aa6d8c1778b8888b007f3ec765b91fb10cb987c5a6d84b938dd291e5aa513b2d73f754b3f03bddb
7
+ data.tar.gz: c70317ed3effb0f16d20526441d4ffdd619e34593293de363701b0fa291b8d62120e3d4a9118bec4de6dcafc486a5fb351f4e4e746ac287bddafa23e51ece56f
@@ -7,11 +7,11 @@
7
7
  <%= tml_application.css %>
8
8
  </style>
9
9
 
10
- <% if Tml.config.respond_to?(:agent) and Tml.config.agent and Tml.config.agent[:enabled] %>
11
- <% if Tml.config.agent[:type].to_s == 'agent' %>
12
- <%= render(:partial => '/tml_rails/tags/scripts_agent') %>
10
+ <% if Tml.config.respond_to?(:agent) and Tml.config.agent %>
11
+ <% if Tml.config.agent[:type].to_s == 'tools' %>
12
+ <%= render(:partial => '/tml_rails/tags/scripts_tools') %>
13
13
  <% else %>
14
- <%= render(:partial => '/tml_rails/tags/scripts_tools') %>
14
+ <%= render(:partial => '/tml_rails/tags/scripts_agent') %>
15
15
  <% end %>
16
16
  <% end %>
17
17
  <% end %>
@@ -6,6 +6,17 @@
6
6
  t = t - (t.to_i % Tml.config.agent[:cache].to_i).seconds
7
7
  agent_host += "?ts=#{t.to_i}"
8
8
  end
9
+
10
+ agent_config = Tml.config.agent
11
+ agent_config[:languages] = []
12
+ tml_application.languages.each do |lang|
13
+ agent_config[:languages] << {
14
+ locale: lang.locale,
15
+ english_name: lang.english_name,
16
+ native_name: lang.native_name,
17
+ flag_url: lang.flag_url
18
+ }
19
+ end
9
20
  %>
10
21
  (function() {
11
22
  var script = window.document.createElement('script');
@@ -14,7 +25,7 @@
14
25
  script.setAttribute('src', '<%= agent_host %>');
15
26
  script.setAttribute('charset', 'UTF-8');
16
27
  script.onload = function() {
17
- Trex.init("<%=tml_application.key%>", <%=Tml.config.agent.to_json.html_safe%>);
28
+ Trex.init("<%=tml_application.key%>", <%=agent_config.to_json.html_safe%>);
18
29
  };
19
30
  window.document.getElementsByTagName('head')[0].appendChild(script);
20
31
  })();
@@ -30,5 +30,5 @@
30
30
  #++
31
31
 
32
32
  module TmlRails
33
- VERSION = '5.2.5'
33
+ VERSION = '5.2.7'
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.5
4
+ version: 5.2.7
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-12-15 00:00:00.000000000 Z
11
+ date: 2016-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails